Xcode 6.1 error while trying to "Export for localization"

I added localization to my project in Xcode 5.x and used the tools on hand at this time.

Now I have added new lines and updated the storyboards, so I need to update my translations. Therefore, I tried to export my translation using the menu "Editor | Export for localization ...". It invokes a dialog, but when you click OK, Xcode presents an error for a second:

"/Applications/Xcode.app/Contents/Developer/usr/bin/extractLocStrings completed with status 1"

and then it will work.

Any ideas why I can't export localization?

+6
source share
2 answers

I also had this problem, and it turned out that the easiest way to determine which file is potentially UTF-8 is if you have hundreds of files to use the command line call:

xcodebuild -exportLocalizations -localizationPath <dirpath> -project <projectname> [[-exportLanguage <targetlanguage>]] 

This will give you a more useful error:

The input file /path/to/your/file/filename.m cannot be read in UTF-8 encoding

 xcodebuild: error: /Applications/Xcode.app/Contents/Developer/usr/bin/extractLocStrings exited with status 1 

Hope this helps others :)

+7
source

I had the same problem: allowed change in .m file of text located in the western (Mac OS Roman) to UTF-8

+2
source

Source: https://habr.com/ru/post/981067/


All Articles