【问题标题】:How do you access Genstrings in Xcode?你如何在 Xcode 中访问 Genstrings?
【发布时间】:2016-07-07 00:20:50
【问题描述】:

我目前正在使用有助于在语言之间切换的 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

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

【问题讨论】:

    标签: ios xcode swift genstrings


    【解决方案1】:

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

    【讨论】:

    • 这是正确的,我最终通过反复试验弄明白了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-12-06
    • 1970-01-01
    • 1970-01-01
    • 2020-01-28
    • 2021-10-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多