no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | translations:review-po-file [2011/07/25 22:31] (current) – created mike | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Review PO file ====== | ||
+ | |||
+ | As a reviewer, tools to help you doing the job aren't very present, and the current Transifex installation doesn' | ||
+ | |||
+ | 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 ===== | ||
+ | |||
+ | <code bash> | ||
+ | #!/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 " | ||
+ | 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/ | ||
+ | $ 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 | ||
+ | #: ../ | ||
+ | -#, c-format | ||
+ | +#, fuzzy, c-format | ||
+ | msgid "%g px" | ||
+ | -msgstr "" | ||
+ | +msgstr "%g px" | ||
+ | | ||
+ | #. miliseconds value for some of the scales in the dialog | ||
+ | #: ../ | ||
+ | -#, 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:// | ||
+ | * http:// | ||