This is an old revision of the document!
Revisão de Arquivos PO
We are deprecating the localised wiki.xfce.org pages in favour of the official documentation, which is always kept up to date. This page will be deleted on 1 November 2026. A copy will be preserved on archive.org for historical purposes.
Como um revisor, ferramentas para ajudá-lo nesta tarefa não são muito presente, e atualmente a instalação do Transifex também não facilita esta tarefa.
Quando alguém envia a você uma arquivo PO recém-traduzido e você quer verifcar a diferença, você precisará de uma ferramenta para exibir somente as mensagens alteradas. Aqui, você encontrará um shell script rápido-e-direto que usa comandos básicos.
O Script
#!/bin/sh PO_ORIG=$1 PO_REVIEW=$2 PO_TEMPL=$3 MSGMERGE=msgmerge DIFF=diff PAGER=more RM=/bin/rm MKTEMP=mktemp # Usage if test "$1" = "" -o "$2" = "" -o "$3" = ""; then echo Usage: $0 orig.po review.po template.pot exit 1 fi # Merge TMP_ORIG=`$MKTEMP po-orig.XXX` TMP_REVIEW=`$MKTEMP po-review.XXX` $MSGMERGE $PO_ORIG $PO_TEMPL > $TMP_ORIG 2> /dev/null $MSGMERGE $PO_REVIEW $PO_TEMPL > $TMP_REVIEW 2> /dev/null # Diff $DIFF -u $TMP_ORIG $TMP_REVIEW | $PAGER # Clean up files $RM $TMP_ORIG $TMP_REVIEW
Exemplo
$ cd xfce4-settings/po $ msgdiff.sh Usage: msgdiff.sh orig.po review.po template.pot $ msgdiff.sh fr.po 127.fr.po xfce4-settings.pot [...] @@ -899,15 +899,15 @@ #. pixel value for some of the scales in the dialog #: ../dialogs/mouse-settings/main.c:142 -#, c-format +#, fuzzy, c-format msgid "%g px" -msgstr "" +msgstr "%g px" #. miliseconds value for some of the scales in the dialog #: ../dialogs/mouse-settings/main.c:152 -#, c-format +#, fuzzy, c-format msgid "%g ms" -msgstr "" +msgstr "%g ms" [...]
Outros Recursos
Há outros scripts que podem ser usados para fazer o trabalho de revisão, é claro, e você encontra alguns deles logo abaixo.
- https://edge.launchpad.net/pyg3t – podiff, uma ferramenta de linha de comando
- http://pypi.python.org/pypi/polib/ – biblioteca Python para manipular arquivos PO