Importante

A tradução é um esforço comunitário você pode contribuir. Esta página está atualmente traduzida em 48.41%.

4. Orientações para a Tradução

This manual is aiming to help the translator. First, it explains how you can join the translation team. Then the general process of how technically a translation is done is explained. Later the translation is explained from an actual English .rst document that is translated to Dutch. Finally a summary of rules of translation is given.

Nota

Although these guidelines focus on QGIS documentation, the methods and the rules described below are also applicable to QGIS applications.

4.1. Becoming a translator

The QGIS project is always looking for people who are willing to invest some more time translating QGIS into a foreign language - even perhaps to coordinate the translation effort.

We are trying to improve our project management process and spread the load more evenly between people who each have a specific area of responsibility, so any contribution you have to make will be greatly appreciated.

If you would like to nominate yourself as a coordinator for a new language please go ahead. If more than one person nominate themselves as coordinator for the same language, please contact each other and resolve how you will manage your efforts.

4.1.1. Transifex

The web-based translating platform Transifex is used for all QGIS translations: the desktop application itself (or GUI) and the documentation. So the first thing you need is an account to login and get started.

4.1.2. Join a Project

  1. Go to https://explore.transifex.com/qgis/

  2. You can explore available projects we translate, identify their target languages with various statistics:

    • QGIS Desktop for all the pieces of text available in QGIS apps (QGIS Desktop and QGIS Server),

    • QGIS Documentation for the official LTR documentation

  3. Click on the project you would like to help translate

  4. Click on JOIN THIS PROJECT on the right side. You will be prompted to sign up.

  5. Create your account or connect using a third-party platform account. Verify your account by the link in the email you will receive.

  6. Login

  7. You then get a popup to select which language you want to help translate to. Please, note that we try to make the process as simple as possible and only target languages, regardless of the country parameter (e.g. French (fr) and NOT French (France) (fr_FR)). Only if there are notable differences in the languages (e.g. portuguese in Portugal vs Brazil) we may allow different versions.

    Search your target language, i.e the language you wish to help translate QGIS into, NOT necessarily all the languages you can speak:

    • If it is marked as already added then select it and press Join Project.

    • If it is not marked as already added, select it and press Request language. Keep in mind that translating an entire project will take days of work, if not weeks! Again, and sorry to repeat, it is not about selecting ALL the languages you can speak.

  8. Now you will need to wait for the language coordinator or the project maintainers to process your request. You will be notified by email when your request has been accepted. If your request has no answer for about a week, please consider writing to your language coordinator in Transifex or the QGIS Translators mailing list.

  9. You can also join any of the other QGIS projects and help everywhere too.

4.1.3. Translate

Once your request is accepted, you are able to translate any text in the project(s) you’ve chosen. Simply click on your language, select the chapter you want to translate and click on Translate. Easy, right?

In order to help you make good translation, some instructions are provided below. We strongly recommend you to read them.

Dica

Quick access to translatable files in Transifex

If you find a wrong or missing translation in the current documentation, you can use the Translate page link in the bottom left drop-down menu of the page to reach it sources in Transifex and perform any update you wish to.

4.2. Processo de tradução

A Documentação do QGIS é escrita em Inglês com ficheiros .rst. De forma a fornecer as traduções:

  1. A prebuild script creates translation files named .po files for the English language in the folder /QGIS-Documentation/locale/en.

  2. As frases nos ficheiros .po são enviadas para a plataforma web Transifex, e disponibilizadas aos tradutores que podem começar a traduzir do inglês para o seu idioma com o editor.

  3. When a file is translated at 100%, the translated strings are automatically pulled back to the documentation repository, under /QGIS-Documentation/locale/<language>.

  4. At the next build of the documentation (which occurs at least once a day – see time at the bottom of the page), a script reuses the sentences to create translated output.

  5. For files not fully translated, a script pulls every two weeks translated strings from Transifex to Github and these are as well published at the next build.

  6. Whenever an .rst file is updated, the English .po file is updated and the changes are pushed to the corresponding file in Transifex. This means that when a new paragraph is added to an .rst document that was already translated, only the new/updated sentences are added to the translated .po file and needs to be translated.

