您如何访问 Xcode 中的 Genstrings?

How do you access Genstrings in Xcode?

我目前正在使用一个帮助切换语言的 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

知道这些说明是什么意思吗?

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