Search code examples
localizationxcode6xliff

Xcode 6.1 - XLIFF file contains duplicated keys


I exported the localization xliff file with no errors. I localized the file, imported back to Xcode and ran the app. Everything was good.

I exported the localization xliff file again for a second-round localization. I found many keys duplicated and they are not translated, of course. Why did this happen? Is it a bug in Xcode? How to work around it?

Side Note that might be helpful: I have test targets.


Solution

  • As I expected, the Export XLIFF file includes localisation strings in test targets too. I am using Xcode 6.2 now and still there is no way to exclude test targets from this process.

    I had to open the file using a text editor (for example, TextEdit) and remove all the localisation nodes for test targets.