Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an easy way to merge Localizable.strings files?

Problem: Using genstrings to create Localizable.strings files from a project. A few weeks later, some things changed and I run genstrings again. 75% of the new file is already in the old file. How could I merge the new file with the old file, so that the old file contains all of those 25% new key-value-pairs?

like image 987
dontWatchMyProfile Avatar asked May 18 '10 09:05

dontWatchMyProfile


3 Answers

I recommend Localizable Strings Merge too. I use it on my projects and it really a simple to use and powerful software.

like image 187
Dominique Vial Avatar answered Nov 12 '22 11:11

Dominique Vial


I just found the Localization Suite. Incredible powerful tool for free. I tried it on my project and it just works. Lacks documentation though.

like image 25
Martin Wickman Avatar answered Nov 12 '22 11:11

Martin Wickman


I use a script to run genstrings with existing translations merged automatically when I build a project. Updated strings are detected by git or another source control you use. The script supports storyboard and xib localization too.

To run the script automatically, put the script into your project root directory, and add a Run Script phase with the following line to a target build phases in your project settings.

./mergegenstrings.py PathToSourceDir

My script is based on the script in this post. I modified it to support Swift and to add the arguments.

like image 1
Yoichi Tagaya Avatar answered Nov 12 '22 11:11

Yoichi Tagaya