Repository navigation
Translation guidelines
- First, create an account on Transifex using a proper nickname and a real email address.
- Your email address may be used to give you credit for your contributions, and so that we're able to contact you later if we need further translation help.
- Send a request to join a language team.
- Once your request has been approved, you can submit suggestions or translations directly through the Transifex interface, or by editing the PO file with an external editor, such as Poedit.
Many translation strings have carets (^) in them, which have differing meanings.
- Some are color codes, like
^BG,^TC,^F4, and^2. These are special color codes and are handled by the HUD/text rendering code. These codes always have the caret at the start. - Some are variables and placeholders, although these don't always have carets. These are codes that will be replaced with something else in the final text. These codes always have the caret at the start (if at all).
- Some are context prefixes.
These are used to give context to translators, group translations together, and to allow words with multiple meanings to be translated properly.
E.g. in the case of effect presets, we do:
PRE^Low,PRE^Medium, andPRE^High, to group them together, and so translators know "Low" means "less than average in amount" and not "a difficult time" or any other meanings. HerePRE^is the prefix. These codes always have the caret at the end of the prefix.
Rules:
- Keep color codes the same.
- Generally keep variables and placeholders the same, unless reordering placeholders.
- Remove the prefix and the
^from context prefixes. This isn't strictly necessary, but removing them will save a few CPU cycles. For example,PRE^Highshould becomeHigh(if translating to English).- Be careful not to confuse these with color codes or other intentional placements of
^. If in doubt, read the code - context sensitive lines of code which use this prefix will have aZCTX()orCTX()wrapper around the whole string. You can also refer to the list of prefixes, which is comprehensive.
- Be careful not to confuse these with color codes or other intentional placements of
It's not uncommon that translations would work better if strings were reordered.
To switch the order of two %s strings, replacing them with %2$s and %1$s respectively can be used to indicate they map to the first and second original %s string respectively.
For example, these have the same meaning:
"^BG%s^K1 was betrayed by ^BG%s"
"^BG%2$s^K1 betrayed ^BG%1$s"
More information can be found about this here.
When translating, try to adhere to the above, as well as:
-
Always match newlines and white space with translation strings: if a string has 4 spaces in the beginning of it in English, do the same thing for the translation. If a string has 2 newlines at the end of it, or one in the middle and another at the end, repeat the same thing in the translated string.
-
Always match variables in the strings properly. This may require reordering the placeholders.
-
Normally do not translate proper nouns, like most weapon names (excluding MachineGun, Shotgun, etc.) or gametype names, unless they make sense in your language to be translated. Mutators can be translated, but not mutators which have proper names, like InstaGib, or NIX which is an acronym.
-
Pay attention to capitalization - scoreboard columns for example are intended to be lowercase. In general, it's always a good idea to follow the context of the English writing, and make sure the capitalization matches in English (unless your language has some other grammatical rule that makes more sense here).
-
Strings that have no English words do not need to be translated, like
%s %s (%s%s)should not be translated. If you see these, please report them on https://gitlab.com/xonotic/xonotic-data.pk3dir/-/issues, as they should not have been added in the first place. There are some exceptions to this, like%sxused to translate text like a "2x" multiplier. -
If you are even slightly unsure of the context or meaning of a string, read the code or ask someone on Matrix. If you're still unable to be 100% sure, then mark your string as a suggestion on Transifex and move on, do not risk adding an improper translation.
-
Never pervert, profane, or mock a string that is not normally written as such in English. If there is no joke or gore in the English writing, do not add one in the translation. We must adhere to supporting
cl_gentle(a non-swearing, "E rated" version of the texts) even in translations.- Users who abuse the translation system (i.e. putting inappropriate language in places it should not be, advertisements, spam, or other such problems) will be banned from the translation system.
-
Overall, just try and write the translation in a way which fits your language best. If something is silly in English and it's okay to do it silly in your language, then go ahead; just try and make it match the English meaning as closely as possible.
After you have completed translations, please test them both in the menu and in game to make sure there aren't any mistakes - test your translations.
- WARNING: if you make a mistake while translating a notification system string, it can crash the game upon loading, as the notification system analyzes all strings and ensures they are written correctly! (See here, an earlier problem that was noticed on the old German translations: http://i.imgur.com/mePBYvO.jpg).
Original source of information here.