Nota

Translating QGIS Desktop specificities

The main difference with translating QGIS applications is that instead of .po files, all the translatable strings in the .py, .cpp, .yaml files that shape a particular version of the application are pushed to and pulled from Transifex as a single .ts file (e.g. qgis-application/qgis_en.ts (branch release-3_30) ). Translations are pulled to Github in development branch (daily), and at release time (for every released versions).

Atualmente, são usadas duas ferramentas diferentes para tradução no QGIS:

  • The Transifex web platform, the easiest and recommended way to translate QGIS, transparently does the process described above and pulls all the translatable texts in one place for the translator. Just pick the files you want and translate. Translated files are stored in the platform until another release is pushed.

  • Qt Linguist, a Qt development tool, requires the translator to pull locally the .po (or .ts) files from the source code, translate and then push back.

Note que qualquer que seja a ferramenta que você escolher, as regras de tradução são as mesmas.

4.3. Traduzir um ficheiro

Para explicar como funciona a tradução, iremos usar o módulo do mapa de densidade como exemplo. Neste exemplo iremos traduzir de Inglês para Holândes, mas irá ser praticamente a mesma coisa para os outros documentos em todos os idiomas.

A fonte do documento pode ser encontrada aqui:

QGIS-Documentation/source/docs/user_manual/plugins/plugins_heatmap.rst

Portanto porque escolhi este documento?

  1. Também inclui imagens, capturas, cabeçalhos, referências e substituições.

  2. Eu escrevi isto, e assim, é mais fácil para mim, traduzir ;-)

O processo de compilação cria um ficheiro em Inglês .po que pode ser encontrado aqui:

QGIS-Documentation/locale/en/LC_MESSAGES/docs/user_manual/plugins/plugins_heatmap.po

O ficheiro .po equivalente em holandês (basicamente uma cópia) pode ser encontrado aqui:

QGIS-Documentation/locale/nl/LC_MESSAGES/docs/user_manual/plugins/plugins_heatmap.po

Junto deste ficheiro, verá um pequeno ficheiro .mo que indica que ele ainda não possui nenhuma tradução.

4.3.1. Tradução no Transifex

Para traduzir utilizando o Transifex, você precisa de:

  1. create an account on Transifex and join the QGIS project.

  2. Once you are part of a language team, click on the corresponding project (in this case QGIS Documentation). A list of available languages with their ratio of translation is displayed.

    ../../_images/transifex_choose_language.png

    Fig. 4.22 Selecione o idioma para a tradução no menu Transifex

  3. Passe o cursor sobre o seu idioma e clique em qualquer um dos dois:

    • View resources: translatable .po files with their ratio of translation, number of strings and some more metadata are now displayed.

    • or Translate: opens the interface of translation with all the available .po files

  4. Identify the file you’d like to translate (in our case we are looking for the docs_user-manual_plugins_plugins-heatmap, the heatmap plugin file) or any unfinished file and click on it: strings in the files are loaded and you can use the interface to filter, translate, suggest translation…

    Dica

    Clicking the Translate page link in the bottom left drop-down menu of a page brings you directly to its corresponding translation page in Transifex.

  5. All you need to do is select each text and translate following the guidelines.

For further information on the use of Transifex Web Editor, see https://help.transifex.com/en/articles/6318216-translating-with-the-web-editor.

4.3.2. Traduções no Qt Linguist

Com o Qt Linguist, irá precisar de:

  1. manually grab the .po or .ts file(s). This can be achieved by downloading the file(s) either from Transifex platform or from the locale/$language folder of the source repository (in GitHub),

  2. proceed to the translation locally

  3. upload the modified files to their sources (Transifex or GitHub).

