[Caminol10n] status on camino 2

Smokey Ardisson alqahira at ardisson.org
Mon Jun 22 21:31:57 PDT 2009


At 12:47 AM +0200 on 6/23/09, Stefan Livens wrote:

>Can you explain a bit more about how you created the cocoa strings 
>from the gecko strings? Do you have some kind of script to do it?

I wrote an AppleScript that did part of the file renaming (there were 
bugs and things I had to fix manually; I don't think I ever fixed 
that script) and then I wrote a hunk for Camino's Makefile to handle 
the transformation of the contents into Cocoa .strings syntax and 
UTF-16 using sed and iconv.

>In that bugzilla bug 
>(https://bugzilla.mozilla.org/show_bug.cgi?id=394105) there is some 
>talk about a reg-exp, but it's not there in the second version?

Yeah, the final version of the patch just checked in the files I had 
generated locally instead of using the regexp to generate them during 
the build process. I dug around in my patch archives and it looks 
like the final fixed sed+iconv rule I used was:

sed -E -e "s/^#(.*)$$/\/\* #\1 \*\//" \
        -e 's/\"/\\\"/g' \
     -E -e "s/^([^\"#= ]*)([[:space:]]*)=([[:space:]]*)(.*)$$/\"\1\" = 
\"\4\";/" $< | \
iconv -f UTF-8 -t UTF-16 > $@

where $< was the input file and $@ was the output file (that's 
Makefile syntax).  That third line is probably going to wrap badly 
:-( so I've also placed the snippet on 
http://wiki.caminobrowser.org/User:Sardisson/Localizing_Gecko_Strings 
You should be able to reuse that in a shell script (or any other 
scripting language you're familiar with).

>And, btw, for your wiki about the used/unused/forked files, I think 
>"global_locale_config_properties.strings" is also a forked one, 
>because the camino2 version contained 2 more strings than the one 
>from firefox.

When I did my initial pass, I just looked at Core files we had forked 
for Camino and which Core files Firefox had forked; I didn't look to 
see if any of the properties files were forked between XPFE and 
Toolkit, too, which is the case for that file.  I've added it to the 
* list.

Hope this helps,
Smokey
-- 
Smokey Ardisson
alqahira at ardisson.org
http://www.ardisson.org/
------------------------------------------
"He is a fool who has forgotten what became of his ancestry
seven generations before him and who does not care what will
become of his progeny seven generations after him."
           --Kazakh Proverb


More information about the Caminol10n mailing list