Xcode中 - 排除国产化的特定字符串

问题描述 投票:11回答:1

当本地化我的故事板,我得到我的字符串文件看起来像条目:

/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "vHF-LZ-23i"; */ "vHF-LZ-23i.title" = "Text Cell";

反正有从进入故事板本地化字符串的文件排除虚拟文本或其他字符串?

ios xcode macos localization uistoryboard
1个回答
6
投票

作为Jenszcz在他的评论中提到,您可以通过使用BartyCrouch开源项目解决这个问题,我是古玩给它一个尝试和努力出色:)下面是我跟着得到它在5分钟内的工作步骤。

1安装BartyCrouch。请参阅从URL中的安装过程。

2 - 创建一个示例项目,您可以访问here。在该项目中创建2个标签(“全文收录”和“文本排除#BC-忽略!”)。

3-加入了RunScript(关于如何添加构建脚本here说明)

if which bartycrouch > /dev/null; then
    bartycrouch update -x
    bartycrouch lint -x
else
    echo "warning: BartyCrouch not installed, download it from https://github.com/Flinesoft/BartyCrouch"
fi

enter image description here

4-构建Main.strings文件排除一个label.Here项目之后是示出故事板文件&.strings文件的屏幕截图。 enter image description hereenter image description here

© www.soinside.com 2019 - 2024. All rights reserved.