Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| help_with_translation [2021/10/26 04:07] – [What if I wanted to edit an English string?] atari | help_with_translation [2024/08/16 01:03] (current) – fix inlink atari | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| 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 I help? ===== | + | ===== For translators |
| - | ==== Translate | + | - First check if someone has already started a translation on [[http:// |
| + | - 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. | ||
| + | </ | ||
| + | - [[# | ||
| + | - Once you're happy with your translation, | ||
| + | If it's a brand new language, please contact the dev team on the [[https:// | ||
| + | </ | ||
| - | - See what is the current status of your language. You can [[https:// | + | Thank you so much for your help! |
| - | - Download the current translation file [[https:// | + | |
| - | - Compile your '' | + | |
| - | - Connect to your [[access_the_batocera_via_ssh|batocera through SSH]]. | + | |
| - | - Copy your '' | + | |
| - | - Open the command console (SSH terminal) and execute the command '' | + | |
| - | - Restart your Batocera. | + | |
| - | - Once you're happy with your translation, | + | |
| - | ==== Translate | + | <WRAP center round tip> |
| + | * To see a list of the list of missing strings | ||
| + | * If you see a " | ||
| + | </ | ||
| - | - Open the ''/ | + | ==== Test your translation |
| - | - Make your translation | + | |
| - | - Get your '' | + | |
| - | - That's it. | + | |
| - | Thank you for your help! | + | - 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! | ||
| - | ===== What if I wanted to edit an English string? | + | 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 and think that the string to be translated might be a bit ambiguous for translators (remember, they will only see the string in isolation, which might not make sense outside of its context), you can add a comment just for translators to see when they get to that string. In EmulationStation or 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 or the model name of a retro system? | ||
| + | |||
| + | 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, | Generally editing already-existing English strings in the CPP files is discouraged, | ||
help_with_translation.1635221233.txt.gz · Last modified: by atari