While downloading and uploading translatable files can be done with Transifex, it’s not advised to use this process. Since there’s no versioning system on Transifex, the file you upload will simply replace the existing one and potentially overwrite any modification made by others on the platform in the meantime.

Quando abre o ficheiro no Qt Linguist pela primeira vez irá ver a seguinte janela:

../../_images/linguist_choose_language.png

Fig. 4.23 Selecione o idioma para a tradução no menu linguist

O idioma Destino deverá ser preenchido correctamente. O idioma de Origem pode ser deixado como o idioma POSIX e País/Região em Qualquer País.

When you press the OK button Qt Linguist is filled with sentences and you can start translating, see Fig. 4.24.

../../_images/linguist_menu.png

Fig. 4.24 Traduza usando o menu linguist

No menu poderá ver os seguintes botões que devem ser usados.

  • linguist_done_next O botão «Translation Done Next» é o mais importante. Se o item necessita de tradução, introduza a respetiva tradução no campo de texto, depois clique neste botão. Se o item não necessita de tradução, apenas deixe-o vazio e clique também neste botão, que indica que o item está concluído e assim pode continuar para o próximo.

  • linguist_previous O Botão Anterior, pode ser usado para ir para um item anterior de tradução.

  • linguist_next O Botão Seguinte, pode ser usado para ir para o próximo item de tradução.

  • linguist_next_todo O Botão Seguinte A Fazer, salta para o primeiro item que ainda precisa de tradução. É útil quando o documento original foi mudado e apenas algumas instruções novas/alteradas necessitam de ser traduzidas.

  • linguist_previous_todo O Botão Anterior A Fazer, faz uma procura para trás e salta para o primeiro item de tradução e verifica se necessita de tradução.

For further information on the use of Qt Linguist, see https://doc.qt.io/qt-5/linguist-translators.html

Aviso

If you want to download content to translate from the source repository, never do this in the master branch. For translations there are always translation branches available, once a document is fully updated in English for a certain version. As an example, to translate the manual of QGIS 2.8, you have to use the manual_en_v2.8 branch.

4.3.3. Traduzir o manual

Agora iremos começar a traduzir o manual do plugin_heatmap!

Traduzir a maioria das frases deve ser simples. Durante esta sessão de tradução iremos indicar (no ficheiro rst) quais as partes que necessitam de tradução especial.

De seguida visualizamos uma frase interessante para traduzir:

The |heatmap| :sup:`Heatmap` plugin allows to create a heatmap from a
point vector map. A heatmap is a raster map showing the density or
magnitude of point related information. From the result "hotspots" can
easily be identified.

Esta instrução contem duas instruções rst:

  1. |heatmap| as palavras entre | são substituições e estas nunca devem ser traduzidas! Isto será substituido pelo ícone do módulo de densidade!

  2. :sup:`Heatmap`, a expressão :sup: é uma expressão de superposição e imprime o seguinte texto um pouco mais alto. Isso é utilizado para mostrar os textos pop-up que aparecem quando o rato passa sobre o item da barra de ferramentas e isso pode ser diferente quando é realmente traduzido na aplicação do QGIS. No caso holandês não é!

Todos os outros textos nesta instrução podem ser traduzidos!

O próximo item para tradução contém a expressão :ref:, que é normalmente utilizada para se referir a outra seção no manual! O texto que segue a expressão :ref: nunca deve ser mudado, pois é uma identificação única!

First this core plugin needs to be activated using the Plugin Manager
(see Section :ref:`load_core_plugin`). After activation the heatmap icon
|heatmap| can be found in the Raster Toolbar.

In this case load_core_plugin is a unique reference identifier placed before an rst item that has a caption. The ref statement will be replaced with the text of the header and turned into a hyperlink. When the header this reference is referring to is translated, all references to this header will be automatically translated as well.

O próximo item contém a etiqueta rst :menuselection: seguido do texto efetivamente exibido no menu da aplicação QGIS, isto deve ser traduzido na aplicação e portando deverá ser alterado quando for o caso.

