Linha 1: |
Linha 1: |
− | {{Traduzir}}
| |
| ← [[Modificações:Índice|Índice]] | | ← [[Modificações:Índice|Índice]] |
| | | |
− | SMAPI mods can be translated into any language the game supports. They'll automatically use the same language as the game, and will fallback to the default text if a translation is missing. This page explains how to provide or request translations. | + | Mods SMAPI podem ser traduzidos para qualquer idioma que o jogo suporte. Eles irão automaticamente usar o mesmo idioma do jogo, e usará o texto padrão quando uma tradução estiver faltando. Esta página explica como fornecer ou solicitar traduções. |
| | | |
− | ==For translators== | + | ==Para tradutores== |
− | ===How translations work=== | + | ===Como as traduções funcionam=== |
− | Each mod has an <tt>i18n</tt> folder containing the translation files, which you can open in a normal text editor like Notepad. The folder always has a <tt>default.json</tt> (which has the default English text), plus any of these files:
| + | Cada mod tem uma pasta <tt>i18n</tt> contendo os arquivos de tradução, que você pode abrir em editor de texto comum, como o Bloco de Notas. A pasta sempre tem uma <tt>default.json</tt> (que tem o texto Inglês padrão), mais qualquer destes arquivos: |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
− | ! Language | + | ! Idioma |
− | ! File name | + | ! Nome do arquivo |
| |- | | |- |
− | | Chinese | + | | Chinês |
| | <tt>zh.json</tt> | | | <tt>zh.json</tt> |
| |- | | |- |
− | | German | + | | Alemão |
| | <tt>de.json</tt> | | | <tt>de.json</tt> |
| |- | | |- |
− | | Japanese | + | | Japonês |
| | <tt>ja.json</tt> | | | <tt>ja.json</tt> |
| |- | | |- |
− | | Portuguese | + | | Português |
| | <tt>pt.json</tt> | | | <tt>pt.json</tt> |
| |- | | |- |
− | | Russian | + | | Russo |
| | <tt>ru.json</tt> | | | <tt>ru.json</tt> |
| |- | | |- |
− | | Spanish | + | | Espanhol |
| | <tt>es.json</tt> | | | <tt>es.json</tt> |
| |} | | |} |
| | | |
− | Each file contains text that looks like this:
| + | Cada arquivo contém um texto que se parece com isso: |
| <source lang="javascript"> | | <source lang="javascript"> |
| { | | { |
− | "translation-key": "simple translatable text", | + | "chave-de-tradução": "texto traduzível simples", |
− | "translation-key-2": "translatable text with a {{token}} value" | + | "chave-de-tradução-2": "texto traduzível com um valor {{token}}" |
| } | | } |
| </source> | | </source> |
| | | |
− | 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.
| + | A primeira parte (antes de <code>:</code>) é a única chave para a tradução. Isto é como o mod identifica a tradução, então você não deverá a alterar. |
| | | |
− | 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.
| + | A segunda parte (depois de <code>:</code>) é o texto de tradução, que você pode mudar. Às vezes, esse conterá um token, que se parece assim <code><nowiki>{{token}}</nowiki></code>; este será substituído por um texto diferente quando o mod roda, então você não deverá alterar o texto entre <code><nowiki>{{</nowiki></code> e <code><nowiki>}}</nowiki></code>. Por exemplo, se o texto diz <code><nowiki>"Você tem {{count}} ouro"</nowiki></code>, o jogador realmente veria algo como <code>Você tem 500 ouro</code> no jogo. |
| | | |
− | ===How to translate a mod=== | + | ===Como traduzir um mod=== |
− | # Install the mod normally. | + | # Instale o mod normalmente. |
− | # Open the file you want to edit in its <tt>i18n</tt> folder. (If the file doesn't exist for your language yet, just copy <tt>default.json</tt> and rename it.) | + | # Abra nele o arquivo que você quer editar na pasta <tt>i18n</tt>. (Se o arquivo de seu idioma ainda não existe, apenas copie a <tt>default.json</tt> e a renomeie.) |
− | # Edit the translations as needed (see ''[[#How translations work|how translations work]]'' above). | + | # Edite as traduções conforme necessário (veja ''[[#Como as traduções funcionam|como as traduções funcionam]]'' acima). |
− | # Launch the game and choose your language. The mod should show the translation text you entered. | + | # Inicie o jogo e escolha seu idioma. O mod deve mostrar o texto de tradução que você criou. |
− | # Send the edited file to the mod author, so they can add it to the official release. | + | # Envie o arquivo editado para a autoria do mod, então ela pode o adicionar para o lançamento oficial. |
| | | |
− | '''Tips:''' | + | '''Dicas:''' |
− | * If you see broken symbols in-game, try saving the translation file with UTF-8 encoding. | + | * Se você ver símbolos quebrados no jogo, tente salvar o arquivo de tradução com codificação 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.) | + | * Você pode testar mudanças na tradução no jogo sem reiniciar o jogo. Digite <code>reload_i18n</code> no console do SMAPI para recarregar traduções. (Se um mod armazenou internamente a tradução, ela não pode ser recarregada.) |
| | | |
| ===How to provide mod translations=== | | ===How to provide mod translations=== |