====== Language Translations ====== JudoShiai has two independent language selections, one for the graphical user interface (GUI) and the other one for the sheet and results printing. Independent language selections are required, because * Officials may be able to run the JudoShiai using the English GUI whilst some part of the audience prefer their own language. The GUI has more than 700 phrases to translate while printing the results use only less than 70 phrases. Thus it is easy to translate the sheet and result texts. * Officials want to use their own language if it is available, but in an international tournament the results must be in English. Language files for the GUI are here: [[https://sourceforge.net/p/judoshiai/judoshiai/ci/master/tree/common/|PO files]] Download one of the files with the extension .po (for example judoshiai-es_ES.po). Language files for the result texts are here: [[https://sourceforge.net/p/judoshiai/judoshiai/ci/master/tree/etc/|Result text files]] Select one of the files starting with result-texts, for example result-texts-es.txt. Select the files closest to your own language and change the phrases. ===== PO file ===== A PO file is composed of lines starting with ''msgid'' and ''msgstr''. ''Msgid'' is the phrase in English and ''msgstr'' in other language. Example from the Spanish translation: msgid "Next:" msgstr "Siguiente:" msgid "Match" msgstr "Combate" To create a new GUI translation get an existing PO file and rename it according to your own language. The locale code ''es_ES'' is composed of two parts: the language and the country. For example the code for the American English would be ''en_US'' and the file name thus ''judoshiai-en_US.po''. Replace all the ''msgstr'' texts with your own language phrases. ===== Result texts ===== The result texts file has comment lines and text lines. Comment lines start with three hash marks (###). Comment text tells which phrase is expected. Translated text is on the next line. Example: ### 15: Match Comb. ### 16: Blue Azul ### 17: White Blanco ### 18: Result (result of one fight) Resultado ### 19: Results (all the results of the tournament) Clasificación The first non-comment line is the language selection text visible in JudoShiai. Example file above begins like this: ### First line is the menu text Results in Spanish ### 1: Competitors Competidores . . . ===== Encoding ===== Use UTF-8 encoding. In Windows environment it is recommended to use [[https://notepad-plus-plus.org/|Notepad++]]. If the PO or text files look confusing you may just provide the translations using plain text, Microsoft, OpenOffice, or whatever format suits you the best. ===== Misc ===== PO files are compiled and it is not possible to add them without recompilation. However, result text files can be added any time. Copy for example ''result-texts-en.txt'' to ''result-texts-xx.txt'' (these files are in the ''etc'' folder). Edit as you wish and copy the file to the ''etc'' folder (''C:\Program Files\JudoShiai\etc''). Restart JudoShiai. Now you should see your new language in the JudoShiai menu //Preferences -> Language Selection// ===== User Guide ===== [[https://sourceforge.net/p/judoshiai/judoshiai/ci/master/tree/doc/judoshiai-en.odt|User Guide]] can be translated. The file is in odt format and edited using LibreOffice.