elkarte/Elkarte — pull request #1368 by Spuds (2014-02-12 18:32:24+00:00)
Title: Watch yer Language

Please take a look at this and let me know if I'm lost again :smile_cat:

The editor button tooltips language strings were a bit confusing to set, so this set of changes is to make it consistent.

First up was when using English no language strings were used, you had to edit the JS directly to change the tooltip text. So this change does not give English a free pass but instead loads those strings just like it would for any other language.

Removed the txt strings from post english, this were duplicates to what are in editor.xxx.php and I assume left over from the old editor or from an earlier way we were loading strings. There is always a chance a couple of those were used elsewhere, but in looking for several they were not used.

Next I also removed the description => bla from the base array, these were not used in the base commands, that is only used when defining a custom bbc tag with integration. Again to avoid confusion in thinking those were needed.

Now the JS has the text string "key" set in tooltip, the editor will look for that key in the language strings we load with jslocal.controller. If the string is not found, then the text of the key will be displayed as usual otherwise the text from the language file will be used.

I think this will be clear to everyone how to change the tooltip text as its simply editing the text string in editors.langauge.php and not in post, not in description, not in the JS

I also tweaked a bit how we removed editor buttons to respect disabled BBC.