[OSM-dev] Improved i18n diff script for railsport translators

Ævar Arnfjörð Bjarmason avarab at gmail.com
Mon Jun 22 17:57:12 BST 2009


I improved the script/locale/diff program in railsport. It can now
spew out a list of keys that are equivalent between two YAML files,
this is useful for finding out what you have to translate, or to
produce stats, e.g.:

(for translation in $(ls *yml|grep -v en.yml); do (perl
../../script/locale/diff --untranslated-values en.yml $translation |
wc -l | tr '\n' ' ') && echo $translation; done)|sort -n
33 zh-TW.yml
43 pt-BR.yml
48 de.yml
83 sl.yml
88 es.yml
106 pl.yml
108 ru.yml
115 it.yml
118 ja.yml
119 be.yml
126 zh-CN.yml
149 is.yml
150 nl.yml
371 ko.yml
400 el.yml
422 fr.yml
443 hi.yml
510 ca.yml
563 he.yml
606 yo.yml

That's the number of untranslated keys in each .yml file in
config/locales. It's not 0 in any of them because some of the keys
haven't been translated on purpose, or are equivalent to English.

I also improved the old --keys diff which now has a higher signal to
noise ratio.

And finally, is this the preferred mailing list to talk about i18n
issues? Maybe we should have some forum especially for this as
interest in matters that concern i18n in rails are probably pretty
orthogonal to the general concerns of -dev. And people who are just
interested in translating the website to their language are thus
unlikely to sign up.




More information about the dev mailing list