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

[亡魂溺海] 提交于 2019-12-04 19:51:18

问题


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:

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


回答1:


It seems Xcode 6.3 fixed this bug.




回答2:


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.



来源:https://stackoverflow.com/questions/26095633/xcode-6-localization-export-xliff-file-will-cut-the-string-when-the-string-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!