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

前端 未结 2 579
北恋
北恋 2021-02-15 16:39

This is the Objective-C code:

NSString *text = NSLocalizedString(@\"Test \\\"this is a sample text\\\"\", @\"Test \\\"this is a sample text\\\"\");
2条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-15 17:34

    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.

提交回复
热议问题