Localize menu entries, dialogs, and error messages#1478
Conversation
3b5073d to
a88ad80
Compare
|
There are still a couple of things that need to be added, here, so hold off with the review for now. I'll let you know when I have it completed. |
|
I have made the additional changes that I mentioned above. The bigger issue involved the timing of when the locale files are loaded, which needs to be done before any of the localizations can be used. That means In addition, the loader now calls A related issue is that if the user changes the locale via the MathJax contextual menu's To resolve this issue, the menu code now saves the locale in I've enabled the I added the Finally, in So I think this should be ready to go now, and can be reviewed. |
|
PS, some of the changes in |
This PR adds localization to the MathJax contextual menu and its dialogs and errors. It does this by adding the localization into the functions that create the menu items (and removing the menu text strings from those calls). The Clearspeak dynamic menu and preferences dialog are localized, but not the names of the properties or their possible values, since these are the values needed by SRE to process the preferences, and translating them would break that. (If you think they should be translates, I can do that.)
Some of the menu identifiers were changed, because there were some duplicates that didn't use the same message string, so they had to be made to use separate identifiers. The
radioGroup()entries use their values as their identifiers. That means there are things like100%as ids. These could be filtered out and not translated, but it didn't seem to hurt to keep them in place. If you want them removed, I can do that.Finally, the package script for copying locale directories has been split into parts (the tex and menus locales are copied in separate scripts, as there are going to be more of these commands as we make more localizations). I fixed a problem with the copying of the
ts/input/tex/__locales__directory, which was not being placed in the correct location.Finally, you should use
in the lab's
lib/v4-lab.jsfile'sloadersection of the MathJax configuration object in order to handle both the tex locale directories (where theextensionssubdirectory must be removed) and the menu (and other future) locale directories.