Line 146: |
Line 146: |
| | | |
| ==== Spotting untranslated messages ==== | | ==== Spotting untranslated messages ==== |
− | Untranslated messages are spotted by comparing the original English with the "translated" text. If they are the same, then the text has NOT been translated. The other situation that occurs is that when comparing the translated text in <modulename>_<language_code>.lex (imported from the smeserver-msanager-locale rpm) and the english text <modulename>_en.lex (which is imported in smeserver-manager rpm), then the key taken from the translated file does not exist in the English (original) file. I assume that the latter is due to the lex translated lex file being brought across from SM1 un touched whereas the english lex file has been editted to reflecxt which of the messages are actually in use by SM2. Incidentally all the lex files (from either rpm) are held in /usr/share/smanager/lib/SrvMngr/I18N/Modules/<modulename>. This difference is reflected in the placement of those files in the git repos smeserver-manager-locale and smeserver-manager, | + | Untranslated messages are spotted by comparing the original English with the "translated" text. If they are the same, then the text has NOT been translated. The other situation that occurs is that when comparing the translated text in <modulename>_<language_code>.lex (imported from the smeserver-manager-locale rpm) and the english text <modulename>_en.lex (which is imported in smeserver-manager rpm), then the key taken from the translated file does not exist in the English (original) file. I assume that the latter is due to the lex translated lex file being brought across from SM1 un touched whereas the english lex file has been edited to reflect which of the messages are actually in use by SM2. Incidentally all the lex files (from either rpm) are held in /usr/share/smanager/lib/SrvMngr/I18N/Modules/<modulename>. This difference is reflected in the placement of those files in the git repos smeserver-manager-locale and smeserver-manager, In some cases the key or Id used does not include the prefix when it ought to. Or sometimes the Id does not correspond entirely to the Id in the lex file (programmer error!), remeber if you change the id in the controller or template files, the all the .lex files need to be examined. Better to |
| | | |
| So I wrote another program https://src.koozali.org/brianr/Lex2Po/src/branch/main/Check_Translation.py to spot the untranslated messages and also to delete in the "translated" lex filers the entries that do not appear in the english file. There were a few exceptions to this - ones dealing with time (AM, PM and AM/PM) and also the ones for some of the linux internals (cifs and nfs). The editted lex files have been played back to the main git repos. At some point I will re-build the rpms for smeserver-manager-locale and smeserver-manager and then clearly we need to test all (or an many as we can) paths through all the SM2 modules to make sure we are not missing messages. | | So I wrote another program https://src.koozali.org/brianr/Lex2Po/src/branch/main/Check_Translation.py to spot the untranslated messages and also to delete in the "translated" lex filers the entries that do not appear in the english file. There were a few exceptions to this - ones dealing with time (AM, PM and AM/PM) and also the ones for some of the linux internals (cifs and nfs). The editted lex files have been played back to the main git repos. At some point I will re-build the rpms for smeserver-manager-locale and smeserver-manager and then clearly we need to test all (or an many as we can) paths through all the SM2 modules to make sure we are not missing messages. |
| | | |
− | ==== Other Anomalies ==== | + | ==== Testing the language translations ==== |
| + | The latest smeserver-manager is version 11.0.0-10 and the smeserver-manager-locale is at 11.0.0-4. Note that in the latter case you have to load each rpm for each language. If you are on earlier version then the menu is not correctly translated in many cases. |
| + | |
| + | This works: |
| + | |
| + | `dnf update smeserver-manager-locale-*` |
| + | |
| + | Using the Chrome or Chromium browser, there is a plugin called "Locale Switcher" which will allow the browser locale to be switched into whatever language you choose. This can then be used to test each language translations. |
| + | |
| + | No translations have complete coverage , so testing each one will result in anomalous messages. |
| + | |
| + | So, go through as many of the SM2 panels as possible in each of the languages and spot situations where the message has not been translated (and is in English) OR shows the message ID rather than the translated OR where the translated text has html in it which is not being interpreted. This screen shot demonstrates what I mean: |
| + | [[File:Screenshot from 2024-07-27 14-28-29.png|left|thumb|Domains panel in Turkish. Showing anomalous messages. ]] |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | In this case its looks as though the button text does not match the equivalent id in the .lex files (this will require a change to the template files or more likley to the lex file(s). |
| + | |
| + | In some cases the Message Id in the translation file does not match the Id used in the Code. Html has to b e passed through Mojolicious specifically so we need to wrap a routine around that message in the code. Please log any anomalies. |