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?
-
I have the same problem even after upgrading to 6.3.2 (6D2105). This used to work pretty well... – leonard May 22 '15 at 07:14
-
FYI: Check this https://openradar.appspot.com/21056545 – skywinder Sep 15 '15 at 10:19
4 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:
- Empty
Localizable.strings
file.
Solution: Just add comment
/** no localizable strings **/
to this file and problem is gone.
- 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

- 21,291
- 15
- 93
- 123
-
Empty file was the culprit for me. Adding that comment and doing the import again fixed it. – ckbhodge Oct 15 '16 at 09:59
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.

- 1,381
- 1
- 13
- 29
-
That it scans commented text is not that weird. It just reads all the files for certain regex matches. The regex is completely unaware of the 'code' it self or the logic behind it. – Saren Inden Jun 08 '16 at 12:39
-
At last! thanks... not expected at all... thank you... so much time I spent on it... I wish i could up vote 3000 times – Yitzchak Sep 26 '16 at 18:02
I had a similar problem. Check in the system log for the entry "Xcode: [MT] DVTAssertions". (Applciations->Utilities->Console.app)
For example:
5/13/16 3:08:24.675 PM Xcode[15546]: [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-10188.1/IDEFoundation/Localization/IDELocalizationWork.m:355
Details: Failed to read strings file "Controllers/FindMyPhone/fr.lproj/TILMarkPhoneLostMessageViewController.strings", underlying error:
Comments parser output:
{
"OGQ-Dm-sLB.text" = "Au secours, je suis perdu**U00A0**! Veuillez appeler mon propri\U00e9taire.";
"reH-FM-KQF.text" = "Envoyez un message \U00e0 la personne qui trouve votre t\U00e9l\U00e9phoneU00A0; celui-ci s\U2019affiche sur l\U2019\U00e9cran de verrouillage, accompagn\U00e9 de votre num\U00e9ro de t\U00e9l\U00e9phone. ";
}
does not match:
{
"OGQ-Dm-sLB.text" = "Au secours, je suis perdu\U00a0! Veuillez appeler mon propri\U00e9taire.";
"reH-FM-KQF.text" = "Envoyez un message \U00e0 la personne qui trouve votre t\U00e9l\U00e9phone\U00a0; celui-ci s\U2019affiche sur l\U2019\U00e9cran de verrouillage, accompagn\U00e9 de votre num\U00e9ro de t\U00e9l\U00e9phone. ";
}
Object: Method: -work Thread: {number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
As you can see in my case the problem was related with the 'NO-BREAK SPACE' (U+00A0) unicode character. When exporting for localization, xcode is expecting the code to be \\U00A0
, but in my string file is \U00A0
(otherwise the app shows the characters instead of a space...). Sounds like a bug in xcode to me. If you want a quick and dirty solution I would say search in all the project for \U00A0
and replace it for \\U00A0
only for the export (and once you get the xliff undo those changes again).
System log:

- 484
- 4
- 6
-
This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](http://stackoverflow.com/questions/ask). You can also [add a bounty](http://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](http://stackoverflow.com/help/whats-reputation). - [From Review](/review/low-quality-posts/12347964) – Zigii Wong May 14 '16 at 04:27
-
1@Wongzigii actually it explains how to fix the problem... so it can be considered a solution (btw for me it worked...) – MatterGoal Jun 06 '16 at 09:59
-
1Escaping the slash worked for me (so two slashes, not three: \\U00a0). (Also, it does answer the question as asked; this was not the asker's problem, but the symptoms are the same, so it's the question users who have the unicode character escape problem will search for.) – LoriHC Jun 07 '16 at 12:58
I had the same problem when tried to use NSLocalizedString
with own NSBundle
specified. I have fixed this by just redefining the NSLocalizedString
function like that:
public func NSLocalizedString(key: String, tableName: String? = nil, bundle: NSBundle = NSBundle.mainBundle(), value: String = "", comment: String) -> String
{
return yourBundleHere.localizedStringForKey(key, value: value, table: tableName)
}
Replace yourBundleHere
with NSBundle.mainBundle()
or what ever you want.

- 1,108
- 9
- 8