This script is useful for maintaining localization of .strings files in Cocoa applications.
It compares two files (the new unlocalized one and the old localized one) and merges their strings into a new file. New strings, that have no translation, are put at the end of the file so that it's easy to complete them. This script reads and generates both plain .strings files (UTF-16 encoding) and XML plist files (UTF-8) encoding.
Three arguments are required when calling tinyglot.pl:
old_file: the latest localized file
new_file: the newest unlocalized file
output_file: where the two above are merged to (keys will be taken from new_file and values will be taken from old_file)
- tinyglot-1.1.source (12kb)
Just rename it to tinyglot.pl and then do a "chmod 755 tinyglot.pl".
- Unicode::String (available from CPAN)
To install it, just type "perl -e shell -MCPAN" and then "install Unicode::String".
Version 1.0 (17-Dec-2002):
- - new
Version 1.0.1 (1-Feb-2003):
- - fixed a bug in output file
Version 1.1 (21-Dec-2004):
- - fixed a couple of bugs that prevented tinyglot to read strings using escaped quotes or unescaped keys as in InfoPlist.strings files (thanks to Wincent Colaiuta for the patch)