Модификации:Руководство по переводу модификаций: различия между версиями
(→Как перевести мод: Переведена часть статьи "Как перевести мод") Метки: правка с мобильного устройства правка из мобильной версии |
Метки: правка с мобильного устройства правка из мобильной версии |
||
Строка 5: | Строка 5: | ||
==For translators== | ==For translators== | ||
− | ===Как | + | ===Как работают переводы=== |
У каждого мода есть папка <samp>i18n</samp>, содержащая файлы перевода(если он поддерживает перевод), которую вы можете открыть в обычном текстовом редакторе. В папке всегда есть файл <samp>default.json</samp> (с английским текстом по умолчанию), а также любой из следующих файлов: | У каждого мода есть папка <samp>i18n</samp>, содержащая файлы перевода(если он поддерживает перевод), которую вы можете открыть в обычном текстовом редакторе. В папке всегда есть файл <samp>default.json</samp> (с английским текстом по умолчанию), а также любой из следующих файлов: | ||
Версия 20:28, 22 мая 2022
← Индекс
Неполный перевод Эта статья или её часть до сих пор не переведены на русский язык.
Вы можете оказать помощь в переводе путем ее редактирования. |
Моды на SMAPI могут переведены на любой язык, который есть в Stardew Valley. Они будут автоматически использовать тот же язык, что и игра, и вернутся к тексту по умолчанию, если перевод отсутствует. На этой странице объясняется, как предоставить или запросить перевод.
For translators
Как работают переводы
У каждого мода есть папка i18n, содержащая файлы перевода(если он поддерживает перевод), которую вы можете открыть в обычном текстовом редакторе. В папке всегда есть файл default.json (с английским текстом по умолчанию), а также любой из следующих файлов:
Язык | Название файла |
---|---|
Китайский | zh.json |
Французский | fr.json |
Немецкий | de.json |
Венгерский | hu.json |
Итальянский | it.json |
Японский | ja.json |
Корейский | ko.json |
Португальский | pt.json |
Русский | ru.json |
Испанский | es.json |
Турецкий | tr.json |
Каждый файл содержит текст, который выглядит следующим образом:
{
"translation-key": "простой переводимый текст",
"translation-key-2": "переводимый текст со значением {{token}}"
}
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 {{token}}
; this will be replaced with different text when the mod runs, so you shouldn't change the text between {{
and }}
. For example, if the text says "You have {{count}} gold"
, the player would actually see something like You have 500 gold
in-game.
Как перевести мод
- Просто установите мод.
- Откройте файл, который хотите отредактировать, в его папке i18n. (Если файл для вашего языка еще не существует, просто скопируйте default.json и переименуйте его.)
- Отредактируйте переводы по мере необходимости (смотрите Как работают переводы).
- Запустите игру и выберите язык. Мод должен показать введенный вами текст перевода.
- Отправьте отредактированный файл автору мода, чтобы он мог добавить его в официальный релиз.
Советы:
- Если вы видите в игре неработающие символы, попробуйте сохранить файл перевода в кодировке UTF-8.
- Вы можете протестировать изменения перевода в игре, не перезапуская игру. Введите
reload_i18n
в консоль SMAPI, чтобы перезагрузить переводы. (Если мод кэшировал перевод, он может быть не обновлён)
How to provide mod translations
You can provide translations anytime. There's no commitment needed — your help is appreciated whether you only help once or keep coming back!
Here's the standard process:
- Create an account on GitHub.
- View the open translation requests. To only see requests for your language, click the 'Labels' dropdown and choose the
needs:
label for it. - Click a request to see the details (including what the mod does, where to download it, and what translations are needed).
- Install the mod and edit the translations on your computer (see the previous section).
- Copy your translation text, and paste it into a comment on the GitHub request. (If you're comfortable with GitHub, feel free to submit a pull request to the author instead.)
That's it! The mod author will add your translations to the mod, so it'll be available in your language in the next release.
Tips:
- If a mod has a lot of translations, feel free to only translate some of them. Someone else can finish the translations if needed.
For modders
Using translations
For help using translations, see Modding:Modder Guide/APIs/Translation.
Request translations
- Before you start:
- Your mod must be open-source on a public site like GitHub.
This is important for the modders curating the request list, since it lets them (a) check the current status of your mod translations to keep requests up-to-date, (b) answer questions from translators if needed, and (c) submit a pull request with any translations received when the ticket is closed if you stop responding. - If you have partial translations, copy any missing translations into all translation files and mark them with
// TODO
. (That way translators only need to look at their language's file, they don't need to compare it with default.json.) - Make sure you watch the request and you have time to reply to questions! Your request will be closed if you don't respond to a question on the ticket within 72 hours.
- The default.json must be complete and in English. If your main language isn't English and you need help preparing it, we can help! Just create a request the same way below, but choose
needs: English copyediting
as the label instead.
- Your mod must be open-source on a public site like GitHub.
- Create a request ticket with this info:
field what to enter title The mod name and version to translate. labels Choose the 'needs:' labels for the translations you need. (Don't add 'done:' labels, that's only for completed requests.) Description Provide the following information: - A brief summary of what your mod does, including a link to the mod page.
- A link to the open-source code.
- A download link if you're requesting translations for an unreleased version. (You can attach it directly to the request ticket.)
- If needed, an explanation of where the text appears, screenshots, etc.
Here's an example request which provides that info.
- Watch your notifications so you know when someone contributes translations or answers a question!