Thursday, May 31, 2012

How to export and sign-off translations from Narro for Mozilla Firefox

Hi,
For few years I have been trying to help the Mozilla Armenian localization initiative (even though I can't read/write Armenian myself). A friend of mine asked me if I could do a screen cast showing how I export the translations that the localizers translate.

Excuse my lengthiness and, perhaps, not clarity that a well thought video could have avoided. Release early it is said.

Here is a 15 minute screen cast explaining this:


Here is the script that I run during the video:
modules=( browser dom netwerk security toolkit); \
for module in ${modules[@]}; do cd $module; \
for file in `find .  -name "*dtd" -type f`; do \
cat /Users/armenzg/repos/armenian/header.dtd $file > $file.new; mv $file.new $file; done; \
for file in `find . -name "*properties" ! -name region.properties -type f`; do \
cat /Users/armenzg/repos/armenian/header.properties $file > $file.new; mv $file.new $file; done; \
cd ..; done;

FIND="browser dom netwerk toolkit services security"

for file in `find $FIND -name "*dtd"` ; do \
sed '${/^$/d;}' $file > $file.new && mv $file.new $file ; done
for file in `find $FIND -name "*properties"`; do \
sed '${/^$/d;}' $file > $file.new &&  mv $file.new $file ; done
for file in `find $FIND -name "*ini"`; do \
sed '${/^$/d;}' $file > $file.new && mv $file.new $file ; done

hg revert dom/chrome/layout/xmlparser.properties \
dom/chrome/layout/htmlparser.properties
for file in `hg st -un | grep searchplugins`; do rm $file; done
for file in `find . -name "*orig"`; do rm $file; done

cd ../compare-locales && git pull && cd - && \
cd ~/repos/branches/mozilla-aurora && hg pull -u && hg up -C; \
cd ~/repos/armenian/hy-AM_aurora

PYTHONPATH=../compare-locales/lib python \
../compare-locales/scripts/compare-locales \
~/repos/branches/mozilla-aurora/browser/locales/l10n.ini \
../hy-AM_aurora .
Here is a list of the three posts I have made about Narro:
http://armenzg.blogspot.ca/search/label/narro


Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.