Строка 5: |
Строка 5: |
| | | |
| ==For translators== | | ==For translators== |
− | ===How translations work=== | + | ===Как работает перевод=== |
− | Each mod has an <samp>i18n</samp> folder containing the translation files (if it supports translation), which you can open in a normal text editor like Notepad. The folder always has a <samp>default.json</samp> (which has the default English text), plus any of these files:
| + | У каждого мода есть папка <samp>i18n</samp>, содержащая файлы перевода(если он поддерживает перевод), которую вы можете открыть в обычном текстовом редакторе. В папке всегда есть файл <samp>default.json</samp> (с английским текстом по умолчанию), а также любой из следующих файлов: |
| | | |
| {|class="wikitable" | | {|class="wikitable" |
| |- | | |- |
− | ! Language | + | ! Язык |
− | ! File name | + | ! Название файла |
| |- | | |- |
− | | Chinese | + | | Китайский |
| | <samp>zh.json</samp> | | | <samp>zh.json</samp> |
| |- | | |- |
− | | French | + | | Французский |
| | <samp>fr.json</samp> | | | <samp>fr.json</samp> |
| |- | | |- |
− | | German | + | | Немецкий |
| | <samp>de.json</samp> | | | <samp>de.json</samp> |
| |- | | |- |
− | | Hungarian | + | | Венгерский |
| | <samp>hu.json</samp> | | | <samp>hu.json</samp> |
| |- | | |- |
− | | Italian | + | | Итальянский |
| | <samp>it.json</samp> | | | <samp>it.json</samp> |
| |- | | |- |
− | | Japanese | + | | Японский |
| | <samp>ja.json</samp> | | | <samp>ja.json</samp> |
| |- | | |- |
− | | Korean | + | | Корейский |
| | <samp>ko.json</samp> | | | <samp>ko.json</samp> |
| |- | | |- |
− | | Portuguese | + | | Португальский |
| | <samp>pt.json</samp> | | | <samp>pt.json</samp> |
| |- | | |- |
− | | Russian | + | | Русский |
| | <samp>ru.json</samp> | | | <samp>ru.json</samp> |
| |- | | |- |
− | | Spanish | + | | Испанский |
| | <samp>es.json</samp> | | | <samp>es.json</samp> |
| |- | | |- |
− | | Turkish | + | | Турецкий |
| | <samp>tr.json</samp> | | | <samp>tr.json</samp> |
| |} | | |} |
| | | |
− | Each file contains text that looks like this:
| + | Каждый файл содержит текст, который выглядит следующим образом: |
| <syntaxhighlight lang="javascript"> | | <syntaxhighlight lang="javascript"> |
| { | | { |
− | "translation-key": "simple translatable text", | + | "translation-key": "простой переводимый текст", |
− | "translation-key-2": "translatable text with a {{token}} value" | + | "translation-key-2": "переводимый текст со значением {{token}}" |
| } | | } |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | The first part (before <code>:</code>) is the unique key for the translation. This is how the mod identifies the translation, so you shouldn't change it. | + | The first part (before <cоde>:</cоde>) is the unique key for the translation. This is how the mod identifies the translation, so you shouldn't change it. The second part (after <cоde>:</cоde>) is the translation text, which you can change. Sometimes this will contain a token, which looks like <code><nowiki>{{token}}</nowiki></code>; this will be replaced with different text when the mod runs, so you shouldn't change the text between <code><nowiki>{{</nowiki></code> and <code><nowiki>}}</nowiki> </code>. For example, if the text says <code><nowiki>"You have {{count}} gold"</nowiki></code>, the player would actually see something like <code>You have 500 gold</code> in-game. |
− | | |
− | The second part (after <code>:</code>) is the translation text, which you can change. Sometimes this will contain a token, which looks like <code><nowiki>{{token}}</nowiki></code>; this will be replaced with different text when the mod runs, so you shouldn't change the text between <code><nowiki>{{</nowiki></code> and <code><nowiki>}}</nowiki></code>. For example, if the text says <code><nowiki>"You have {{count}} gold"</nowiki></code>, the player would actually see something like <code>You have 500 gold</code> in-game. | |
| | | |
| ===How to translate a mod=== | | ===How to translate a mod=== |