你如何访问Xcode中的Genstrings?

时间:2016-07-07 00:20:51

标签: ios xcode swift genstrings

我目前正在使用可帮助在语言之间切换的pod。部分安装过程如下:

To support this new i18n syntax, Localize-Swift includes custom genstrings swift and python scripts.

Copy the genstrings file (either .swift or .py) into your project's root folder and run with

./genstrings.swift
or

python genstrings.py
This will print the collected strings in the terminal. Select and copy to your default Localizable.strings.

The swift genstrings includes the ability to specify excluded directories and files (by editing the script).

我不熟悉genstrings,并不真正知道作者所指的是什么。我猜这位作家意味着我的本地化字符串文件夹,但当我在其上运行终端时,我收到了这个错误:

-bash: ./genstrings.swift: No such file or directory

知道说明书的含义吗?

1 个答案:

答案 0 :(得分:0)

我发现你正在使用Localize-Swift。该项目中的README表示您需要将genstring.swift文件复制到项目的根目录中,然后从命令行运行它。这对我有用。