Problems with tooltips in the compose post screen
I've installed SMF2.1 from this site to test it with the updated translation for Esperanto. There are a few problems with the displaying of tooltips in the compose screen for new posts:
- Preformatted - the tooltip shows only "Pre" at the moment. This is also the case in the English version. No translated form is shown when Esperanto is selected.
- The following editing functions show the English tooltip and not the translated form:
Insert FTP link Glow Shadow
- No tooltip in English or Esperanto for "marquee".
Hope I'm posting this in the right place. Thank you for your work on the new version of SMF - it's certainly looking good!
Can you upload the Post.english.php file from the Esperanto language pack to some site like pastebin and link here please?
Here's the file Post.esperanto.php (SMF2.1): http://pastebin.com/2CT9Z6RB
After a bit of digging, I'm slowly getting to the bottom of this issue.
Long story short, it seems to be caused by these three lines in Subs-Editor.php:
// editor language file
if (!empty($txt['lang_locale']) && $txt['lang_locale'] != 'en_US')
loadJavascriptFile($scripturl . '?action=loadeditorlocale', array(), 'sceditor_language');
action=loadeditorlocale calls the loadLocale() function in Sources/Subs-Editor.php, which in turn sets up all the descriptions based on the $editortxt strings in the Editor language file.
It seems these strings are the ones used for the button descriptions, not the ones in Post.english.php.
This leaves me with three questions though...
- Why are we defining descriptions in Subs-Editor.php if they're just being ignored?
- Why are the descriptions in the Editor language file different than those in Post? I'm guessing these were the original strings used by the editor.
- Why are the strings in the Editor language file being used when the local is 'en_US'? The code above is the only code in SMF that even calls the loadLocale() function?
@emanuele45 - You seem to know more about the editor than I do. Any thoughts on this?
-
As per Subs-Editor: // Note: pass the array here is not necessary and is deprecated, but it is ketp for backward compatibility with 2.0
-
The ones in Post are indeed the original strings from 2.0 and before.
-
Because of the way the editor works, the locale data appears to be loaded separately with action=loadeditorlocale, which loads the current language's Editor language file (which is quite different structurally to Post), and whatever the current locale is, that's what array is built (since the sceditor.locale[whatever] will then match the page's locale, at least in theory) I'm assuming that it doesn't need to load anything for en_US because that's built into the editor itself, but that for anything other than that it does need to load it.
I can't reproduce it, I see the translated value of those bbcodes.
Can we close this? or anyone knows way to reproduce this ?
Yeah, seems this can be closed now.
@ChainyEO this may be due to incomplete translations.