Xcode reports that Infoplist.strings already exists when I import localization

So, I have an Xcode project, and I added a language for localization. I exported the xliff file, added the translation, and imported it back into Xcode. Everything is working fine.

Then, at a later point, I added new lines, so I need to update the translation. I repeat this process, but when I import the localization, I get the following error message:

"InfoPlist.strings" cannot be moved to "nb.lproj" because an item with the same name already exists.

Localization is not updated. Does anyone know what causes this? I tried moving InfoPlist.strings from the nb.lproj directory, but that didn't make any difference, and a new InfoPlist.strings file InfoPlist.strings not created.

Why can not Xcode just overwrite the file if it needs to be replaced?

+2
source share
2 answers

I hope you already solved this, but I had the same problem; maybe this will help someone.

I ended up using find . -name "InfoPlist.strings" find . -name "InfoPlist.strings" in the workspace directory and found that in addition to what I deleted, there were two more InfoPList.strings objects.

As soon as I delete them, my import worked again.

0
source

You probably just deleted the link from Xcode. Browse to the actual location of the file you want to delete. In other words, a place to search. If the file is still there, manually delete it.

I came across some strange behavior with localization files, when Xcode did not ask if I want to delete the link to the file or send it to the trash, it will simply "delete". It later turned out that this was only removing the link in Xcode.

-one
source

All Articles