一个用于检查和修改 Xcode Strings Catalog 文件的库和命令行工具,提供 Xcode 16 或 xcodebuild 目前未提供的额外功能。
strings_catalog_tool
通过提供诸如列出语言键、显示所有可用语言以及删除特定语言的翻译等功能,简化了使用 Xcode Strings Catalog 文件的过程。
要列出 Strings Catalog 中的所有基础语言键,请调用
strings_catalog_tool list_keys
确保初始 Strings Catalog 文件已添加到您的 Xcode 项目中。有关 Strings Catalog 的更多详细信息,请访问此处。
默认情况下,该工具在运行命令的路径中查找 Localizable.xcstrings
文件并对其进行操作。
OVERVIEW: A utility for examining and manipulating Xcode Strings Catalogs.
USAGE: strings_catalog_tool <subcommand>
OPTIONS:
--version Show the version.
-h, --help Show help information.
SUBCOMMANDS:
list_keys List all base language keys in the strings catalog.
list_languages Display all available languages in the catalog.
remove_language Remove all translations for a specified language code.
See 'strings_catalog_tool help <subcommand>' for detailed help.
swift build -c release
以在 ./.build/release
中构建 strings_catalog_tool
可执行文件。$PATH
中的某个位置以便于访问。此包包含两个目标
strings_catalog_tool
: 命令行实用程序。StringsCatalogKit
: 与其他工具(如 translate_strings
)共享的库。