Changes

From SME Server
Jump to navigationJump to search
Line 15: Line 15:  
Within SM2 the package I18N is used as the basis for the translation and relies upon language files for each language expressed as perl program files (.pm files).  
 
Within SM2 the package I18N is used as the basis for the translation and relies upon language files for each language expressed as perl program files (.pm files).  
   −
All non-english  ones are held in /usr/shared/smanager/lib/SrvMngr/I18N/Moduls/<panelname> and are installed from the smeserver-manager-locale rpm. The english .lex file is installed from the smeserver-manager rpm.
+
These .pm files are derived from the .lex files by the smanager-refresh action. The format is very similar, the main change is the adding of the perl program file bits around it. There is a set of lex files (one per language) for each SM2 menu entry., Each panel in a different directory.  
   −
These .pm files are derived from the .lex files by the smanager-refresh action.  
+
All non-english  ones are held in /usr/shared/smanager/lib/SrvMngr/I18N/Moduls/<panelname> and are installed from the smeserver-manager-locale rpm. The english .lex file is installed from the smeserver-manager rpm, but in the same directory structure.
 +
 
 +
Languages for which we currently have some translations done:<syntaxhighlight lang="python3">
 +
    {"language": "Bulgarian", "code": "bg"},
 +
    {"language": "Danish", "code": "dk"},
 +
    {"language": "German", "code": "de"},
 +
    {"language": "Greek", "code": "el"},
 +
    {"language": "Spanish", "code": "es"},
 +
    {"language": "Estonian", "code": "et"},
 +
    {"language": "French", "code": "fr"},
 +
    {"language": "Hebrew", "code": "il"},
 +
    {"language": "Hungarian", "code": "hu"},
 +
    {"language": "Indonesian", "code": "id"},
 +
    {"language": "Italian", "code": "it"},
 +
    {"language": "Japanese", "code": "jp"},
 +
    {"language": "Norwegian Bokmål", "code": "no"},
 +
    {"language": "Dutch", "code": "nl"},
 +
    {"language": "Polish", "code": "pl"},
 +
    {"language": "Brazilian Portuguese", "code": "pt-br"},
 +
    {"language": "Portuguese", "code": "pt"},
 +
    {"language": "Romanian", "code": "ro"},
 +
    {"language": "Russian", "code": "ru"},
 +
    {"language": "Slovenian", "code": "sl"},
 +
    {"language": "Swedish", "code": "sv"},
 +
    {"language": "Thai", "code": "th"},
 +
    {"language": "Turkish", "code": "tr"},
 +
    {"language": "Simplified Chinese", "code": "zh-cn"},
 +
    {"language": "Traditional Chinese", "code": "zh-tw"}
 +
</syntaxhighlight>There is some "disagreement" on the codes - e.g. Hebrew was "he", but should be "il", Japanese should be "Jp" but was "ja". Danish was "da"  - should be "dk".  A couple of others as well. And the Chinese ones seem to have a number of variations. The major european languages are fully covered, but the others not so much.
    
==== Weblate ====
 
==== Weblate ====
'''Weblate''' is a Python based web application that has been around for xxx years and is well described here: https://docs.weblate.org/en/latest/admin/install.html
+
'''Weblate''' is a Python based web application that has been around for at least 6 years and is well described here: https://docs.weblate.org/en/latest/admin/install.html It has a github repo : https://github.com/WeblateOrg/weblate/ and there is active support from at least one maintainer.
   −
It provides what I presume is the usual opportunities for manual and automatic language translation, and has project / component structure.
+
It provides what I presume is the usual opportunities for manual and automatic language translation, and has a project / component structure.
   −
It provides a number of different formats for input of the text to be translated, but not ".lex"  files. I have written a python program to convert them to .po files which are well supported. It can interact directly with the Gitea/git VCS and uses its own git VCS to hold the local files.  
+
It provides a number of different formats for input of the text to be translated, but not ".lex"  files. I have written a python program to convert them to .po files which are well supported.
 +
 
 +
Weblate can interact directly with the Gitea/git VCS and uses its own git VCS to hold the local files.
    
==== The PO Files ====
 
==== The PO Files ====
Line 33: Line 63:     
==== The Navigation menu ====
 
==== The Navigation menu ====
 +
 +
==== Testing in a Chromium based Browser ====

Navigation menu