基础

基本功能

  • 从 pot 文件创建或更新 po 文件。

  • 从 po 文件建立 mo 文件。

可选功能

这些功能依赖于 transifex-client 库。请参考 安装 部分来安装它。

  • 从环境变量中创建 .transifexrc 文件,无需交互式输入。

  • 创建 .tx/config 文件,无需交互式输入。

  • 从 locale/pot 文件中自动更新 .tx/config 文件。

  • 从 locale 目录下的 po 文件建立 mo 文件。

你需要使用 tx 命令来实现以下功能。

  • tx push -s :推送 pot(翻译目录)到 transifex。

  • tx pull -l ja : 从 transifex 拉取 po(翻译的目录)。

安装

强烈推荐:使用 virtualenv/venv 来完成这个程序

$ pip install sphinx-intl

如果你想使用 可选功能,你需要安装额外的库

$ pip install sphinx-intl[transifex]