[pLog-svn] r4895 - plog/branches/lifetype-1.2/tools

Reto Hugi plog at hugi.to
Thu Mar 1 05:01:58 EST 2007


oscar at devel.lifetype.net wrote:
> Log:
> Added a little script to compare two locales, to make sure that they've both got the same trings. Usage:
> 
> php comparelocale.php locale_en_UK.php locale_es_ES.php
> 
> This would return the keys that are in locale_en_UK.php that are not available in locale_es_ES.php.
> 
> The script must be run from the command line, btw.

this is handy for sure, but it basically does what is already included 
in the tranlation tool. Of course I'm to blame for not having documented 
it so far. As it's not exactly the same thing I think it's ok to have it 
as a standalone tool, as it's not writing anything it's a faster way to 
"diff" two language files. Nevertheless here is some more documentation 
just in case...

Some of the not so obvious features:
- the "slave" language file (de_DE, the one with the translated strings) 
will always have exactly the same structure as the master (en_UK). This 
means:
   - if en_UK-admin is compared to de_DE from 1.1 (which contains all 
strings), the written de_DE file will only have the admin strings. -> 
split functionality
   - if en_UK has strings not present in de_DE, they will be written to 
de_DE -> add functionality
   - if en_UK has less strings than de_DE the redundant string will be 
removed -> remove functionality

I understand, that it's scary to use the translator, if you don't know 
what it's doing, but I need some more time for documentation.

cheers,
reto


More information about the pLog-svn mailing list