Maintain an agile localization process and prevent translation delays for added texts or new product features. 将您的项目分支集成到 Crowdin 并允许翻译者立即访问所有新的文本。
当几个人从事产品开发时,分支有助于管理不同的内容版本。 如果您有一个持续的项目,您可以向 Crowdin 添加项目分支,并允许翻译员在开发的同时翻译文本,以避免延误部署。
Crowdin 中的分支看起来就像标有特定图标的常规文件夹,并且对重复字符串有特定行为。
版本控制系统 (VCS) 和 Crowdin 的分支结构示例:
有几种方法可以添加分支到 Crowdin:
要通过 API 创建分支,请使用“添加分支”方法。
If you use CLI, you can add and delete version branches with dedicated commands. Alternatively, you can create version branches during the file upload.
Read more about Branch Management with CLI.
You can set a specific priority for each branch by clicking an arrow icon next to the needed branch. Then translators will see branches sorted according to their priority on the language page and in the Editor.
各分支可能具有如下优先级:
要为您的分支设置优先级,请遵循以下步骤:
由于分支是同一产品功能的不同版本,因此它们的本地化内容通常是重复的。 为了帮助翻译员一致地翻译版本并避免额外的翻译成本,我们提供了在版本分支内显示 选项,该选项允许仅在版本之间隐藏重复的字符串。 如果您的源文件包含具有明显标识符(键)的字符串,最好使用此选项的严格版本。 在其他情况下,请随意使用常规版本。
When this option is chosen, only the master strings first uploaded to the system should be translated. 所有重复的字符串将自动从主字符串获得译文。
为了确保您的 Crowdin 项目能够顺利工作,我们推荐以下工作流:
The screenshot below visualizes how the workflow works in practice. 主分支、分支 1 和 分支 2 中的所有文本在出现后会立即传输到翻译服务器,即使这些分支尚未合并到 主分支。
Translations from all version branches are placed in one ZIP archive when downloaded through the web interface. Use the CLI or API to download the translations for each branch individually.
要使用 API 下载特定版本分支的译文,您可以使用以下 API 方法:
下载特定版本分支的译文:
$ crowdin download -b branch_name
The Master branch will contain new texts from the Feature branches as soon as they are merged. 与 Crowdin 同步时,主分支中的文本会填充来自相应分支的译文。
将更新的主分支与 Crowdin 同步后,您可以从 Crowdin 中删除特性分支。 All translations stored in the Master branch will remain.
You can verify translations on production using only the Feature branch before changes are merged with your Master branch. 这样的测试部署允许您在需要时快速恢复到原始主分支版本。