In order to edit this wiki, you must register and verify your account.

Tutorial:How to translate Cemu UI: Difference between revisions

From Cemu Wiki
Jump to:navigation Jump to:search
(Add info about ampersands in strings)
(Remove outdated glossary entries)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Tutorial==
==Tutorial==
*Download and install your favorite PO editing tool, e.g. [https://poedit.net/ Poedit].
*Download and install your favorite PO editing tool, e.g. [https://poedit.net/ Poedit].
*Choose the language you want to translate:
*Choose the language you want to translate and either:
**fetch the latest PO file for an existing language from [https://github.com/TeamCemu/Cemu-Language/tree/master/resources here] and open it
**fetch the latest PO file for an existing language from [https://github.com/TeamCemu/Cemu-Language/tree/master/resources here] and open it; ''or''
**create a new translation and use the English [https://github.com/TeamCemu/Cemu-Language/blob/master/resources/en/cemu.pot cemu.pot file] as source
**create a new translation and use the English [https://github.com/TeamCemu/Cemu-Language/blob/master/resources/en/cemu.pot cemu.pot file] as source
*Submit your finished work (just the PO file) by either using a GitHub pull request (learn about them [https://help.github.com/articles/creating-a-pull-request/ here]), or by sending it in Discord to one of the users listed below.
*Submit your finished work (just the PO file) by [https://github.com/TeamCemu/Cemu-Language/pulls making a pull request] to the GitHub repository (learn about them [https://help.github.com/articles/creating-a-pull-request/ here])


==General translation guidelines==
==General translation guidelines==
* '''Don't overtranslate technical terms.''' Translate English technical terms (e.g. ''stack, v-sync, upscaling'' etc.) into your language only if there's a commonly used equivalent word. In a nutshell: ''avoid literal translations that don't mean anything.'' If in doubt, use your country's Wikipedia for reference or check how the same word has been translated in other programs. If both the original and the translated term are used in your language, stick to the most commonly used one.
* '''Don't overtranslate technical terms.''' Translate English technical terms (e.g. ''stack, v-sync, upscaling'' etc.) into your language only if there's a commonly used equivalent word. In a nutshell: ''avoid literal translations that don't mean anything.'' If in doubt, use your country's Wikipedia for reference or check how the same word has been translated in other programs ([https://www.microsoft.com/en-us/language/ Microsoft Terminology Database] is a great place where you can look for this!). If both the original and the translated term are used in your language, stick to the most commonly used one.
* '''Keep your work updated, if you can.''' Cemu is an actively mantained project and updates often brings new strings and/or remove some old ones. Therefore you are encouraged to update your translation whenever the English .pot file is updated by Cemu developers. In Poedit, you can do so by clicking ''Catalogue -> Update from POT file'' and selecting the new .pot. No hurry needed :)
* '''Ampersands within words are not mistakes.''' They are positioned just before the letter that is used to determine the keyboard shortcut for the menu entry corresponding to that string. You are free to change their position if you find appropriate to do so. (Just don't add them in strings in which they are not present)
* '''Ampersands within words are not mistakes.''' They are positioned just before the letter that is used to determine the keyboard shortcut for the menu entry corresponding to that string. You are free to change their position if you find appropriate to do so. (Just don't add them in strings where they are not present!)
* '''Keep placeholders as-is.''' Some strings contain placeholders which are delimited by curly braces (for example <code>{}</code> or <code>{:08x}</code>). These placeholders must be copied to the translation exactly as they appear in the original string (you '''must NOT''' use locale-specific variations of the characters), otherwise translated messages will be displayed incorrectly.
* '''Disagree with a translation made by another user?''' There are [https://github.com/TeamCemu/Cemu-Language/issues GitHub issues] to give contributors the opportunity to discuss their opinions and reach a conclusion. Just use them if you feel like it.
* '''Keep your work updated, if you can.''' Cemu is an actively maintained project and updates often add new strings or change existing ones. Therefore it is greatly appreciated if you update your translation whenever the English .pot file gets updated by Cemu developers. In Poedit, you can do so by clicking ''Catalogue -> Update from POT file'' and selecting the updated cemu.pot file. No hurry needed :)
* '''Want to discuss translations?''' You can comment on [https://github.com/TeamCemu/Cemu-Language/pulls open PRs] if you want to engage translators in a discussion on their work or [https://github.com/TeamCemu/Cemu-Language/issues create a new issue] on the repository to report errors or other problems in existing translations.
 
==Glossary==
Here you can find the explanation for some specific terms that you will encounter while translating Cemu:
* '''title''': a piece of software that can be installed on a Wii U. It can be a ''game'', an ''update'' or a ''DLC''.
* '''WUD''' (or ''wud''): a file containing a dump of a Wii U game disk (acronym for "Wii U Disk")
* '''thread quantum''': refers to CPU scheduling. In the context of Cemu, it is the amount of time that a game thread is allowed to run before Cemu suspends it and lets another thread to run (this is also known as "performing a context switch"). It is very likely that your language has a specific, technical translation of this term.


==Testing/Using new languages==
==Testing/Using new languages==
Line 21: Line 28:
# Use the menu bar: File -> Compile to MO...
# Use the menu bar: File -> Compile to MO...
# Select the correct folder as destination
# Select the correct folder as destination
==Repository mantainers==
These Discord users have write access to the [https://github.com/TeamCemu/Cemu-Language GitHub repository] and can update files.
If you're not a member of our Discord server yet, you can join us [https://discord.gg/5psYsup here].
*Petergov#3780
*Fs00#9393


[[Category:List of tutorials|How to translate Cemu UI]]
[[Category:List of tutorials|How to translate Cemu UI]]

Latest revision as of 10:59, 25 September 2022

Tutorial

  • Download and install your favorite PO editing tool, e.g. Poedit.
  • Choose the language you want to translate and either:
    • fetch the latest PO file for an existing language from here and open it; or
    • create a new translation and use the English cemu.pot file as source
  • Submit your finished work (just the PO file) by making a pull request to the GitHub repository (learn about them here)

General translation guidelines

  • Don't overtranslate technical terms. Translate English technical terms (e.g. stack, v-sync, upscaling etc.) into your language only if there's a commonly used equivalent word. In a nutshell: avoid literal translations that don't mean anything. If in doubt, use your country's Wikipedia for reference or check how the same word has been translated in other programs (Microsoft Terminology Database is a great place where you can look for this!). If both the original and the translated term are used in your language, stick to the most commonly used one.
  • Ampersands within words are not mistakes. They are positioned just before the letter that is used to determine the keyboard shortcut for the menu entry corresponding to that string. You are free to change their position if you find appropriate to do so. (Just don't add them in strings in which they are not present)
  • Keep placeholders as-is. Some strings contain placeholders which are delimited by curly braces (for example {} or {:08x}). These placeholders must be copied to the translation exactly as they appear in the original string (you must NOT use locale-specific variations of the characters), otherwise translated messages will be displayed incorrectly.
  • Keep your work updated, if you can. Cemu is an actively maintained project and updates often add new strings or change existing ones. Therefore it is greatly appreciated if you update your translation whenever the English .pot file gets updated by Cemu developers. In Poedit, you can do so by clicking Catalogue -> Update from POT file and selecting the updated cemu.pot file. No hurry needed :)
  • Want to discuss translations? You can comment on open PRs if you want to engage translators in a discussion on their work or create a new issue on the repository to report errors or other problems in existing translations.

Glossary

Here you can find the explanation for some specific terms that you will encounter while translating Cemu:

  • title: a piece of software that can be installed on a Wii U. It can be a game, an update or a DLC.
  • WUD (or wud): a file containing a dump of a Wii U game disk (acronym for "Wii U Disk")
  • thread quantum: refers to CPU scheduling. In the context of Cemu, it is the amount of time that a game thread is allowed to run before Cemu suspends it and lets another thread to run (this is also known as "performing a context switch"). It is very likely that your language has a specific, technical translation of this term.

Testing/Using new languages

If you want to test your translation or use an existing translation from the repository/another user, simply create the folder with the correct language code in "cemu/resources" and insert the compiled "cemu.mo" file.

Supported language codes can be found here: language codes.

You can use Poedit to compile a MO file:

  1. Open the PO
  2. Use the menu bar: File -> Compile to MO...
  3. Select the correct folder as destination