当我导入本地化时,Xcode 说 Infoplist.strings 已经存在 [英] Xcode says Infoplist.strings already exists when I import localizations

查看:28
本文介绍了当我导入本地化时,Xcode 说 Infoplist.strings 已经存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个 Xcode 项目并且我添加了一种本地化语言.我导出了 xliff 文件,添加了翻译并将其导入回 Xcode.一切正常.

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

然后,稍后,我添加了新字符串,因此我需要更新翻译.我重复这个过程,但是当我现在导入本地化时,我收到以下错误消息:

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

InfoPlist.strings"无法移动到nb.lproj",因为一个项目已存在同名.

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

本地化未更新.有谁知道这是什么原因造成的?我试图将 InfoPlist.strings 移出 nb.lproj 目录,但没有任何区别,也没有创建新的 InfoPlist.strings 文件.

The localization is not updated. Anyone know what's causing this? I tried to move InfoPlist.strings out of the nb.lproj directory but it didnt make any difference and no new InfoPlist.strings file was created.

如果需要替换文件,为什么 Xcode 不能直接覆盖它?

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

推荐答案

希望你已经解决了这个问题,但我遇到了同样的问题;也许这会帮助某人.

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

最终,我使用了 find .-name "InfoPlist.strings" 在工作区目录中,发现除了我删除的一个之外,还有另外两个InfoPList.strings.

Ultimately, I used find . -name "InfoPlist.strings" in the workspace directory, and found that there were two other InfoPList.strings in addition to the one I had deleted.

一旦我删除了它们,我的导入又可以工作了.

Once I deleted them, my import worked again.

这篇关于当我导入本地化时,Xcode 说 Infoplist.strings 已经存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