Diferenças entre edições de "Modificações:Traduções"

Fonte: Stardew Valley Wiki
Saltar para a navegação Saltar para a pesquisa
(<-- Índice)
m
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===

Revisão das 18h52min de 21 de abril de 2019

Índice

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.

Para tradutores

Como as traduções funcionam

Cada mod tem uma pasta i18n 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 default.json (que tem o texto Inglês padrão), mais qualquer destes arquivos:

Idioma Nome do arquivo
Chinês zh.json
Alemão de.json
Japonês ja.json
Português pt.json
Russo ru.json
Espanhol es.json

Cada arquivo contém um texto que se parece com isso:

{
   "chave-de-tradução": "texto traduzível simples",
   "chave-de-tradução-2": "texto traduzível com um valor {{token}}"
}

A primeira parte (antes de :) é a única chave para a tradução. Isto é como o mod identifica a tradução, então você não deverá a alterar.

A segunda parte (depois de :) é o texto de tradução, que você pode mudar. Às vezes, esse conterá um token, que se parece assim {{token}}; este será substituído por um texto diferente quando o mod roda, então você não deverá alterar o texto entre {{ e }}. Por exemplo, se o texto diz "Você tem {{count}} ouro", o jogador realmente veria algo como Você tem 500 ouro no jogo.

Como traduzir um mod

  1. Instale o mod normalmente.
  2. Abra nele o arquivo que você quer editar na pasta i18n. (Se o arquivo de seu idioma ainda não existe, apenas copie a default.json e a renomeie.)
  3. Edite as traduções conforme necessário (veja como as traduções funcionam acima).
  4. Inicie o jogo e escolha seu idioma. O mod deve mostrar o texto de tradução que você criou.
  5. Envie o arquivo editado para a autoria do mod, então ela pode o adicionar para o lançamento oficial.

Dicas:

  • Se você ver símbolos quebrados no jogo, tente salvar o arquivo de tradução com codificação UTF-8.
  • Você pode testar mudanças na tradução no jogo sem reiniciar o jogo. Digite reload_i18n 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

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:

  1. Create an account on GitHub.
  2. View the open translation requests. To only see requests for your language, click the 'Labels' dropdown and choose the needs: label for it.
  3. Click a request to see the details (including what the mod does, where to download it, and what translations are needed).
  4. Install the mod and edit the translations on your computer (see the previous section).
  5. 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

  1. Before you start:
    1. 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.
    2. 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.)
    3. 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.
    4. 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.
  2. 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.

  3. Watch your notifications so you know when someone contributes translations or answers a question!