[Caminol10n] using firefox files for camino

Marcello Testi m.testi at gmail.com
Wed Jul 8 15:37:19 PDT 2009


I must admit I couldn't wait to try this trick that would save us a  
lot of time!
So, I tried and here's my take.
First, I don't think the spreadsheet steps are necessary. I did pretty  
much all it takes using just TextWrangler, the free text editor from  
the makers of BBEdit. I guess that any text editor with grep abilities  
and that plays nice with Unicode would do as well.

1) get firefox in your language.
2) inside the .app bundle, you have to look for your language:  
Firefox.app/Contents/MacOS/chrome/
3) here you find a file called "nl.jar" (in my case) (or you can use  
the folder "locale", which has a "nl" folder inside, I don't if there  
are differences between the jar file and the folder)
4) rename (or duplicate) to nl.zip, and open it.
5) now you have a list of files with the translations used in Firefox.
6) open a file which has translations you want to use. I use  
TextWrangler, which supports grep.
7) eliminate the lines starting with # (they are comments and are  
mainly positioned at the beginning of the file) TO DO: write a simple  
regexp to empty those lines
8) do an initial find/replace (no grep) in order to escape double quotes
	Find: "
	Replace: \"
9) do another find/replace with grep enabled
	Find: ([^\s]*) = (.*)
	Replace: "\1" = "\2"
it will wrap double quotes around the strings to the left and to the  
right of the = sign
10) right click on your "globale_locale_ ... properties.strings" file,  
and select the option "Translate using external strings file "
11) all the strings are there in iLocalize! (except for the identical  
ones, or not translated), you have to approve the translations, and  
it's done!

These steps have been tested on a handful of files. Any reports on  
using them, comments and suggestions for improvement are welcome.

PS - Your fellow Firefox translators might have made some mistakes:  
don't forget to review the strings yourself and to pass them to your  
reviewer.

Thanks again for your input, Stefan.
Ciao.
Marcello.



More information about the Caminol10n mailing list