David Farning
dfarning at sbcglobal.net
Fri Nov 11 06:53:05 CST 2005
I have put together the following script to test the roundtrip
transformations of moz2po and back to po2moz.
wget -N
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0.7/linux-i686/xpi/en-US.xpi
moz2po -i en-US.xpi -o firefox-pot/ -P
for lang in $LANGS
do
wget -N
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0.7/linux-i686/xpi/${lang}.xpi
moz2po -i ${lang}.xpi -o firefox-po-${lang} -t en-US.xpi
po2moz -l ${lang} -i firefox-po-${lang} -t ${lang}.xpi -o
${lang}.new.xpi
unzip -o ${lang}.xpi -d ${lang}.xpi.tmp/
unzip -o ${lang}.xpi.tmp/chrome/${lang}.jar -d ${lang}.xpi.tmp/chrome/
rm -f ${lang}.xpi.tmp/chrome/${lang}.jar
unzip -o ${lang}.new.xpi -d ${lang}.xpi.new.tmp/
unzip -o ${lang}.xpi.new.tmp/chrome/${lang}.jar -d
${lang}.xpi.new.tmp/chrome/
rm -f ${lang}.xpi.new.tmp/chrome/${lang}.jar
diff -uBwbEir ${lang}.xpi.tmp ${lang}.xpi.new.tmp > ${lang}.diff
done
I have post the results to
http://www.rtklib.org/roundtriptests/ff_1.0.7_xpi/
This test only looks at xpi transformations for 1.0.7.
The diffs show a number of transformation problems such as dropping '\t'
and '\n' and the beggining and end of translated strings. These can be
easily fixed.
Of more concern are formatting problems such as converting unicode
from /00ab to /00AB and changing
dog=cat and
dog = cat to
dog = cat (one whitespace surrounding = sign)
This second set of problems represent equal content but different
formatting which appears different to the upstream cvs.
I'll put some more test together to check 1.5 and cvs(non xpi)
transformations.
thanks
-dtf
More information about the rosetta-users
mailing list