Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localizable.strings error - compiler says file is missing

I tried adding a Localizable.strings file and add some strings to test with, everything works fine.

However, when I try to add a localization things starts to get weird. I am able to add a localization (english and russian) and I can see in finder that the files are listed in the two folders; ru.lproj and en.lproj.

When I clean and build I get the following compilation error:

Copy .strings file Error
The file "Localizable.strings" couldn't be opened because there is no such file.
like image 722
user373455 Avatar asked Oct 09 '12 20:10

user373455


1 Answers

Fixed it by a push in the right direction from this link provided by tiguero in the comment.

I looked further into the .pbxproj file and found this funky row, that looked fishy:

    6AAE55EC1551A42500C1F3F0 /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = "<group>"; };

I removed it, cleaned and rebuild. It is now replaced by the following line:

6AC473DC1624BF3E00503305 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6AC473DE1624BF3E00503305 /* Localizable.strings */; };

And it works!

like image 167
user373455 Avatar answered Oct 25 '22 11:10

user373455