Localizable strings file which are used for Apple/iPhone apps localization have the following format:
/* COMMENT */ "KEY" = "VALUE"
Note that KEY is unique in a given strings file.
COMMENT is optional however it can help the translator with some additional info.
Example:
/* Menu item to make the current document plain text */ "Make Plain Text" = "Make Plain Text"; /* Menu item to make the current document rich text */ "Make Rich Text" = "Make Rich Text";
I would like to diff/merge two strings files and optionally sort that kind of files. It would be great if the comments would be kept while doing these operations.
The format is quite simple and I could write let's say a python script to do that, but if somebody has already done that, I prefer not reinventing the wheel ;)
Do you know a tool that can manipulate strings file?
I was desperate to find a decent way to manages Localized.strings
during development, when there are new strings added to the code and you don't want to manually manage all the files.
I found Localization Manager that does this quite well. It has a nonexistent documentation, but comes with a separate program for the translators. It imports your strings, keeps track of changes and exports the needed Localization.strings
files back to your project.
Up till now it seems to be freeware.
Like I said in this post, I recently found a free app called Localizable Strings Merge on the Mac App Store. It does exactly what you ask, even the sorting/beautification. And it is free. Hope it helps.
I found this tool from the Three20 project:
http://github.com/facebook/three20/blob/master/diffstrings.py
It answers my initial need in different way of what I had imagined:
it can diff between the main locale and the other locales to see what needs translating in each other locale.
And then merge back the translated strings.
Note that it outputs xml files to give to the translators.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With