iPhone SDK 2.2 Localizable.strings bug

Posted December 7th @ 7:12 pm by admin

In the latest release of the iPhone SDK 2.2 (9m2621) there is an issue concerning the localization procedure.

When the input string file is utf-8 and “Strings file Output Encoding” is set to binary, the resulting file isn’t Localizable.string but Localizable.string.XXXX where XXXX is a pid number.

To correct this issue you can patch the ruby script copystrings located in /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings.

Simply change line 134 from:

system('plutil -convert binary1 -s -o "' + OPTIONS[:OutputDir] + '/' + 
File.basename(path) + '" -- "' + path + '"')

to

system('plutil -convert binary1 -s -o "' + OPTIONS[:OutputDir] + '/' + 
File.basename(path.gsub(".#{Process.pid}","")) + '" -- "' + path + '"')

1 Trackbacks/Pingbacks

  1. Pingback: iPhone SDK 2.2 Localizable.strings bug - Bocol & Remember Me on February 9, 2009

5 Comments

  1. Alfonso
    December 9, 2008 at 22:39

    Thank you so much!! I’ve been stuck with this for 2 hours now!! I was getting nuts!

  2. Lucas
    December 21, 2008 at 11:53

    Very usefull tip .. thanks a lot

  3. johnny
    January 3, 2009 at 11:06

    bvcqB6 Thanks for good post

  4. hristo
    January 10, 2009 at 22:33

    Thanks a lot! Saved me a lot of time trying to figure out why strings were not showing up.

  5. Marco Papa
    January 17, 2009 at 03:17

    Man, you saved me big time!! And Google put you at the top. Thanks a million,

Sorry, comments for this entry are closed at this time.

Options:

Size

Colors