Review PO file
The following links and information are provided for historical reference and advanced users. The accuracy of the information here is most likely outdated and no support is provided following these documents. Use at your own risk! We strongly recommend users perform their translation work using the Transifex web interface.
As a reviewer, tools to help you doing the job aren't very present, and the current Transifex installation doesn't ease the task either.
When someone sends you a newly translated PO file and you want to check the differences you will need a tool to show you only the changed messages. Hereby you will find a quick-n-dirty shell script that uses basic commands.
The 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
Example
$ 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" [...]
Other resources
There exist other scripts to use for doing the review job of course, you will find them bellow.
- https://edge.launchpad.net/pyg3t – CLI tool podiff
- http://pypi.python.org/pypi/polib/ – Python library to manipulate PO files