Xcode本地化更新 [英] Xcode Localization Update

查看:127
本文介绍了Xcode本地化更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我使用Use Base Internationalization在Xcode中本地化了一个故事板。

So I have localized a storyboard in Xcode using Use Base Internationalization.

我进去并翻译了字符串文件中的所有字符串。好极了。这花了很长时间。

I went in and translated all the strings in the strings files. Yay. That took forever.

现在我在故事板的基础文件中添加了一个新元素。它有一个标签,带有我需要国际化的字符串。我保存它,构建它等等。但是在我漂亮的字符串文件中找不到新元素。

Now I added a new element in the base file of my storyboard. It has a label in it, with a string that I need to internationalize. I saved it, built it, etc. But that new element is nowhere to be found in my pretty strings files.

请不要告诉我,我现在必须手动添加我的所有元素?

Please do not tell me that I now have to manually add ALL of my elements?

推荐答案

Xcode发行说明说:


要使用用户
接口文档中的新内容重新同步字符串文件,请使用
ibtool命令的--generate-stings-file选项生成新的字符串文件。然后,手动将
新文件合并到现有的本地化字符串中。

To resynchronize your strings files with new content from your user interface documents, use the --generate-stings-file option of the ibtool command to produce new strings files. Then, manually merge the new files into your existing localized strings.

这很蹩脚,但你去了。您可以使用FileMerge之类的东西来帮助您理清差异。 (我们有一组脚本读入字符串文件并以这种方式合并;编写这样的东西并不难。)

That's pretty lame, but there you go. You could use something like FileMerge to help you sort out the differences. (We have a set of scripts that read in the strings files and merges them that way; it's not too hard to write such a thing.)

这篇关于Xcode本地化更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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