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

2

8

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?

Victorinavictorine answered 29/9, 2014 at 8:33 Comment(4)
I have the same problem. I think it's an Xcode bug.Yuyuan
Same here... pretty annoying!Other
I have the same problem in Xcode 6. Very annoying.Malvina
I have the same problem with Xcode 6.1 and 6.1.1. I have filed a bug to AppleCorallite
V
2

It seems Xcode 6.3 fixed this bug.

Victorinavictorine answered 15/4, 2015 at 3:30 Comment(1)
Great, they fixed double quotes with Xcode 6.3 but 6.3 broke apostrophes!?Hip
A
1

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.

Aiguillette answered 4/2, 2015 at 18:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.