Este manual tem como objectivo ajudar o tradutor. Primeiro será explicado tecnicamente como é o processo geral de tradução . Mais tarde a tradução é explicada de um documento rst Inglês actual, que será traduzido para Holandês. Finalmente será dado um <translation_summary>`_.
Embora essas orientações se concentrem na documentação QCIS, os métodos e as regras mencionadas abaixo também são utilizadas para tradução de aplicações QGIS e sites da internet.
Para criar documentação first são gerados documentos .rst
. A transcrição predefinida cria ficheiros de tradução designados por .po
, ficheiros para a língua inglesa na pasta: ficheiro: /QGIS-Documentation/i18n/en.
Estes “originais” são copiados pelo programa para as pastas i18n para os outros idiomas.
The sentences in the .po
files need to be translated from english to the
language with a translation tool editor.
When you want to contribute, first get a .po
file and add
translations for the sentences in the .po
file.
When you are finished the .po
file is placed back in the right place and
during the next build the build script now creates .mo
files next to
the .po
files.
These .mo
files are actually used by the script to create translated output.
When afterwards an rst document is updated a new .po
file is created in the
english part. The contents of this new file will be merged with already existing
.po
files for each language. This means that when a new line is added to
an rst document that was already translated, only the new/updated sentences are
added in the translated .po
file and needs to be translated. The amount of
work for updating translations for next versions of QGIS should be relative
small.
Two different tools are currently used to do translations in QGIS:
.po
files from the source code.Note that whatever tool you choose, rules of translations are the same.
Warning
An important note: If you want to translate content within the docs folder (not web), 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.
Para explciar como as traduções funcionam, iremos usar o módulo do mapa de densidade como exemplo. Neste exemplo iremos traduzir de Inglês para Holândes, mas irá ser practicamente a mesma coisa para os outros documentos em todos os idiomas.
The source of the document can be found here:
QGIS-Documentation/source/docs/user_manual/plugins/plugins_heatmap.rst
Portanto porque escolhi este documento?
É considerado acabado para o actual lançamento. Se ainda não estiver completo pode ser encontrada a seguinte linha vazia no topo do documento.
|updatedisclaimer|
Isto irá produzir um aviso visível no produto de saída. Para iniciar a tradução do documento com um aviso de actualização, poderá ser necessário mais tarde acabá-lo.
Também inclui imagens, capturas, cabeçalhos, referências e susbsituições.
Eu escrevi isto, e assim, é mais fácil para mim, traduzir ;-)
The build process has created the English .po
file which can be found here:
QGIS-Documentation/i18n/en/LC_MESSAGES/docs/user_manual/plugins/plugins_heatmap.po
The equivalent Dutch .po
file (basically a copy) can be found here:
QGIS-Documentation/i18n/nl/LC_MESSAGES/docs/user_manual/plugins/plugins_heatmap.po
Along this file you will see a tiny .mo
file which indicates that it
does not hold any translations yet.
In order to translate QGIS with Transifex, you first need to join the project. Once
you got a team, click on the corresponding project and your language.
You get a list of all translatable .po
files. Click on the
docs_user-manual_plugins_plugins-heatmap
to select the heatmap plugin file
and choose Translate
in the prompted dialog.
Note that you can also choose to download the file and translate it
with tools like Qt Linguist.
The next page lists all the sentences in the file. All you need to do is select
the text and translate following the guidelines.
For further information on the use of Transifex Web Editor, see http://docs.transifex.com/tutorials/txeditor/.
With Qt Linguist, you need to manually grab the .po
file.
When you open the file in Qt Linguist for the first time you will see the
following dialog:
Figure Translation 1:
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 Figure_translation_2.
Figure Translation 2:
No menu poderá ver os seguintes botões que devem ser usados.
O Botão Anterior, pode ser usado para ir para um item anterior de tradução.
O Botão Seguinte, pode ser usado para ir para o próximo item de tradução.
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.
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.
Agora iremos começar a traduzir o manual do plugin_heatmap !
Translating most of the sentences should be straightforward. During this translation session I will point out which parts (rst statements) need special translation.
Below we see an interesting sentence to translate:
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:
|heatmap|
as palavras entre |
são substituições e estas nunca devem ser traduzidas! Isto será substituido pelo ícone do módulo de densidade!
:sup:`Heatmap`
, the :sup:
statement is a superposition statement
and prints the following text a bit higher. This is used to show the popup
texts that appear when you hover above the toolbar item and this may be
different when it is actually translated in the QGIS application. In the
Dutch case it is not!Todos os outros textos nesta instrução podem ser traduzidos!
The next translation item contains the :ref:
statement that is
commonly used to refer to another section somewhere in the manual! The text
following a :ref:
statement should never be changed because it is a unique
identifier!
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
refering 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.
O item “Ver –>” acima está actualmente 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 figure_heatmap_2_).
It holds a reference to a figure figure_heatmap_2_
, and like a reference
to section this reference should not be changed!! The reference definition
itself 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_2
. When a PDF document is
created figure_heatmap_2_
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.
Do not remove the stars in above line. It will print the text it holds in bold. The text itself is often text included in the dialog itself and may well be translated in the application.
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.
The text Advanced
of the guilabel tag may well be translated in the QGIS
application and probably needs to be changed!
The following translation item contains ``airports``. The quotes are used to give the text another text font. In this case it is a literal value and does not need translation.
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
`http://qgis.spatialthoughts.com
<http://qgis.spatialthoughts.com/2012/07/tutorial-making-heatmaps-using-qgis-and.html>`_.
This item also includes a hyperlink with an url and an external presentation.
The url should of course be left intact, you are allowed to change the external
text http://qgis.spatialthoughts.com
which is visible by the reader. Never
remove the underscore at the end of the hyperlink which forms an essential
part of it!!
|
characters like |bronze|
, |checkbox|
,
|labels|
, |selectString|
, |addLayer|
... These are special tags
used to replace images:ref:
or :file:
figure_labels_1_
>`_
):index:
,
:sup:
, :guilabel:
and :menuselection:
tags.
Check if/how it is translated in the QGIS Application. Do not change the tag itself.`
, ``
, *
, **
, ::
. These contribute to the
cosmetics of the information providedAgarra-se às regras apresentadas em cima e o documento traduzido irá ficar muito bom!
For any question, please contact the QGIS Community Team or the QGIS Translation Team.