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 [2023/02/09 00:40] – Description of the new (simplified) process lbrpdxhelp_with_translation [2024/08/16 01:03] (current) – fix inlink atari
Line 5: Line 5:
 ===== For translators ===== ===== For translators =====
  
-  - First check if someone has already started a translation on [[http://translations.batocera.org/|the translations page]]. +  - 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 forThe two files are for EmulationStation-specific strings (ES file) and system-specific options (Options file)If starting a new languagedownload the ''*.pot'' files from the ''new language'' row in the table
-  - If not, congratulations, you can start a brand new one! You can download the current translation files from the first line in the table (.POT is a PO text file with all the strings to be translated). There are actually two files: +  - 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> 
-    For EmulationStation-specific lines: https://github.com/batocera-linux/batocera-emulationstation/blob/master/locale/emulationstation2.pot +If using plain text editor to make your modifications instead, make sure it keeps the Unix end-of-line terminators. 
-    * For Batocera-specific lines: https://github.com/batocera-linux/batocera.linux/blob/master/package/batocera/emulationstation/batocera-es-system/locales/batocera-es-system.pot +</WRAP> 
-  - If you are improving an existing translation, you can check the current translation status by referring to [[http://translations.batocera.org/|the translations table]] and see: +  - [[#test_your_translation|Test your translation]] to ensure no lines are cut-off in the UIspecial characters appear as intended and most importantly that Batocera does not crash
-    * the list of missing strings to be translated with their respective line numbers when clicking on the number in the columns **ES missing** and **Options missing** respectively. +  - 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 righttop to bottom.}}<WRAP center round tip> 
-    * the current state of the translation fileswhich can be downloaded from the **ES files** and **Options files** columns respectively. +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. 
-    * If you see a "timer" icon after the file, it means that someone just uploaded a new translation file that hasn't been merged into GitHub yet. +</WRAP>
-   - Make your translation edits (your translation should be in the ''msgstr ""'' part in the double-quotes ("")) and save the file+
-  - Please compile your ''emulationstation2.po'' file into ''emulationstation2.mo'' (or ''batocera-es-system.po'' into ''batocera-system-system.mo'') and double check for errors. 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. +
-  If you use a text editor to make your modifications, please make sure it keeps the Unix line terminations. You can use Notepad++, or Vim or Emacs, but **not** Wordpad or most default Windows text editors+
-  - [[#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 click on the **Code** letters of your local language to have a menu open letting you upload your ''.po'' filesOnly the ''.po'' files need to be uploadednot the ''.mo'' files+
-  If it's a brand new language, please contact the dev team on the [[https://discord.gg/ndyUKA5|#translations channel of our Discord server]] to get your language added to the [[http://translations.batocera.org/|translations table]].+
  
 Thank you so much for your help! Thank you so much for your help!
 +
 +<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.
 +    * If you see a "timer" icon after the file, it means that someone just uploaded a new translation file that hasn't been merged into GitHub yet.
 +</WRAP>
  
 ==== Test your translation ==== ==== Test your translation ====
Line 27: 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.1675903207.txt.gz
  • Last modified: 3 years ago
  • by lbrpdx