2
votes

I was working with xliff file without any issues translating one of my apps to spanish. Now all of sudden Xcode's "Export for Localization" feature has stopped working. If I go to Editor->Export for Localization nothing happens, I am asked where I want to save the xliff file but when I select a location nothing happens. If I try to do the export again I get an error message saying: "There is a localization operation in progress".

I've tried restarting Xcode and my computer to no avail. Has anybody else encountered this issue?

1

1 Answers

2
votes

I just ran into the same problem! In my case, it was because the file Localizable.strings contained strings with quotes in them.

E.g. your file may contain something like this line:

"This is a “test”." = "Das ist ein "Test".";

Xcode's code highlighting will show that something is wrong:
Code Highlighting
The original English sentence works because the quotes in the string are smart quotes, but the quotes in the German translation interrupt the string and make it invalid.

This problem could be in any of your strings files, like Localizable.strings, InfoPlist.strings etc. To find lines like this in a large strings file, you can search by Regular Expression with this expression:

(".*){5}

This will find all lines that have more than 4 quotation marks. As I mentioned, smart (curly) quotes are accepted. You can use normal quotes by escaping them - so this would also be acceptable:

"This is a “test”." = "Das ist ein \"Test\".";