To extract the string "marked" with NSLocalizedString
in my iOS app, I use the following terminal command:
find . -name \*.m | xargs genstrings -o ro.lproj
This will basically extract all the marked strings in all the .m files and put them in the Localizable.strings file inside my project romanian's folder.
My problem is that I don't manage to get it to update the strings file. If I change/add some strings it will overwrite my old strings file.
I've look to the arguments the genstrings
accepts, looked on the man page, and I don't seem to find the option to update the file instead of overwriting it.
How do I update the translation file ?
genstrings
doesn't do updates. If it did you'd still be stuck with the problem of what to do to manage updates to the localized files (which require the attention of a translator to make changes to their translations, particularly for edited source strings, so they need to see the differences in the source text).
There are tools designed for this. For example the Localization Suite desktop app (http://www.loc-suite.org/) and the Gengo String web app (http://gengo.com/string/about/)