Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: Update Localizable.strings files using genstrings?

I have generated my strings file correctly using genstrings. I have changed the localized strings for my different languages. Now, I have added a few more NSLocalizedString() occurrences and I want to generate those into all of my localized strings files.

But, running genstrings again does not seem to update my strings files. Am I doing something wrong?

like image 659
Nic Hubbard Avatar asked Sep 29 '10 22:09

Nic Hubbard


1 Answers

Usually this is because you've got genstrings looking in the wrong folder, or in the wrong files. I had a problem where it wasn't picking up all of my strings, and I realized it was only searching for *.m files (not *.mm) and it wasn't parsing the files in my Classes folder. A small change fixed that:

genstrings -o Classes/en.lproj Classes/*.{m,mm}

The first parameter tells genstrings where I want the .strings file.

  • -o Classes/en.lprog

The second parameter tells genstrings where to look. Remember I'm running genstrings from the project root, so I needed to specify Classes/.m, or more specifically Classes/.{m,mm} so it would parse .m and .mm files.

like image 156
Terry Blanchard Avatar answered Sep 21 '22 21:09

Terry Blanchard