Localizable.strings files.. in xcode4

All of the lines in .strings file should end with a semicolon. It worked for me.


I'm assuming Xcode 4 here. Double check what it shows for the encoding on each of the Localization.string files in the file inspector. When I was having that error it was due to one of the files being read as Mac Roman instead of UTF-16. Once I changed the encoding the warning went away. What was driving me nuts at first was that the warning was only happening in Xcode 4. Xcode 3 did not give it.

You also have an issue with the formatting of your .string file. All of the lines should end in a semicolon.

"LOCAL_APP_GRADE" = "Basic";
"LOCAL_APP_LAST_UPDATED_DATE" = "2011/04/20";
"LOCAL_MAIN_MENU_TITLE" = "Main Menu"; 

I don't think this is the cause of the warning though. At least I've never seen a warning for it. It usually only manifests itself at runtime when LOCAL_MAIN_MENU_TITLE shows up in app instead of Main Menu. It would be nice if the build process did check for semicolons though. It's easy to miss adding one when editing the files.


Per Apple:

If you run into problems during testing and find that the functions and macros for retrieving strings are always returning the same key (as opposed to the translated value), run the /usr/bin/plutil tool on your strings file. A strings file is essentially a property-list file formatted in a special way. Running plutil with the -lint option can uncover hidden characters or other errors that are preventing strings from being retrieved correctly.

Fire up a console window, go into your project folder, and do:

/usr/bin/plutil -lint ja.lproj/Localizable.strings

(obviously replace the correct language folder name). This will tell you exactly where the problem is!