Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
help_with_translation [2022/03/27 08:02] – add info about blacklisted words, reorganised headers atarihelp_with_translation [2024/08/16 01:03] (current) – fix inlink atari
Line 5: Line 5:
 ===== For translators ===== ===== For translators =====
  
-==== Translate for a new language ====+  - First check if someone has already started a translation on [[http://translations.batocera.org/|the translations page]]. Download the two ''*.pot'' files for your language you are going to add translations for. The two files are for EmulationStation-specific strings (ES file) and system-specific options (Options file). If starting a new language, download the ''*.pot'' files from the ''new language'' row in the table. 
 +  - Edit and then compile your translation files. You can use the [[https://poedit.net/|Poedit program]] on your desktop, or online with the [[https://localise.biz/free/poeditor|Poeditor tool]] to create the ''*.po'' and ''emulationstation2.mo'' files specific to your language.<WRAP center round important> 
 +If using a plain text editor to make your modifications instead, make sure it keeps the Unix end-of-line terminators. 
 +</WRAP> 
 +  - [[#test_your_translation|Test your translation]] to ensure no lines are cut-off in the UI, special characters appear as intended and most importantly that Batocera does not crash. 
 +  - Once you're happy with your translation, on the translation page click the region code of your language in the "Code" column and then upload the file to the appropriate "ES file" or "Options file" column on the right side. \\ {{:translation_steps.png|Screenshot showing the step order of clicks, from left to right, top to bottom.}}<WRAP center round tip> 
 +If it's a brand new language, please contact the dev team on the [[https://discord.gg/ndyUKA5|#translations-files channel of our Discord server]] to get your language added to the table. 
 +</WRAP>
  
-  - Download (right click on "Raw" and save) the current translation file (it's a PO text file with all the strings to be translated): +Thank you so much for your help!
-    * For EmulationStation-specific lines: https://github.com/batocera-linux/batocera-emulationstation/blob/master/locale/emulationstation2.pot +
-    * For Batocera-specific lines: https://github.com/batocera-linux/batocera.linux/blob/master/package/batocera/emulationstation/batocera-es-system/locales/batocera-es-system.pot +
-  - Download the current translation file [[https://github.com/batocera-linux/batocera-emulationstation/tree/master/locale/lang|from this directory]]. It's an ''emulationstation.po'' text file with all the strings to be translated. +
-  - Compile your ''emulationstation2.po'' file into ''emulationstation2.mo''. You can use the [[https://poedit.net/|Poedit program]] on your desktop, or online with the [[https://localise.biz/free/poeditor|Poeditor tool]] to create the ''emulationstation2.po'' and ''emulationstation2.mo'' files specific to your language. +
-  - [[#test_the_translation|Test your translation]]; ensure no lines are cut-off in the UI and that special characters appear as intended. +
-  - Once you're happy with your translation, you can submit a PR via Github, or send your ''.po'' file back to the dev team on the [[https://discord.gg/ndyUKA5|#translations channel of our Discord server]]. Only the ''.po'' files need to be uploaded, not the ''.mo'' files.+
  
-==== Translate missing strings for an already existing translation ==== +<WRAP center round tip> 
- +    * To see a list of the list of missing strings to be translated with their respective line numbers, click on the number in the **ES missing** and **Options missing** columns respectively
-  - See what is the current status of your language. You can [[https://mirrors.o2switch.fr/batocera/x86_64/beta/last/|check on this page]] to see the percentage of strings that are currently translated for each supported language in the latest stable version of Batocera. +    * If you see a "timericon after the file, it means that someone just uploaded a new translation file that hasn't been merged into GitHub yet
-  - Download (right click on "Raw" and save) the current translation file for your language: +</WRAP>
-    For EmulationStation-specific lines: https://github.com/batocera-linux/batocera-emulationstation/tree/master/locale/lang +
-    * For Batocera-specific lines: https://github.com/batocera-linux/batocera.linux/blob/master/package/batocera/emulationstation/batocera-es-system/locales +
-  - Open the ''emulationstation2.po'' or ''batocera-es-system.po'' file for your chosen language with either POEdit or an ordinary text editor like Notepad++. +
-  - Make your translation edits (your translation should be in the ''msgstr ""'' part in the double-quotes ("")) and save the file+
-  - [[#test_the_translation|Test your translation]]; ensure no lines are cut-off in the UI and that special characters appear as intended. +
-  - Get your ''.po'' file and put it into the #translations channel on our Discord server, mentioning which language it is for. Only the ''.po'' files need to be uploaded, not the ''.mo'' files+
-  - That's it. +
- +
-Thank you for your help!+
  
 ==== Test your translation ==== ==== Test your translation ====
Line 34: Line 26:
   - Connect to Batocera via [[:winscp|WinSCP]] (or [[:access_the_batocera_via_ssh|via SSH]]).   - Connect to Batocera via [[:winscp|WinSCP]] (or [[:access_the_batocera_via_ssh|via SSH]]).
   - Copy your ''emulationstation2.mo'' file to ''/usr/share/locale/<your language code>/LC_MESSAGES/'' -- for instance ''/usr/share/locale/pt_BR/LC_MESSAGES/emulationstation2.mo'' for Brazilian Portuguese.   - Copy your ''emulationstation2.mo'' file to ''/usr/share/locale/<your language code>/LC_MESSAGES/'' -- for instance ''/usr/share/locale/pt_BR/LC_MESSAGES/emulationstation2.mo'' for Brazilian Portuguese.
-  - On a keyboard connected to the Batocera machine, press ''[Alt]'' + ''[F4]'' (or run ''%%batocera-es-swissknife --restart%%'' if in SSH). +  - On a keyboard connected to the Batocera machine, press ''[Alt]'' + ''[F4]'' (or run ''%%batocera-es-swissknife --restart%%'' if in SSH) to refresh the language strings in ES
-  - You will see your translated strings.+  - Now explore ES to view all the strings you've translated!
  
 To keep your changes persistent between reboots, connect via SSH if you haven't already and run ''batocera-save-overlay'' to save the overlay. To keep your changes persistent between reboots, connect via SSH if you haven't already and run ''batocera-save-overlay'' to save the overlay.
  • help_with_translation.1648368173.txt.gz
  • Last modified: 4 years ago
  • by atari