将苹果、字符串、Android/Java.xml或谷歌应用程序资源包.ARB文件转换为POT GETTEX文件。
strings2pot的Python项目详细描述
strings2pot对于将apple.strings、android/java.xml或google app resource bundle.arb文件转换为pot gettext文件非常有用。
安装
pip install strings2pot
命令行用法
root@host$ strings2pot <STRINGS_FILE> <POT_FILE>
例如
root@host$ strings2pot Localizable.strings my_ios_app.pot root@host$ strings2pot values.xml my_android_app.pot
代码使用
from strings2pot import strings2pot executed, error_message = strings2pot.run("Localizable.strings", "my_ios_app.pot")