Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 localization failed to read a strings file

Xcode fails to generate xliff localization file with error localization failed to read a strings file. Please check the system log for more details. Does anyone know where do I find these logs? It's Xcode 6.3.2 GM but I've tried the 6.3.1 version as well. With 6.3.1. the error is on specific file but inside that file isn't nothing unusual. Furthermore I've tried to remove that file but I'm getting the same error although the file isn't there anymore. Does anyone idea why?

like image 473
Aleš Oskar Kocur Avatar asked May 11 '15 07:05

Aleš Oskar Kocur


2 Answers

Does anyone know where do I find these logs?

Open Console app. And search in system.log "strings" for example.

Does anyone idea why?

There is a several problems, that cause this error:

  1. Empty Localizable.strings file.

Solution: Just add comment

    /** no localizable strings **/

to this file and problem is gone.

  1. The 2-nd problem in escape symbol: \

Solution: Remove it and figure out something with your special chars. And probably your export process will complete without errors.


P.S.

  • Still actual at least for Version 6.4 (6E35b)
  • Related openradar bug-report
like image 156
skywinder Avatar answered Oct 28 '22 00:10

skywinder


Well at last, I have solved that by removing all NSLocalizedString macros from code because the xliff exporter looks into code for them and based on results he looks for a strings files. The odd thing is that he scans comments too, so simply comment unwanted NSLocalizedString macros won't help.

like image 30
Aleš Oskar Kocur Avatar answered Oct 28 '22 02:10

Aleš Oskar Kocur