Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 localization. export .xliff file will cut the string when the string is like "this is sample \"text\""

This is the Objective-C code:

NSString *text = NSLocalizedString(@"Test \"this is a sample text\"", @"Test \"this is a sample text\"");

and this is the result in .xliff file:

enter image description here

So as you can see, the id and source is missing. Can any one fix this? Or it is Xcode bug?

like image 545
Vito Ziv Avatar asked Sep 29 '14 08:09

Vito Ziv


2 Answers

It seems Xcode 6.3 fixed this bug.

like image 117
Vito Ziv Avatar answered Oct 27 '22 17:10

Vito Ziv


Seems to be a bug in the way Xcode handles the .strings -> .xliff conversions, and so on. You'll have to wait for Apple to fix it.

May I suggest using curly quotes in the meantime?

@"Text “this is a sample text”"

It seems to export to XLIFF properly.

like image 37
Matt Mc Avatar answered Oct 27 '22 16:10

Matt Mc