Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1.8 Languages - Remove square brackets from strings
#1
Some language strings contain square brackets to border the text, for example:

datahandler_pm.lang.php: $l['pmdata_code_no_subject'] = '[no subject]';
global.lang.php: $l['view_attachments'] = '[View My Attachments]';
private.lang.php: $l['deny_receipt'] = '[Deny Receipt]';

These fixed brackets could make a theme designing more inflexible.
Any additional text decoration (brackes and similar) in language strings should better be outsourced to templates, like:

private.lang.php: $l['deny_receipt'] = 'Deny Receipt';

Template "private_messagebit_denyreceipt":
[<a href="private.php?action=read&amp;pmid={$message['pmid']}&amp;denyreceipt=1">{$lang->deny_receipt}</a>]

[ExiTuS]
Reply
#2
Would the square brackets depend on the language? Would we need to introduce two new language variables (one for opening and one for closing) for this semantic?
Reply
#3
No...
it's just about these brackets as part of a string.

A bracket character is kind of "text decoration" and should not be part of a language string.
This is still an open suggestion.

[ETS]
Reply
#4
Since this is in language strings which is easily editable by admin what is the point of imposing a change?
The same thing applies to colons also, sometimes they are completely unnecessary; but still there in the language strings.
Reply
#5
I will side with ["ExiTuS"] in this matter.

It is clear the brackets are intended to highlight a CTA (call to action) or to emphasize something.

(2024-04-19, 09:39 PM)effone Wrote: Since this is in language strings which is easily editable by admin what is the point of imposing a change?

This motivates theme designers to simply hard code new language strings instead.

(2024-04-19, 09:39 PM)effone Wrote: The same thing applies to colons also, sometimes they are completely unnecessary; but still there in the language strings.

I suppose this is an instance where the ones deciding are the coders; instead of the designers.
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#6
(2024-04-19, 09:39 PM)effone Wrote: The same thing applies to colons also, sometimes they are completely unnecessary; but still there in the language strings.
In this case you should not equate punctuation with special text decoration.

But you're right at all - so next suggestion:
Check for completely unnecessary colons and remove Smile

[ETS]
Reply
#7
Well, I must not deny the necessity of the idea from the designer point of view!
Sometimes those unnecessary characters are really irritating and those should be transferred to templates...

But again, from admins perspective - its simply fine wherever it is unless its hardcoded.
Reply
#8
These are indeed outside of the language semantics (like HTML). Moving them from language strings to templates in 1.9 won't cause any issues, so feel free to open a PR on the branch and we'll have it merged.
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)