版本管理

Maintain an agile localization process and prevent translation delays for added texts or new product features. Integrate your project branches with Crowdin Enterprise and allow translators to access all new texts immediately.

分支

当几个人从事产品开发时,分支有助于管理不同的内容版本。 If you have a continuous project, you can add project branches to Crowdin Enterprise and allow translators to translate the texts in parallel with development to prevent deployment delays.

Branches in Crowdin Enterprise look like regular folders marked with a specific icon and have special behavior for duplicate strings.
Example of branch structure in Crowdin Enterprise:

Branch Structure

Branch Creation

Note! The first files you upload to the Crowdin Enterprise project must contain all the original strings and should be placed in the corresponding branch. For all article examples, a branch with original texts is named Master.

There are a few ways to add branches to Crowdin Enterprise:

  • Integrate Crowdin Enterprise projects with GitLab, GitHub, Bitbucket, or Azure Repos. It’s a recommended option, as branches selected for localization in your version control system (VCS) will be created in Crowdin Enterprise automatically.
  • Use CLI or API to add new branches.
  • Create branches manually.
使用 API 创建分支

To create a branch via API, use the Add Branch method.

使用 CLI 进行分支管理

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.

Prioritizing Branches

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.

Branches might have the following priorities:

  • 低优先级– 低优先级
  • Medium Priority– medium
  • 高优先级– 高优先级

To set a priority for your branches, follow these steps:

  1. 打开您的项目并转到 原文 > 文件
  2. Click an arrow icon next to the needed branch to set the preferred priority.

重复项

由于分支是同一产品功能的不同版本,因此它们的本地化内容通常是重复的。 为了帮助翻译员一致地翻译版本并避免额外的翻译成本,我们提供了在版本分支内显示 选项,该选项允许仅在版本之间隐藏重复的字符串。 如果您的源文件包含具有明显标识符(键)的字符串,最好使用此选项的严格版本。 在其他情况下,请随意使用常规版本。

When this option is chosen, only the master strings first uploaded to the system should be translated. All duplicated strings will automatically gain translations from the master strings.
Duplicates

推荐的工作流

To make sure versions work smoothly for your Crowdin Enterprise project, we recommend the following workflow:

  1. Upload your project files to the Crowdin Enterprise project using one of the available methods.
  2. 打开您的项目并前往 设置 > 导入 > 源字符串
  3. Switch the Duplicates option to Show within a version branch.

The screenshot below visualizes how the workflow works in practice. 主分支分支 1分支 2 中的所有文本在出现后会立即传输到翻译服务器,即使这些分支尚未合并到 主分支

Translation Download

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.

Translation Download using API

要使用 API 下载特定版本分支的译文,您可以使用以下 API 方法:

Translation Download using CLI

下载特定版本分支的译文:

$ crowdin download -b branch_name

Merging Branches

The Master branch will contain new texts from the Feature branches as soon as they are merged. While synchronizing with Crowdin Enterprise, texts in the Master branch are populated with translations from the appropriate branch.

After synchronizing the updated Master branch with Crowdin Enterprise, you can remove the Feature branch from Crowdin Enterprise. All translations stored in the Master branch will remain.

Branch Translation Verification

You can verify translations on production using only the Feature branch before changes are merged with your Master branch. 这样的测试部署允许您在需要时快速恢复到原始主分支版本。

另请参阅

本文是否有帮助?