4.2 KiB
Contributing
At this moment this page needs to be created.
For now you can use our article from the Git Hub repository Wiki written by ReinforceZwei.
Translations
MCC 现在支持这些语言(按字母顺序排列):
de.ini: Deutsch - Germanen.ini: English - Englishfr.ini: Français (France) - Frenchru.ini: Русский (Russkiy) - Russianvi.ini: Tiếng Việt (Việt Nam) - Vietnamesezh-Hans.ini: 简体中文 - Chinese Simplifiedzh-Hant.ini: 繁體中文 - Chinese Traditional
Add new translation
-
First you need to get the name of the translated file.
- Visit this link and find the first occurrence of the language you need to translate in the table below.
- Use the language code of the row in the table as the name of the translation file.
- For example:
English-> rowEnglish 0x0009->en->en.iniChinese (Traditional)-> rowChinese (Traditional) 0x7C04->zh-Hant->zh-Hant.ini
-
Which system languages are recommended to use this translation?
- Still check the table in this link, one language may have multiple rows.
- You will need to indicate which language codes this translation applies to.
- For example:
- Translation
de.iniapplies tode,de-AT,de-BE,de-DE, ... - Translation
zh-Hans.iniapplies tozh-Hans,zh,zh-CN,zh-SG.
- Translation
-
Which game languages are recommended to use this translation?
- Check out the table in this link, where the
Locale Codecolumn indicates the language code in minecraft. - You will need to indicate which locale codes this translation applies to.
- For example:
- Translation
fr.iniapplies tofr_ca,fr_fr. - Translation
zh-Hans.iniapplies tozh_cn.
- Translation
- Check out the table in this link, where the
-
Add the new translation to the code. (Optional) (Optional)
- If you are not familiar with programming, you can skip this step and just write the above information in your PR or issue.
- Add the newly created translation file
xx.inito the project/Resources/lang/xx.ini. - Open
/DefaultConfigResource.resx. - Click
Add Resources. - Choose
/Resources/lang/xx.ini. - Rename the added resource file in
/DefaultConfigResource.resxtoTranslation_xx. - Open
/Translations.cs. - Find
public static Tuple<string, string[]> GetTranslationPriority(); - Update the mapping of system language codes to translation files.
- Find
public static string[] GetTranslationPriority(string gameLanguage); - Update the mapping of game locale code to translation files.
-
Follow the section "Update existing translation".
Update existing translation
-
Visit the lang folder, download
en.iniand the language you want to translate(xx.ini). -
Compare
en.iniandxx.iniand update outdated or non-existent entries inxx.ini. -
Once you finished the translation work, submit a pull request or send us the file through an Issue in case you are not familiar with Git.
Translate README.md
-
Get the English version of the README.md from here.
-
See
Add new translation -> 1.for the target language code. Assume it isxx. Assume it isxx. -
Complete the translation according to the English README.md and name the translated version as
README-xx.md. -
In the English README, above the "About" section, add the name of the language and a hyperlink to
README-xx.md.