Select from menu :menuselection:`View --> Toolbars --> Raster` to activate
the Raster Toolbar when it is not yet activated.

Acima, o item «Ver –>» está atualmente traduzido para «Beeld –>» porque esta é a tradução usada para Holandês localizada na aplicação QGIS.

Um pouco mais à frente nós encontramos um item de tradução um pouco mais difícil:

The |heatmap| :sup:`Heatmap` tool button starts the Dialog of the Heatmap
plugin (see :numref:`figure_heatmap_settings`).

It holds a reference to a figure figure_heatmap_settings_, and like a reference to a section this reference should not be changed!! The reference definition from the rst-document is not included in the .po file and can therefore not be changed. This means the reference to figures can not be translated. When HTML is created you will see figure_heatmap_settings. When a PDF document is created figure_heatmap_settings_ is replaced with a figure number.

O próximo item de tradução com atributos rst é o seguinte item:

**Input Point dialog**: Provides a selection of loaded point vector maps.

Não remova os asteriscos na linha acima. Irá mostrar o texto a negrito. O próprio texto é geralmente incluído no próprio menu e pode ser traduzido na aplicação.

O seguinte item de tradução contém a etiqueta :guilabel: rst.

When the |checkbox| :guilabel:`Advanced` checkbox is checked it will
give access to additional advanced options.

O texto Advanced da tag quilabel pode ser traduzida no QIS Desktop e provavelmente precisa ser modificada!

O seguinte item de tradução contém ``aeroportos``. As aspas são usadas para dar ao texto outro tipo de fonte de texto. Neste caso é um valor literal e não necessita de tradução.

For the following example, we will use the ``airports`` vector point
layer from the QGIS sample dataset (see :ref:`label_sampledata`).
Another excellent QGIS tutorial on making heatmaps can be found on
`https://www.qgistutorials.com
<https://www.qgistutorials.com/en/docs/creating_heatmaps.html>`_.

Este item também inclui uma hiperligação com um url e uma apresentação externa. O url deverá ser deixado intacto, poderá alterar o texto externo https://www.qgistutorials.com que é visível ao leitor. Nunca remova o underscore no fim da hiperligação pois é a parte essencial!!

4.3.4. Resumo das Regras para a tradução

  1. Não altere o texto entre dois caracteres | como «|bronze|», |checkbox|, |labels|, |selectString|, |addLayer|, …. Estes são caracteres especiais usados para substituir imagens

  2. Do not change references that start with roles like :ref:, :file:, :numref: unless they include a title. In that case, you can translate the title but keep unchanged the link (i.e., the text between < and >)

    Dica

    When a title is provided for a reference, Transifex may display a number in the English source text in replacement of the link part. Click on the number in the source text to add the reference link next to the title being translated.

  3. Não altere as referências que acabam com um underscore como figure_labels_1_

  4. Não altere o url das hiperligações, mas pode mudar a descrição externa. Deixe o underscore no fim da hiperligação, sem espaço adicional («>”_»)

  5. Altere os textos que seguem as tags :index:, :sup:, :guilabel: e``:menuselection:``. Confira como é traduzida no QGIS Desktop. Não altere o tag.

  6. O texto entre duas estrelas e duas aspas muitas vezes indicam valores ou nomes de campos. Algumas vezes precisam de tradução outras não.

  7. Esteja atento para utilizar exactamente os mesmos (números de) caracteres especiais do texto original, tais como `, ``, *, **, ::. Isto contribui para a apresentação das informações fornecidas

  8. Não inicie nem finalize um texto com caracteres especiais ou etiquetas com espaço

  9. Não acabe as cadeias de texto traduzidas com um novo parágrafo, senão o texto não irá ficar traduzido durante a conversão para html.

Siga as regras apresentadas em cima e o documento traduzido irá ficar muito bom!

Para qualquer questão, por favor contacta a QGIS Community Team ou a Equipa de Tradução QGIS.