Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| help_with_translation [2021/09/10 12:16] – fixed the link showing translation status atari | help_with_translation [2024/08/16 01:03] (current) – fix inlink atari | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | =====Help with translation===== | + | ====== Help with Translation ====== |
| Batocera comes in a variety of local languages, and relies on the community to help with the translations. We need you for this! | Batocera comes in a variety of local languages, and relies on the community to help with the translations. We need you for this! | ||
| - | ===How can you help?=== | + | ===== For translators ===== |
| - | - See what is the current status of your language. You can [[https://mirrors.o2switch.fr/ | + | - First check if someone has already started a translation on [[http://translations.batocera.org/|the translations |
| - | - Download the current translation file [[https:// | + | - Edit and then compile your translation files. You can use the [[https:// |
| - | | + | If using a plain text editor to make your modifications instead, make sure it keeps the Unix end-of-line terminators. |
| - | - Connect | + | </ |
| - | - Copy your '' | + | - [[# |
| - | - Open command console | + | - Once you're happy with your translation, |
| - | - Restart your Batocera | + | If it's a brand new language, please contact the dev team on the [[https:// |
| - | - Once you're happy with your translation, you can submit | + | </ |
| + | |||
| + | 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 " | ||
| + | </ | ||
| + | |||
| + | ==== Test your translation ==== | ||
| + | |||
| + | - Merge the '' | ||
| + | - Connect to Batocera via [[: | ||
| + | - Copy your '' | ||
| + | - On a keyboard connected to the Batocera machine, press '' | ||
| + | - Now explore ES to view all the strings you've translated! | ||
| + | |||
| + | To keep your changes persistent between reboots, connect via SSH if you haven' | ||
| + | |||
| + | ===== For developers ===== | ||
| + | |||
| + | ==== Manually add in a line to be translated ==== | ||
| + | |||
| + | If there is a line in EmulationStation that does not have a string entry in the PO file, then it can be manually added in with the fake_gettext library: | ||
| + | |||
| + | < | ||
| + | #define fake_gettext_stringname pgettext(" | ||
| + | </ | ||
| + | |||
| + | For example: | ||
| + | |||
| + | < | ||
| + | #define fake_gettext_flatten_glow pgettext(" | ||
| + | </ | ||
| + | |||
| + | Place this into the top of the function which contains the untranslated string and upon next compilation it will be added to all the relevant PO files. | ||
| + | |||
| + | ==== Add a comment in the code for translators ==== | ||
| + | |||
| + | If you are coding something new in Batocera | ||
| + | |||
| + | < | ||
| + | /* TRANSLATION: | ||
| + | </ | ||
| + | |||
| + | For example, this is something that has been added to '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ==== Blacklisted words ==== | ||
| + | |||
| + | What if you want to add in a string that's explicitly not meant to be translated, such as a proper noun, technical code string | ||
| + | |||
| + | Most of these kinds of strings should be automatically picked up and removed by the '' | ||
| + | |||
| + | Such words can be manually appended to https:// | ||
| + | |||
| + | ==== What if I wanted to edit an English string? ==== | ||
| + | |||
| + | Generally editing already-existing English strings in the CPP files is discouraged, | ||
| + | |||
| + | The best way to go about this is to [[https://github.com/ | ||
| + | |||
| + | Understandably, | ||
| + | |||
| + | <WRAP center round alert> | ||
| + | This method does cause corruption when re-imported back into POEdit, so double check that first before re-merging. | ||
| + | </ | ||
| + | |||
| + | - Download and install the [[http:// | ||
| + | - Run '' | ||
| + | - Set the **Dir** to the root of the '' | ||
| + | - Add '' | ||
| + | - Set **Encoding** to '' | ||
| + | - Put in the original string you want to replace into the **Find** textbox. | ||
| + | - Click **Find Only** to test to see which strings it finds. This is important, especially if also editing CPP files, as it ensures you aren't accidentally overwriting code. If you want to be safe, enclose your find text in double-quotes ("" | ||
| + | - Put in the new string you want to replace it with into the **Replace** textbox. | ||
| + | - Click **Replace** (the button... not the textbox label). | ||
| + | |||
| + | If you aren't sure of the setup, here's a professional grade pictograph detailing the settings that have been changed from default: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Since you've already cloned batocera-emulationstation, | ||
| + | |||
| + | - Open the afflicted text file with Notepad++. | ||
| + | - Click **Encoding** -> **UTF-8**. You'll notice that it was originally on " | ||
| + | - Save the file. | ||
| + | - Rinse and repeat for all afflicted text files. | ||
| + | |||
| + | This should get rid of the extra character at the beginning of the text files. | ||
| - | Thank you for your help! | ||
help_with_translation.1631276192.txt.gz · Last modified: by atari