Error while “Export For Localization..” Xcode 6.3

后端 未结 6 1722
自闭症患者
自闭症患者 2020-12-14 17:57

I want to add some new languages to my projects but after clicking Editor -> Export For Localization -> Save, I get the following error:

         


        
相关标签:
6条回答
  • 2020-12-14 18:09

    In my case, I play the problem with these steps:

    In xcode 6.3: 1. Do a regex search for \@\".\'.\" in the whole project. 2. I found no localized string have ', but quite a lot of sting in FMDB source code has SQL comment with '...

    So, I Download the xcode 6.2 again, install it and "Export for Localization..." comes back!(spent me half and hour)

    0 讨论(0)
  • 2020-12-14 18:20

    The issue seems to be in Xcode 6.3, that the XLIFF parser suddenly chokes on unescaped quotes ('). A solution seems to be to escape (with a backslash) all instances of quotes in your source code, e.g replace @"Foobar's" with @"Foobar\'s".

    0 讨论(0)
  • 2020-12-14 18:23

    Be careful with XIB/Storyboard files that are localized but don't have any UI element to localize.

    Those files happen to generate empty .strings files. Those empty .strings files cause the parser to throw an error, like the following: Failed to read strings file, underlying error: The data couldn't be read because it isn't in the correct format.

    Removing the localization for those files worked for me.

    0 讨论(0)
  • 2020-12-14 18:33

    There's an Xcode 6.3.2 GM seed available in the developer portal downloads section. It fixed the problem for our project.

    0 讨论(0)
  • 2020-12-14 18:34

    Accepted answer has an issue: after exporting and import back localisations - escape sign is gone!

    As @progrmr mention in comments - there is better workaround to replace ' with left single quote sign! (option - shift - ] on OS X)

    0 讨论(0)
  • 2020-12-14 18:36

    Is fixed in today release of Xcode Version 6.3.2

    0 讨论(0)
提交回复
热议问题