Ajuda:Extensão: Translate/Administração da tradução da página
- Como traduzir
- Melhores práticas
- Estatísticas e relatórios
- Garantia de qualidade
- Estatísticas do grupo de mensagens
- Tradução off-line
- Glossário
Administradores de tradução
- Como preparar uma página para tradução
- Administração da tradução de páginas
- Tradução de elementos não estruturados
- Gestão de grupos
- Mover página traduzível
- Importar traduções via CSV
- Trabalhar com conjuntos de mensagens
Administradores de sistema e programadores
Esta página está relacionada com as melhores práticas de tradução das páginas destinadas aos administradores de tradução de páginas e a qualquer pessoa que edite o texto de origem das páginas traduzidas. Por um guia simplificado, consulte o tutorial da tradução da página. |
O quê. A funcionalidade de tradução da página permite uma tradução controlada das páginas wiki para outros idiomas. Isto significa que o conteúdo da página traduzida é, normalmente, equivalente ao da página original. Isto é o oposto, por exemplo, das diferentes versões por idioma da mesma página nas diversas Wikipédias, que são completamente independentes entre si. Parte-se do princípio que as páginas só são traduzidas a partir da versão no idioma original, mas os tradutores podem aproveitar as traduções noutros idiomas, se existirem.
Porquê. Sem qualquer ajuda, traduzir mais do que algumas páginas para outros idiomas torna-se uma perda de tempo, na melhor das hipóteses, e numa confusão insustentável, no pior. Com a funcionalidade de tradução de páginas pode evitar esta confusão e estruturar o processo de tradução. A ideia central é segmentar o texto de origem em unidades menores, cada uma das quais será traduzida individualmente. Quando o texto de origem é segmentado em unidades, as alterações podem ser isoladas e os tradutores só precisam de atualizar a tradução das unidades que sofreram alterações no texto original. Isto também permite que os tradutores trabalhem em unidades de tamanho reduzido e possam dividir o esforço entre vários tradutores ou continuar a tradução em sessões posteriores, porque não precisam de fazer a tradução toda de uma só vez.
Quem. Esta página elabora o tutorial de tradução de páginas com uma descrição mais detalhada da forma como o sistema funciona, e sugere as melhores práticas para uma ampla variedade de casos. Esta página destina-se aos "administradores da tradução de páginas" e, em geral, a todos aqueles que editam o texto original das páginas traduzíveis, mesmo que não tenham acesso às funcionalidades administrativas de aprovação das alterações para tradução.
A duração de uma página traduzível
Funções. O processo de criação e tradução de uma página da wiki envolve várias pessoas: o editor inicial cria a página, alguém corrige erros de ortografia, um administrador de traduções marca a página para tradução, os tradutores traduzem-na, alguém altera a página original, um administrador de traduções marca as alterações para tradução e os tradutores atualizam a tradução dos segmentos alterados. Estas funções podem sobrepor-se em maior ou menor grau, mas a responsabilidade final por uma tradução sem problemas é deixada para o administrador de traduções. É o administrador quem decide que a página está pronta para a tradução inicial, quem garante que a segmentação serve o seu propósito e quem aprova (ou corrige) alterações.
Preparação. Para um texto ser traduzido tem primeiro que ser escrito. Se já traduziu sem a extensão Translate, consulte abaixo a secção sobre migração de traduções. Se pretende obter bastantes traduções rapidamente, é fundamental que o texto de origem esteja em boas condições. Antes de marcar uma página para tradução, peça a alguém que a reveja e, se possível, recorra a um linguista para tornar o texto mais claro e conciso. As palavras pouco comuns e as frases complexas são difíceis de traduzir. Os elementos de formatação também podem causar problemas aos tradutores, mas, na função de administrador de traduções, pode evitar esses problemas; consulte abaixo a secção sobre elementos de formatação. Naturalmente, as alterações ao texto original forçam a atualização de todas as traduções existentes, por isso, é melhor esperar até o conteúdo da página estar estabilizado. Por outro lado, alterações acontecem e o sistema lida bem com elas, por isso, consulte a secção sobre como lidar com alterações abaixo.
Etiquetagem Quando o texto está pronto para ser traduzido, qualquer pessoa pode marcar as partes traduzíveis rodeando-as por tags <translate> e adicionando a barra <languages /> à página.
Esta barra adiciona uma lista de todas as traduções da página, com a respetiva percentagem de traduções completas e atualizadas.
Não existe nenhuma outra indicação de que existem traduções.
Veja em baixo como deve etiquetar.
O sistema irá detetar quando as marcações são colocadas numa página traduzível, e a página irá ter uma hiperligação para a marcar para tradução.
Este também irá detetar reclamações e impede a gravação se, por exemplo, se se esqueceu de adicionar uma tag à tag de fecho.
A página traduzível também será listada em Special:PageTranslation "pronta para marcação".
Marcação. Depois da etiquetagem, um administrador de tradução marca a página para tradução. A interface é explicada no exemplo de tradução de página. A responsabilidade do administrador de tradução é certificar-se que a segmentação faz sentido e que a inserção de etiquetas está correta. A página pode ser marcada outra vez se tiver sido alterada entretanto. Veja em baixo como efetuar alterações que minimizem perturbações. A marcação da página inicia um processo de segundo plano que usa a fila de tarefas do MediaWiki. Este processo passa por cada página traduzida e regenera-a: as mudanças na página original são refletidas e as traduções desatualizadas são substituídas temporariamente pelo texto original. Pelo contrário, a interface de tradução é atualizada de imediato.
Alterações. Os utilizadores podem continuar a alterar a página original traduzível. As alterações serão visíveis para os utilizadores que visualizem a página no idioma de origem, mas as traduções são efetuadas contra as unidades de tradução extraídas da última versão da página traduzível que foi marcada para tradução: as páginas traduzidas são reportadas como 100% atualizadas se todas as unidades de tradução foram traduzidas, mesmo que a página original tenha novas alterações. Pode ver facilmente se há alterações não marcadas quando visualizar a página traduzida no idioma original: há um aviso na parte superior da página que informa que pode traduzi-la e interliga para as alterações, se elas existirem.
Invalidação. Se forem efetuadas alterações na origem da página traduzível, o administrador de tradução irá dar-lhe a opção de "Require updates to the translation" para cada secção. Se uma secção for invalidada, os idiomas traduzidos receberão uma cor de fundo rosa para essas secções, e um ícone de relógio será mostrado aos tradutores na interface da tradução. Se uma secção não for invalidada, então, nenhuma alteração será visível para os leitores das páginas traduzidas, e os tradutores terão que examinar a secção dentro da interface da tradução para ver as alterações.
Idioma de origem. Há também uma página de tradução com o código de idioma do idioma de origem: este não contém as etiquetas extras e outras marcações relacionadas coma a tradução da página que são utilizadas na origem da página traduzível. Esta página não está vinculada a partir da interface, mas é útil, por exemplo, quando deseja incluir a página (normalmente para modelos traduzíveis) ou exportá-la. Por exemplo, a página em que está, está disponível sem as marcações em Help:Extension:Translate/Page translation administration/en.
Alterar o idioma fonte. A extensão normalmente assumirá que a página fonte traduzível está no idioma predefinido da wiki. Os administradoras podem alterar a definição do idioma de uma página específica, utilizando a página Special:PageLanguage, de modo a que esta possa ser utilizada como uma página fonte para tradução. Consulte Idioma do conteúdo da página for detalhes.
Idioma de Tradução. As páginas de tradução podem conter idiomas diferentes se elas não estão totalmente traduzidas.
Nas páginas de tradução, as unidades de tradução não traduzíveis serão etiquetadas com o idioma apropriado e a direção do texto para que as regras de CSS sejam aplicadas corretamente.
Na MediaWiki, contudo, atualmente não permite a definição do idioma para analisar outros além do nível da página.
All magic words and parser functions use the translation target language, even if the surrounding text is not translated.
This can create an unwanted mismatch for example when formatting numbers or dates.
Some magic functions and parser tags allow setting the output language, in which case you can use magic word {{TRANSLATIONLANGUAGE}} that returns either the source language for untranslated units or the target language for translated units.
Closed translation requests. Some translatable pages have a content that is only interesting for a certain period of time. For example announcements and regular status updates, like the Wikimedia monthly highlights. You can keep those pages around with translations, but hide them from the translation interface. This does not prevent further translations to the pages, but it greatly reduces the chance that a user accidentally starts translating the page. Discouraging and its reversion are done from Special:PageTranslation.
Prioritizing languages. You can also define a list of languages that you specifically want translations into; leaving the language list empty is interpreted as all languages allowed. The page will behave like a discouraged page (see previous paragraph) for the languages not in the priority list and, when translating into them, translators will be given a notice. You can also prevent the translation in other languages, say if translations are actually used elsewhere and you won't be able to use them but in some languages.
Agrupamento. É possível agrupar as páginas relacionadas. These groups work like all the other message groups. They have their own statistics and contain all the messages of the subgroups: in this case translatable pages. This functionality is currently in Special:AggregateGroups. Aggregate message groups are collapsed by default in Special:LanguageStats in the group selector at Special:Translate.
Moving. You can move translatable pages as you would move any other page. When moving you can choose whether you want to move any non-translation subpages too. The move uses a background job to move the many related pages. While the move is in progress, it is not possible to translate the page. Completion is noted in the page translation log. Para mais informação, consulte o guia para mover uma página traduzida.
Deleting. Like move, deletion is accessed from the normal place. You can delete either the whole translatable page, or just one translation page, from the delete button on it. Deletion will also delete all the related translation unit pages. As in move, a background process will delete the pages over time and completion is noted in the page translation log. Deletion requires "delete" and "pagetranslation" permission, but individual translation unit pages can always be deleted with standard "delete".
Reverting. Similarly, reverting incorrect edits works as usual (including the rollback button): you only have to edit the affected translation unit and the translation page will be updated as well.
To find the edit to the translation unit from the edit to the translation page, just click the "contribs" link for the editor and look for an edit at a similar time.
Within the translation system, you can mark an existing translation as outdated by adding !!FUZZY!! at the start of the translation unit's translated message box.
Protecting. It is possible to protect the translatable page. Translation pages cannot be protected, nor does the protection of the translatable page extend to them. To prevent further edits to translations, you should add the source language as only priority language and disable translations to other languages, see prioritizing languages above. Together these two actions effectively prevent changes to both the source page and translation pages with its translation unit pages. It is possible to protect individual translation unit pages, though it is not advisable.
Removal from translation. It is also possible to unmark a page for translation. You can use Special:PageTranslation or follow the link in the top of translatable page to remove it from translation. This will remove any structure related to page translation, but leave all the existing pages in place, freely editable. This action is not recommended.
Transcrição com consciência do idioma.
É possível transcrever uma página traduzível para outra página como um modelo.
In such a case, the translatable page will be loaded in the language of the target page if it has been translated to that language.
If that translation does not exist, the translatable page will be loaded in the source language.
This behavior of a translatable page is controlled by the Ativar a transclusão com deteção de traduções para esta página option when marking the page for translation.
New translatable pages will have this behavior turned on by default.
Anatomia de uma página traduzível
A tradução de uma página traduzível produzirá muitas páginas, que todas juntas compõem a página traduzível no sentido mais amplo: seu título é determinado pelo título de Page traduzível:
Página– a página fontePágina/<código do idioma>– as páginas de tradução, mais uma cópia da página fonte sem marcaçãoTranslations:Página/<identificador da unidade de tradução>/<código de idioma>– todas as páginas de unidade de tradução
In addition to this, there are the translation page template and the sources of translation units, extracted from the source page and stored in the database. The system keeps track of which versions of the source page contain translation tags and which version of them have been marked for translation.
Every time a translation unit page is updated, the system will also regenerate the corresponding translation page. This will result in two edits. The translation unit page edit is hidden by default in recent changes and can be shown by choosing show translations from the translation filter. Any action other than editing (like deleting and moving) the translation unit pages will not trigger the regeneration of the corresponding translation page.
If you need the copy of the source page without markup, e.g. to be pasted in another wiki without Translate,
- identify the source language code (for English, en) and visit
Page/<language code>
- click the "Ver histórico" button to reach an address like this and replace
action=historywithaction=rawin the address bar, press enter
- the text will be displayed or saved.
Segmentação
- Todo o texto destinado para tradução deve ser envolvido com etiquetas
<translate>. Pode ter vários pares de etiquetas numa única página. - Everything outside those tags will not change in any translation page. This static text, together with the placeholders which mark the place where the translation of each translation unit will be substituted, is called the translation page template.
- Too much markup in the text makes it difficult for translators to translate. Place
<translate>tags closer together, containing less wikitext, when there is lots of markup. - The text inside
<translate>tags is split into translation units where there is one or more empty lines between them (two or more newlines).
Restrições. A funcionalidade de tradução da página impõe algumas restrições no texto. There should not be any markup that spans over two or more translation units. In other words, each paragraph should be self-contained. This is currently not enforced in the software, but violating it will cause invalid rendering of the page, the severity depending on whether MediaWiki itself is able to fix the resulting HTML output or not.
Parsing order. Beware, the <translate> tags work differently from other tags, because they do not go through the parser.
This should not cause problems usually, but may if you are trying something fancy.
In more detail, they are parsed before any other tags like <pre> or <source>, except for <nowiki> which is recognized by the Translate extension.
Colocação de etiqueta
<translate> for it to function properly, particularly related to whitespace handling, use in unnamed parameters and tables, and the spacing between unit marker and text, mentioned below.Tag placing. If possible, try to put the tags on their own lines, with no empty lines between the content and the tags. Sometimes this is not possible, for example if you want to translate some content surrounded by the markup, but not the markup itself. This is fine too, for example:
{{Template|1=<translate>Alguns parâmetros localizados</translate>}}
To make this work, the extension has a simple whitespace handling: whitespace is preserved, except if an opening or closing <translate></translate> tag is the only thing on a line.
In that case the newline after the opening tag or before the closing tag is ignored.
This means that they don't cause extra space in the rendered version of the page.
<translate> tags.If you insert a tag inside a parameter value of a template call, ensure the parameter is named (else add a numeric name, like 1=).
If you insert a tag inside a table cell, ensure there is no excess whitespace between the tags and the table markup, as this will disrupt the HTML output.
Nota:
You must leave the space between the content and the unit marker (that space is automatically added by the software).
Otherwise, the editor will display an error message: "Translation unit markers in unexpected position," and you will not be able to publish.
Por exemplo:
<translate><!--T:1--> Hello, world.</translate>Incorreto:
<translate><!--T:1-->Hello, world.</translate>
Variáveis
Consulte também Meta: Linhas Diretrizes de Internacionalização#Variáveis de tradução.
It is possible to use variables similar to template variables.
The syntax for this is <tvar name="name">contents</tvar> (quotes are optional if the value contains no spaces or any of " ' ` = < >).
Nota: variables must be named, if not it may cause invalid rendering of the page.
For translators variables will show up only as $name, and in translation pages will be substituted with the content of the tvar named name. Hence they are global "constants" across all its translation pages).
It also works for things like numbers that need to be updated often.
You can update the number in all translations by changing the value of the variable in the translatable page source and re-marking the page to apply universally across all language versions.
You do not need to invalidate translations, because the number is not part of the translation unit pages.
Note that variables are not shared between different translation units. If you want to use the same variable in more than one unit, you must repeat the code in each unit. You can use the same name. Translation variables can be used to separate and hide non-translatable elements or content, such as link targets and file names, from the translation process or the middle of the translation unit. For example, this can be used to show a link whose label should be translated, but not the actual URL:
[[<tvar name="example">Special:MyLanguage/Help:Extension:Translate</tvar>|Translation extension]]
Comma-separated values. For content such as Graph data, that needs to be parsed by the software as comma-separated values, you should separate the translation units between each comma, so that the translating editors don't use localized commas which will confuse the software.
Valores em texto simples.
To prevent any kind of modification of the translation value, use nowrap attribute like this: <translate nowrap>...</translate>.
By default outdated and untranslated values are modified in order to support highlighting and language tagging.
<nowiki> handling:
Before Translate version 2020.10, <nowiki> was not handled consistently and pages would still appear in Special:PageTranslation.
Escapes like "<translate>...</translate>" were used as a workaround.
Previous syntax:
Before Translate version 2021.04, the syntax was <tvar|name>contents</> (T274881).
This syntax is still supported, but it is deprecated.
Exemplos de marcação
Below are listed some alternatives and suggested ways to handle different kinds of wiki markup.
Atributos |
By default the Translate extension may wrap outdated translation units to highlight them and untranslated units to set proper language metadata.
In some circumstances the additional markup added by this wrapping is not suitable. |
<abbr title="<translate nowrap>Frequently asked questions</translate>"><translate>FAQ</translate></abbr>
|
Categorias |
Categories can be added in two ways: in the translation page template or in one of the translation units.
If you have the categories in the translation page template, all translations will end up in the same category. If you have categories inside translation units, you should teach the users a naming scheme. On the right we show two possible schemes which are independent of the technical means to adopt them. |
Tradução adicionando o sufixo do idioma: Categoria:Carros/fi (recomendado) [...]
</translate>
[[Category:Cars{{#translation:}}]]
Sem tradução: Category:Cars
|
|
Comentários de código |
Although code samples should not be translated, you can translate comments in code samples using <translate> tags and the nowrap attribute.
|
<syntaxhighlight lang="php">
public static function registrationCallback() {
// <translate nowrap>Must match the name used in the extension configuration</translate>
define( 'CONTENT_MODEL_EXAMPLE', 'example' );
}
</syntaxhighlight>
|
Cabeçalhos |
Recommended markup in translation tagging section headings:
Headings should be separated with an empty line. This way someone can quickly translate the table of contents before going into the contents. Additionally, it ensures that linkable anchors are generated for the heading. |
Correto: <translate>
== Cultura ==
Lorem ipsum dolor.
</translate>
Incorreto: (sem nova linha depois da etiqueta == <translate>Cultura</translate> ==
Incorreto: (sem nova linha) <translate>== Cultura ==</translate>
|
Hiperligações |
If the target page is or should be translatable, then the wikilink must be prepended with
Special:MyLanguage/.Any page which could be translated should be linked with Links should be included in the paragraph’s tags as it allows the translator to change the link label, and also change the link target to a localized version, if one exists. Untranslatable elements of wikilinks can be hidden from the translator using variable syntax. On mediawiki.org, you can use Template:Localized link to link to pages on the same wiki as a simpler alternative to
Special:MyLanguage/. This also works on Meta-Wiki and other multilingual, Wikimedia wikis with a similar template. |
Hiperligações para as páginas traduzíveis: <translate>
Os programadores podem [[<tvar name=1>Special:MyLanguage/Manual:Extensions</tvar>|escrever novas extensões]].
</translate>
Hiperligações para páginas com uma versão localizada e separada: <translate>
Helsínquia é a capital da [[w:Finland|Finlândia]].
</translate>
Hiperligações para as páginas não traduzíveis: <translate>
A barra lateral está definida em <tvar name=1>[[MediaWiki:Sidebar]]</tvar>.
</translate>
Hiperligações externas: <translate>
PHP é uma linguagem de programação ([<tvar name=url>http://php.net</tvar> ''site'' da Web]).
</translate>
|
Lista |
Considere segmentar as listas longas em várias partes com um item da lista por unidade. Faça isto apenas se os itens forem independentes o suficiente para serem traduzidos separadamente em todos os idiomas. Evite criar "mensagens LEGO" dividindo uma única frase em várias unidades ou separando partes logicamente conetadas, pois isto pode afetar a pontuação ou o estilo da lista. Não insira linhas vazias entre os itens da lista, pois irá dividir a lista, causando problemas incorretos de aparência e acessibilidade ("lista gap««").
|
Correto: <translate>
Por favor, visite:
* a nossa página principal
* depois a páginas das FAQs.
</translate>
ou * <translate>Princípios gerais</translate>
* <translate>Cabeçalhos</translate>
* <translate>Imagens</translate>
* <translate>Tabelas</translate>
<translate>* Princípios gerais</translate>
<translate>* Cabeçalhos</translate>
<translate>* Imagens</translate>
<translate>* Tabelas</translate>
|
Multimédia |
If a different version of a media file is needed for different languages, include the full file syntax inside translate tags. For example, a diagram that includes text should be replaced with a new image in each language.
If a media file should stay the same in different languages, translate only the caption or other text parameters. |
Different file for each language: <translate>
[[File:Europe countries map en.png|thumb|Mapa da Europa com os nomes do país]]
</translate>
Mesmo ficheiro para cada idioma: [[File:Ball.png|50px|<translate>Ícone bola</translate>]]
|
Números |
With numbers and other non-linguistic elements you may want to pull the actual number out of translation and make it a variable. This has multiple benefits:
|
<translate>
Rendimentos neste mês <tvar name=income>{{FORMATNUM:3567800}}</tvar> EUR
</translate>
Note that this prevents the translators from localising the number by doing currency conversion. The |
|
Tabelas |
Para traduzir as tabelas, adicione etiquetas <translate> apenas ao redor do texto traduzível.
|
{| class="wikitable"
! <translate>Versão<translate>
! <translate>Estado<translate>
|-
| 1.0.0
| <translate>Estável</translate>
|}
|
Modelos |
Templates have varying functions and purposes, so the best solution depends on what the template is for. If the template is not a part of longer paragraph, it should be left out of translation tags, unless it has parameters that need to be translated.
For an example of a template translated with page translation, see Modelo: Extensão-Translate. Another way to translate a template is to use the unstructured element translation, but then the language of the template will follow the user's interface language, not the language of the page they are viewing. |
Modelos sem parâmetros: {{Subpáginas}}
Modelos sem parâmetros traduzíveis: {{Meu Modelo|1=<translate>Olá!</translate>}}
When translating a template parameter, ensure the parameter is named, or use a numeric name such as
1=. |
|
Transcrição |
Pode transcrever uma página traduzida para outra página traduzida utilizando a sintaxe padrão Transcrição. Se não há nenhuma tradução disponível para o idioma de destino, o conteúdo transcrito é exibido no idioma fonte. | <translate>
== Dicas de comunicação ==
</translate>
{{:Dicas de comunicação}}
|
Página traduzível(introduzido(a) na a582f3ad21bd) |
It can be used in templates that are transcluded on both translatable and non-translatable pages, and should behave differently depending on whether the page is translatable (e.g. use user language on non-translatable pages). It returns the title of the translation page (the page other languages are translated from) if a page is translatable (including translated pages), and nothing if the page is not translatable. Similarly to the <languages> parser tag, it returns nothing if the page contains translation markup but hasn’t been marked for translation yet.
|
{{#if:{{TRANSLATABLEPAGE}}|{{Algum modelo}}|{{Algum modelo/{{int:lang}}}}}}
Assuming |
Idioma da página traduzida(introduzido(a) na 98b6958a2471) |
Translated templates may want to set the language they are actually in (e.g. on a wrapper HTML element). When used outside of <translate> tags, {{TRANSLATIONLANGUAGE}} returns the language of the page it’s directly in (as opposed to the language of the page on which the reader sees it).
|
Suppose {{1/en}} is transcluded in the page titled 2/de.
|
Idioma da tradução(introduzido(a) na 5e8106cdc353) |
When text is using language-dependent formatting methods, a mismatch may appear for untranslated sections.
|
2020-09-15 is {{#time:l|2020-09-15|pt}}
The above input may render as:
Without the magic word, untranslated text on a Finnish translation page would render as:
|
|
Variáveis de tradução |
Use <tvar> tags to hide non-translatable elements from translators.
Each translation variable must have a |
Correto:
<translate>
If you set the variable in <tvar name=1>LocalSettings.php</tvar>, the default value in <tvar name=2>extension.json</tvar> is not used.
</translate>
Incorreto: (sem name) <translate>
O nome de ficheiro dever ser <tvar>extension.json</tvar>.
</translate>
Incorreto: (same <translate>
To use Markdown, add the file extension <tvar name=1>.md</tvar>, such as <tvar name=1>README.md</tvar>.
</translate>
|
Alteração do texto de origem
<!--T:1-->) você mesmo, o sistema irá fazê-lo automaticamente.- Evite alterações desnecessárias que invalidem as unidades de tradução
- Efetue alterações tão isoladas quanto possível
- Se efetuar alterações menores a uma unidade de tradução existente, mantenha o marcador. Se mudar significativamente um parágrafo completo, elimine o marcador
- Não adicione marcadores de unidade de tradução você mesmo
- When editing, unit markers should be left alone and their position in relation to the unit they belong to should not be changed.
- When moving a unit, move the unit marker too.
- When deleting a unit, delete the marker too.
Although you can edit translated content using the VisualEditor, you must use the source editor to add or change translation markup. To make it easier to add translation markup, use the buttons in the box under the editing interface.
Do not use section editing when editing translated pages since this adds extra whitespace to the page.[1] Always select the option to edit the entire page.
Marcadores de unidade
When a page is marked for translation, the system will update the translatable page source and add unique identifiers, called "unit markers", for each translation unit.
Veja o exemplo em baixo.
An example of a unit marker is <!--T:1-->.
These unit markers are crucial for the system, which uses them to track changes to each translation unit.
You should never add unit markers yourself.
The unit markers are always on the line before the unit; or, if it starts with a heading, after the first heading on the same line.
The different placement for headings is needed to keep section editing working as expected.
<translate>
== Birds == <!--T:1-->
Birds are animals which....
<!--T:2-->
Birds can fly and...
</translate>
Alterar texto da unidade
Changing is the most common operation for translation units. You can fix spelling mistakes, correct grammar or do other changes to the unit. When changing unit text, unit markers should not be removed, and their position in relation to the unit they belong to should not be changed. This is because most edits retain the original structure of the translation unit, therefore there is the possibility of reusing existing translations. When re-marking the page for translation, you will see the difference in the unit text. The same difference is also shown to translators when they update their translations. For simple spelling fixes and other cases where you don't want the existing translations to be highlighted on the translated pages, you can avoid invalidating them: translators will still see the difference if they ever update the translation for any reason. Leaving markers highlights changes to translation units in the translation administrator's interface, even for minor edits, and enables translation administrators to compare changes and decide whether to invalidate existing translations. Removing markers treats modified units as entirely new, making it harder to compare changes in the translation administrator's interface.
Adicionar novo texto
You can freely add new text inside <translate> tags. Make sure that there is one empty line between adjacent units, so that the system will see it as a new unit. You can also add <translate> tags around the new text, if it is not inside existing <translate> tags. Again, do not add unit markers yourself, the system will do it.
When adding text, your goal is to change as few existing translation units as possible. For example, here are two paragraphs from a translated page:
<translate>
<!--T:1-->
Using edit summaries helps other users understand your edits without having to dig into the details.
<!--T:2-->
If a copyright infringement is found, it also keeps authorship information after a significant revision deletion.
</translate>
To add a new paragraph, add the text separated by new lines:
<translate>
<!--T:1-->
Using edit summaries helps other users understand your edits without having to dig into the details.
Edit summaries are optional but recommended.
<!--T:2-->
If a copyright infringement is found, it also keeps authorship information after a significant revision deletion.
</translate>
To add a sentence to an existing paragraph, create a new translation unit.
In this example, the text is now divided into three sets of <translate> tags.
This allows you to add a sentence to the first paragraph without invalidating the T:1 unit.
<translate>
<!--T:1-->
Using edit summaries helps other users understand your edits without having to dig into the details.
</translate>
<translate>Edit summaries are optional but recommended.</translate>
<translate>
<!--T:2-->
If a copyright infringement is found, it also keeps authorship information after a significant revision deletion.
</translate>
Eliminar texto
You can delete whole units. If you do so, also remove the unit marker.
For example, here is an excerpt from a translated page:
* <translate><!--T:1--> Do not add translation unit markers yourself.</translate>
* <translate><!--T:2--> When moving a unit, move the unit marker too.</translate>
* <translate><!--T:3--> When deleting a unit, delete the marker too.</translate>
To remove the second bullet point, remove the entire line, including the unit marker and the <translate> tags:
* <translate><!--T:1--> Do not add translation unit markers yourself.</translate>
* <translate><!--T:3--> When deleting a unit, delete the marker too.</translate>
Separar unidades
You can split existing units by adding an empty line in the middle of a unit, or by placing <translate> tags so that they split the unit. You can either keep the unit marker with the first unit or remove it altogether. In the first case, translators see the old text when updating the old translation. If you removed the unit marker, both units will behave as if no translation ever existed, after the page is re-marked for translation.
| Estado original | Manter o marcador | Remover o marcador |
|---|---|---|
<!--T:1-->
Cat purrs. Dog barks.
|
<!--T:1-->
Cat purrs.
<!--T:2--> (Adicionar depois da remarcação)
Dog barks.
|
<!--T:2--> (Adicionado depois da remarcação)
Cat purrs.
<!--T:3--> (Adicionado depois da remarcação)
Dog barks.
|
| Kissa kehrää. Koira haukkuu. | Kissa kehrää. Koira haukkuu.
Dog barks. |
Cat purrs.
Dog barks. |
Unir unidades
If you merge units, you have to remove at least all but one unit marker.
Mover unidades
You can move units around without invalidating translations: just move the unit marker together with the rest of the unit.
Before marking the new version of the page for translation, ensure that the best practices are followed, especially that translators get a new translation unit if the content has changed. Also make sure that there are no unnecessary changes to prevent wasting translators' time. If the source page is getting many changes, it may be worthwhile to wait for it to stabilize, and push the work for translators only after that.
Unused unit translations are not deleted automatically, but that should not cause trouble.
Mover páginas traduzidas
Translation administrators can move translated pages as you would move any other page. It is also possible to move translated pages between multilingual wikis using a script. For more information, see the guide to moving a translated page.
Migrar para a tradução de página
If you have been translating pages before using the page translation system, you might want to migrate the pages to the new system, at least the ones you expect to have new translations and want statistics for. You will probably have existing templates for language switching and maybe different page naming conventions.
You can start migration by cleaning up, tagging and marking the source page. You can keep the existing language-switching templates while you migrate the old translations. If your pages follow the language code subpages naming convention, they will be replaced with the source text after marking the source page for translation, but you'll still be able to access translations from history.
This manual task has been partly automated by Special:PageMigration (available to translation administrators only), which shows the source and target units besides each other and allows the user to adjust the units by providing a set of features mentioned later in this page.
Como utilizar?

- Ir para Special:PageMigration
- Enter the title of the page and the language code. For example, "Help:Special pages" and "fr"
- The source text which was divided into units by Translate and the imported translations will be shown besides each other with some initial alignment.
- Use the actions available for each unit to manually do the remaining alignment
- As translated units are editable, do required manual improvements (for adding translation variables, fixing links and markup, etc.)
- Clique no botão "Gravar". This will create pages under the Translations namespace of the form
Translations:Page/<translation unit identifier>/<language code>. The old translations have been imported into Translate. - Else, if you wish to abort the importing, click on the
Cancelarbutton.
Ações disponíveis
Each row consisting of source and target unit has a set of action icons. They are used as follows:
- Add: Clicking on this action icon adds a new empty unit below the current one. Use this feature if you want to split the current unit and need a unit below.
- Swap: Clicking on this action icon swaps the content of the current unit with the unit below it. You can use this feature when the units get aligned improperly due to different ordering of sections. Or when you need to drag a unit below or above. In either case, remember it swaps with the unit below and does not create any additional units.
- Delete: Clicking on this action icon completely removes the corresponding target unit from the page and shifts the remaining target units up by one unit. Use this to remove unwanted content like code or imported translations which are present completely in the source language. Note: this action is irrevocable (in the current session).
Resolução de problemas
- If you mark a page for translation and immediately go to the special page and try to import translations, you may get an error message like "A página <page-name>/<language-name> não contém traduções antigas.". This is because FuzzyBot didn't fuzzy the messages on the old page yet: the tool won't find an edit by FuzzyBot on the translation page. In this case, simply wait for FuzzyBot to do its job. Once an edit is seen, you can proceed with the imports.
- Please wait for some time after pressing the "Gravar" button. While the button background remains gray, there is an ongoing process of importing non-empty units. Once the button becomes colored again, the import is completed.
- Within the translation system, you can mark an existing translation as outdated by adding
!!FUZZY!!at the start of the translation unit's translated message box.
Dicas
- Migration will be easier if you first (before the mark to translation) check whether existing translations are similar to the original English text, and manually edit the structure of pages: break paragraphs and lists, add the missing headings (even if empty).
- It will be useful to check the result in the core translation interface - some of the units may be immediately marked as obsolete because of errors in the markup or if not all of the translation variables were added.
- Translation of the page title will have to be added manually. If you do not know very well the language of the imported page, you can try to find the translation of the page title among the "links here" or sometimes in redirects.