Строка 57: |
Строка 57: |
| 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 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. |
| | | |
− | ===How to translate a mod=== | + | ===Как перевести мод=== |
− | # Install the mod normally. | + | # Просто установите мод. |
− | # Open the file you want to edit in its <samp>i18n</samp> folder. (If the file doesn't exist for your language yet, just copy <samp>default.json</samp> and rename it.) | + | # Откройте файл, который хотите отредактировать, в его папке <samp>i18n</samp>. (Если файл для вашего языка еще не существует, просто скопируйте <samp>default.json</samp> и переименуйте его.) |
− | # Edit the translations as needed (see ''[[#How translations work|how translations work]]'' above). | + | # Отредактируйте переводы по мере необходимости (смотрите ''[[#Как работают переводы|Как работают переводы]]''). |
− | # Launch the game and choose your language. The mod should show the translation text you entered. | + | # Запустите игру и выберите язык. Мод должен показать введенный вами текст перевода. |
− | # Send the edited file to the mod author, so they can add it to the official release. | + | # Отправьте отредактированный файл автору мода, чтобы он мог добавить его в официальный релиз. |
| | | |
− | '''Tips:''' | + | '''Советы:''' |
− | * If you see broken symbols in-game, try saving the translation file with UTF-8 encoding. | + | * Если вы видите в игре неработающие символы, попробуйте сохранить файл перевода в кодировке UTF-8. |
− | * You can test translation changes in-game without restarting the game. Enter <code>reload_i18n</code> into the SMAPI console to reload translations. (If a mod internally cached a translation, it may not be updated.) | + | * Вы можете протестировать изменения перевода в игре, не перезапуская игру. Введите <code>reload_i18n</code> в консоль SMAPI, чтобы перезагрузить переводы. (Если мод кэшировал перевод, он может быть не обновлён) |
| | | |
| ===How to provide mod translations=== | | ===How to provide mod translations=== |