Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove square brackets from language definitions
#1
These cause problems when styling links as buttons. Better to have them in the templates where they can be easily removed if not wanted / needed.

inc/languages/english/global.lang.php

Code:
$l['view_attachments'] = "[View My Attachments]";


inc/languages/english/private.lang.php

Code:
$l['deny_receipt'] = "[Deny Receipt]";

Then put the square brackets in the respective templates:

post_attachments
private_messagebit_denyreceipt
What goes around comes around



Reply
#2
Why not, this change is easy and would make life easier for theme devs Smile
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#3
Agreed 100% on this one.
Reply
#4
Here's another one in online.lang.php

$l['lookup'] = "[Lookup]";

online_row_ip_lookup template
What goes around comes around



Reply
#5
(08-13-2017, 11:01 AM)Ashley1 Wrote: Here's another one in online.lang.php

$l['lookup'] = "[Lookup]";

online_row_ip_lookup template

I can create a PR, but I will wait for MyBB dev team reply. In the meantime you can make a list Smile
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#6
I post them here as I find them, all the square brackets in language files. Those all I have for now.
What goes around comes around



Reply
#7
If you want to search automatically rather than manually, use grep.

Code:
./admin/config_plugins.lang.php:$l['error_vcheck_vulnerable'] = "[Vulnerable plugin]:";
./global.lang.php:$l['posted_image'] = "[Image: {1}]";
./global.lang.php:$l['posted_video'] = "[Video: {1}]";
./global.lang.php:$l['view_attachments'] = "[View My Attachments]";
./moderation.lang.php:$l['split_thread_subject'] = "[split]";
./online.lang.php:$l['lookup'] = "[Lookup]";
./private.lang.php:$l['deny_receipt'] = "[Deny Receipt]";
./reputation.lang.php:$l['no_comment'] = "[No comment]";

Here's the list on MyBB 1.8.12. I am not against this, but neither can see the benefits.
[Image: Ak4Znf1.png]
Reply
#8
(08-13-2017, 07:55 PM)Shade Wrote: If you want to search automatically rather than manually, use grep.

Code:
./admin/config_plugins.lang.php:$l['error_vcheck_vulnerable'] = "[Vulnerable plugin]:";
./global.lang.php:$l['posted_image'] = "[Image: {1}]";
./global.lang.php:$l['posted_video'] = "[Video: {1}]";
./global.lang.php:$l['view_attachments'] = "[View My Attachments]";
./moderation.lang.php:$l['split_thread_subject'] = "[split]";
./online.lang.php:$l['lookup'] = "[Lookup]";
./private.lang.php:$l['deny_receipt'] = "[Deny Receipt]";
./reputation.lang.php:$l['no_comment'] = "[No comment]";

Here's the list on MyBB 1.8.12. I am not against this, but neither can see the benefits.

Anyone creating a modern theme, will still have a ton of work to do to sort these small changes out. So there is benefit, besides the fact that it's inconsistent to sometimes use square brackets in code files and other times not.
What goes around comes around



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)