Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pt-br:translations:translation_guidance_in_xfce [2010/05/04 04:42] – 189.69.60.132 | pt-br:translations:translation_guidance_in_xfce [2012/06/11 06:57] (current) – Erros de escrita e tradução em massa rafaelff1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Breve Guia Sobre a tradução | + | ====== Breve Guia Sobre Tradução |
- | ===== 0. Licensa | + | ===== 0. Licença |
- | Este documento é fornecido sob a [[http:// | + | Este documento é fornecido sob a [[http:// |
- | Ela é baseada | + | |
* Christian Biere < | * Christian Biere < | ||
Line 13: | Line 12: | ||
* Stavros Giannouris < | * Stavros Giannouris < | ||
* Mike Massonnet < | * Mike Massonnet < | ||
- | * Adicionou | + | * Adicionou |
* Atualizou referências antigas de SVN para Git | * Atualizou referências antigas de SVN para Git | ||
===== 1. Introdução ===== | ===== 1. Introdução ===== | ||
- | Este é um breve resumo sobre a documentação gettext. Veja o [[# | + | Este é um breve resumo sobre a documentação |
- | se esta informação não for suficiente para você. | + | |
- | ===== 2. Pegue os arquivos PO ===== | + | ===== 2. Pegar os arquivos PO ===== |
- | Você pode pegar os últimos arquivos PO da plataforma, disponível em http:// | + | Você pode pegar os últimos arquivos PO da plataforma |
- | Em relação à coleção, é recomendável ter tradução para a atual versão estável | + | Em relação à coleção, é recomendável ter tradução para a atual versão estável |
- | ===== 3. Receba | + | ===== 3. Pegar o editor para editar o arquivo PO ===== |
Você pode usar um editor de texto Emacs com `po-mode', | Você pode usar um editor de texto Emacs com `po-mode', | ||
`po.vim' | `po.vim' | ||
- | `gtranslator (requer GNOME)', | + | `gtranslator (requer GNOME)', |
- | tem caracteristicas | + | possuem recursos |
- | Mousepad, Vi etc. claro, mas é altamente recomendado | + | |
Aqui estão os links: | Aqui estão os links: | ||
Line 40: | Line 37: | ||
* http:// | * http:// | ||
- | * Vim com po.vim - Um ftplugin para editar facilmente | + | * Vim com po.vim - Um ftplugin para editar facilmente |
* http:// | * http:// | ||
- | * poEdit | + | * Poedit |
* http:// | * http:// | ||
- | * gtranslator | + | * Gtranslator |
* http:// | * http:// | ||
* KBabel - Um avançado e fácil de se usar, editor de arquivos PO. | * KBabel - Um avançado e fácil de se usar, editor de arquivos PO. | ||
- | * http://i18n.kde.org/ | + | * http://l10n.kde.org/ |
- | Se você estiver indo para continuar como tradutor, você pode querer aprender uma das acima. | + | Se você pretende |
- | ===== 4. Fale com o ex-tradutor | + | ===== 4. Fale com o tradutor |
- | Para salvar o seu tempo de duplicação de trabalho já em curso, é melhor | + | Para evitar de gastar |
- | contato com o tradutor no string, | + | contatar |
- | | + | |
- | ise que o endereço não é usado ou não você não conseguia | + | Se que o endereço não é mais usado ou você não conseguir |
- | último tradutor, então | + | último tradutor, então favor enviar a sua mensagem para a lista de discussão |
- | ===== 5. Prepare | + | ===== 5. Prepare |
- | To create the PO file for your language, simply type, | + | Para criar o arquivo |
$ msginit | $ msginit | ||
- | in the target | + | no diretório de po alvo, de acordo com seu locale. Este comando cria lang.po, no qual as strings |
- | creates | + | |
- | automatically without your bothering. This newly created | + | |
- | however, may not have UTF-8 charset depending on your locale, | + | |
- | you'll need to convert its charset | + | |
- | Note: The command "msginit" works only if target | + | Nota: o comando '' |
- | generated | + | |
- | ===== 6. Translate the messages | + | ===== 6. Traduza as mensagens |
- | In the PO file you'll find something like this: | + | No arquivo |
#: main.c:42 | #: main.c:42 | ||
Line 88: | Line 80: | ||
msgstr "" | msgstr "" | ||
- | If you want to translate to German, you would change the 3rd line to | + | Se você quisesse traduzir para Alemão, você teria que alterar a terceira linha para o seguinte: |
- | the following: | + | |
msgstr "Hallo Welt" | msgstr "Hallo Welt" | ||
- | Don't touch the string | + | Não toque na string |
- | this string | + | |
- | with a "'' | + | |
- | change the order of these "words" | + | |
- | backslash | + | |
msgid "%-8s are %d time faster than %s.\n" | msgid "%-8s are %d time faster than %s.\n" | ||
msgstr "%-8s sind %d mal schneller als %s.\n" | msgstr "%-8s sind %d mal schneller als %s.\n" | ||
- | "'' | + | "'' |
- | another example from Xfmedia: | + | |
msgid "" | msgid "" | ||
Line 117: | Line 103: | ||
"\t%%: a percent sign" | "\t%%: a percent sign" | ||
- | in that case "'' | + | neste caso, "'' |
- | translation, | + | |
- | of putting | + | |
- | You don't have to translate every message. If you cannot or don' | + | Você não tem que traduzir todas as mensagens. Se você não consegue ou não quiser traduzir uma mensagem, simplesmente deixe "'' |
- | want to translate a message just leave "'' | + | |
- | copy the string | + | |
- | Some strings | + | Algumas |
- | Xfdesktop). | + | |
- | as accelerator key. In this example, the key combination | + | |
- | sometimes | + | |
- | this string. | + | |
- | in the translation as well, just append an underscore to selected | + | |
- | character: | + | |
msgid "_Edit list..." | msgid "_Edit list..." | ||
msgstr " | msgstr " | ||
- | If you change the accelerator key, try to make sure that the chosen | + | Se você alterar a tecla aceleradora, tente ter certeza de que a tecla escolhida não conflite com outra no mesmo escopo. Em casos raros, você pode querer descartar o sublinhado para que nenhum acelerador esteja disponível para o elemento de interface gráfica. |
- | key doesn' | + | |
- | you might want to discard the underscore so that no accelerator will | + | |
- | be available for the GUI element. | + | |
- | Okay, sometimes you see the special marks, format-indicator in your | + | Ok, algumas vezes você vê mercações especiais, indicadores-de-formato em seu arquivo |
- | PO file like bellow, | + | |
#: ../ | #: ../ | ||
Line 149: | Line 121: | ||
msgstr "O XFce 4" | msgstr "O XFce 4" | ||
- | with the "'' | + | Com o a marcação |
- | will ask "What's the '' | + | |
- | with translation under gettext | + | |
- | what "'' | + | |
#: ../ | #: ../ | ||
Line 158: | Line 127: | ||
msgstr "O XFce 4" | msgstr "O XFce 4" | ||
- | now, the translated | + | Agora, a string |
- | should I do the following case?" | + | |
#: ../ | #: ../ | ||
Line 166: | Line 134: | ||
msgstr "%s Info" | msgstr "%s Info" | ||
- | in that case, "'' | + | Neste caso, "'' |
- | be a C format string and, like above mentioned, you'll have to leave "'' | + | |
- | as-is. Simply remove | + | |
#: ../ | #: ../ | ||
Line 175: | Line 141: | ||
msgstr "%s Info" | msgstr "%s Info" | ||
- | (more continues...) | + | (continua...) |
FIXME | FIXME | ||
- | * An explanation for plural | + | * Uma explicação para o mecanismo de plural. |
- | * Commenting with "''#''" | + | * Comentando com "''#''" |
- | ==== 6.1 Translation Context | + | ==== 6.1 Contexto de Tradução |
- | The GUI often uses single words or short word combinations. When used | + | A interface gráfica normalmente usa palavras singulares ou combinação de palavras pequenas. Quando usado como título de um quadro, dois pontos é anexado após o inglês para evitar ambiguidade. Outra possibilidade para evitar ambiguidade especialmente em strings |
- | as a frame title a colon is appended the English to disambiguate its | + | |
- | meaning. Another possibility to disambiguate especially short strings | + | |
- | is using the character | + | |
- | this character, the part up to the "'' | + | |
- | translator and/or simply declare | + | |
- | translated in a certain meaning even if the same word is used with | + | |
- | different meanings in other places. For example | + | |
msgid " | msgid " | ||
msgstr " | msgstr " | ||
- | In the translated | + | Na string |
- | translate the rest only. | + | |
- | ==== 6.2 Order switching | + | ==== 6.2 Mudança de ordem ==== |
- | Sometimes it is needed to switch the order of the c-formats. | + | Algumas vezes é necessário mudar a ordem dos c-formats. |
- | you will have to change the %< | + | |
msgid " | msgid " | ||
msgstr "%2$s space left on device %1$s" | msgstr "%2$s space left on device %1$s" | ||
- | ===== 7 Convert the output to UTF-8 (if it's not already | + | ===== 7 Converta a saída para UTF-8 (se já não está codificada para UTF-8) ===== |
$ iconv -f CHARSET -t UTF-8 ${lang}.po > utf8.po | $ iconv -f CHARSET -t UTF-8 ${lang}.po > utf8.po | ||
$ mv utf8.po ${lang}.po | $ mv utf8.po ${lang}.po | ||
- | Replace | + | Substitua |
- | Europe it's probably | + | |
- | says, and strip the part up to the . (dot). For example: | + | |
$ echo $LC_CTYPE | $ echo $LC_CTYPE | ||
Line 221: | Line 176: | ||
$ mv utf8.po ${lang}.po | $ mv utf8.po ${lang}.po | ||
- | If you use Vim you can also convert lines on the fly like this: | + | Se você usa Vim, você pode também pode converter linhas durante a tradução assim: |
:,!iconv -f ISO-8859-1 -t UTF-8 | :,!iconv -f ISO-8859-1 -t UTF-8 | ||
- | This usually works even if your terminal | + | Isso normalmente funciona mesmo se seu terminal |
- | encoded character sets. | + | |
+ | ===== 8. Conferindo e Enviando o arquivo PO ===== | ||
- | ===== 8. Checking and Submitting the PO file ===== | + | Primeiro, verifique se o seu arquivo |
- | + | ||
- | Firstly, verify whether your PO file is valid: | + | |
$ msgfmt --check --check-accelerators=_ -o /dev/null ${lang}.po | $ msgfmt --check --check-accelerators=_ -o /dev/null ${lang}.po | ||
- | You should get no warnings, but if you got them, fix it following | + | Você deve receber nenhum aviso, mas se você recebeu algum, corrija de acordo com as mensagens de aviso retornadas. Depois da verificação, você pode enviar sua tradução para a plataforma |
- | outputted warning messages. After checking, you can send your | + | |
- | translation to the Xfce Transifex | + | |
- | rights you can follow the instructions found on the translations | + | |
- | in the //Getting started// section. | + | |
- | + | ||
- | Note: This part is so important that please don't post your | + | |
- | translations to the list unless you have no warning. | + | |
+ | Nota: Essa parte é tão importante que POR FAVOR não poste suas traduções para a lista a menos que você não receba aviso na verificação. | ||
- | ===== 9. Template updates | + | ===== 9. Atualizações do modelo |
- | The messages may be changed from release to release and with growing | + | As mensagens podem ser alteradas de lançamento para lançamento e com aumento de funcionalidades, |
- | functionality there will be more messages that should be translated. | + | |
- | Thus, translation isn't something static. Every few month there will | + | |
- | be a few more sentences to be translated. | + | |
- | The following part concerns the project maintainers. To update the PO | + | A parte seguinte trata dos mantenedores de projeto. Para atualizar os arquivos |
- | files to reflect any changes to translatable | + | |
- | in the source files, it requires full source codes in which you'll have | + | |
- | to run | + | |
$ ./ | $ ./ | ||
- | will be required in the each module' | + | Será necessário fazer isso no diretório de cada módulo no começo, para depois simplesmente atualizar seus arquivos: |
- | update your files, | + | |
$ cd po | $ cd po | ||
$ make update-po | $ make update-po | ||
- | This will scan the source files for translatable | + | Isso vai rastrear os arquivos fonte por strings |
- | the file "'' | + | |
- | the POT file. | + | |
- | Sometimes, it requires updating POFILES.in in the first place, when there are strings | + | Algumas vezes, é necessária a atualização do POTFILES.in primeiro, quando há strings |
- | ===== 10. Desktop | + | ===== 10. Arquivos |
- | //The desktop | + | //Os arquivos |
- | The Name, GenericName, | + | As variáveis |
- | format is: | + | |
Key[locale]=localestring | Key[locale]=localestring | ||
- | For example | + | Por exemplo |
Name=Xfce Calendar | Name=Xfce Calendar | ||
Line 286: | Line 223: | ||
Name[he]=לוח שנה Xfce | Name[he]=לוח שנה Xfce | ||
- | Make sure the file stays UTF-8 encoded, language order should be | + | Certifique-se que o arquivo se mantenha codificado em UTF-8, |
- | alphabetically. | + | |
- | This isn't required if you're having translation for SVN trunk version, | + | Isso não é necessário se você estiver recebendo traduções para versão trunk de SVN, ao invés você tem que instalar um intltool |
- | instead you'll have to install decent | + | |
- | "'' | + | |
- | * Here are the desktop | + | * Aqui estão os arquivos |
xfcalendar/ | xfcalendar/ | ||
Line 328: | Line 262: | ||
- | ===== 11. XML files for desktop | + | ===== 11. Arquivos |
- | //The translations for the desktop | + | //As traduções do menu desktop são traduzidas diretamente nos arquivos |
- | You might want to localize desktop | + | Você pode querer localizar o menu desktop |
- | desktop, your files are, | + | |
- | * For the 4.4 branch | + | * Para o ramo 4.4 |
xfdesktop/ | xfdesktop/ | ||
xfdesktop/ | xfdesktop/ | ||
- | to translate into your language, follow the instructions in those files, | + | Para traduzir para seu idioma, siga as instruções destes arquivos. Depois de terminadas traduções e instalação, o menu desktop |
- | after translations and installation finished, the desktop | + | |
- | automatically localized. | + | |
- | Note: If you have already installed those XML files but would like to | + | Nota: se você já tem instalado aqueles arquivos |
- | check your modified translations | + | |
${HOME}/ | ${HOME}/ | ||
- | then, newly translations will appear. | + | Então, as novas traduções aparecerão. |
- | ===== 12. Checking your translations in the actual situation | + | ===== 12. Verificando suas traduções no atual estado |
- | As for the development branch, the relevant module should be built and installed. | + | Com relação ao ramo de desenvolvimento, o módulo relevante deveria ser compilado e instalado. Isso somente se aplica aos bravos e aqueles que sabem o que fazer, instruções e informações deve ser encontradas em outro lugar. |
- | This is only for the brave and those that know what to do, instructions | + | |
- | and information are to be found elsewhere. | + | |
- | As for the 4.4 branch, and assuming that the translator has this | + | Quanto ao ramo 4.4, e pressumindo que o tradutor tenha instalado, é uma questão de executar: |
- | installed, it is a matter of running | + | |
$ msgfmt -c -o ${lang}.mo ${lang}.po | $ msgfmt -c -o ${lang}.mo ${lang}.po | ||
$ su | $ su | ||
- | # cp ${lang}.mo ${xfce-prefix}/ | + | # cp ${lang}.mo ${xfce-prefix}/ |
- | and restarting the application. | + | E reiniciar a aplicação. |
- | ===== 13. Documentation translation | + | ===== 13. Tradução da Documentação |
- | The documentations are translated inside the '' | + | As documentações estão traduzidas dentro dos diretórios |
- | * Maintain the documentation | + | * Mantenha a documentação |
- | - Run the "'' | + | - Execute o script |
- | - Update the POT and PO files with "'' | + | - Atualize os arquivos |
- | - Update the XML files with the newly translated | + | - Atualize os arquivos |
- | Note: you need the '' | + | Nota: precisa da ferramenta |
- | * Compile | + | * Compile |
- | - Run the "'' | + | - Execute o script |
- | - Run "'' | + | - Execute |
- | - The result is compiled inside | + | - O resultado estará compilado dentro de '' |
- | What you should do **as translator**, consists into editing the PO file of your locale | + | O que você tem que fazer **como tradutor** consiste em editar o arquivo |
- | ===== 14. Web page translation | + | ===== 14. Tradução das Páginas |
- | The following command line will checkout | + | O linha de comando abaixo realiza |
$ svn co http:// | $ svn co http:// | ||
Line 395: | Line 322: | ||
===== 15. Feedback ===== | ===== 15. Feedback ===== | ||
- | If you have comments, ideas or corrections, use: | + | Se você tiver comentários, ideias ou correções, use: |
- | + | ||
- | * Xfce translations mailing list < | + | |
- | Your feedback will be gratefully appreciated. | + | * Lista de discussão de traduções do Xfce < |
+ | Seu feedback será muito bem-vindo. | ||
- | ===== 16. Appendix | + | ===== 16. Apêndice |
- | * The complete | + | * O manual completo de GNU gettext: |
- | * http:// | + | * [[http:// |
- | * Standard country codes (ISO 3166): | + | * Padrão de códigos de países |
- | * http:// | + | * [[http:// |
- | * Standard language codes (ISO 639): | + | * Padrão de códigos de idiomas |
- | * http:// | + | * [[http:// |
- | * Freedesktop.org | + | * Especificação de entradas de desktop do Freedesktop.org: |
- | * http:// | + | * [[http:// |
* Translation Project: | * Translation Project: | ||
- | * http:// | + | * [[http:// |
- | * Xfce translations statistics: | + | * Estatísticas de traduções do Xfce: |
- | * http:// | + | * [[http:// |