Керування версіями

Maintain an agile localization process and prevent translation delays for added texts or new product features. Інтегруйте свої гілки проєкту з Crowdin і дозвольте перекладачам швидко отримувати доступ до всіх нових текстів.

Гілки

When several people work on product development, branches help manage different content versions. If you have a continuous project, you can add project branches to Crowdin and allow translators to translate the texts in parallel with development to prevent deployment delays.

Branches in Crowdin look like regular folders marked with a specific icon and have special behavior for duplicate strings.
Приклад структури гілок у системі контролю версій (VCS) і Crowdin:

Branch Structure

Створення галузі

Увага! Перші файли, які ви завантажуєте до проєкту Crowdin, повинні містити всі вихідні рядки та повинні бути розміщені у відповідній гілці. For all article examples, a branch with original texts is named Master.

Є кілька способів додати гілки до Crowdin:

  • Інтегрувати проєкти Crowdin із GitLab, GitHub, Bitbucket або Azure Repos. Це рекомендований варіант, оскільки гілки, вибрані для локалізації у вашій системі контролю версій (VCS), будуть створені в Crowdin автоматично.
  • Use CLI or API to add new branches.
  • Create branches manually.
Створення гілок через API

Щоб створити гілку за допомогою API, скористайтеся методом Додати гілку.

Керування гілками через 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:

  • Low Priority– low
  • Normal Priority– normal
  • High Priority– high

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

  1. Open your project and go to Sources > Files.
  2. Click an arrow icon next to the needed branch to set the preferred priority.

Дублікати

Because branches are different versions of the same product feature, their localization content is usually duplicated. Щоб допомогти перекладачам узгоджено перекладати версії та уникнути додаткових витрат на переклад, у нас є параметр Показати в межах гілки версії, який дозволяє приховувати повторювані рядки лише між версіями. If your source files contain strings with apparent identifiers (keys), it’s better to use a strict version of this option. In other cases, feel free to use a regular one.

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

Запропонований робочий процес

Щоб забезпечити безперебійну роботу версій у вашому проєкті Crowdin, ми рекомендуємо такий робочий процес:

  1. Upload your project files to the Crowdin project using one of the available methods.
  2. Open your project and go to Settings > Import > Source Strings.
  3. Switch the Duplicate Strings option to Show within a version branch.

На екрані нижче показано, як працює робочий процес на практиці. All texts from Master, Branch 1, and Branch 2 are transferred to the translation server immediately after they appear, even though the branches are not merged to the Master branch yet.

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

To download translations of the specific version branch with API, you can use the following API methods:

Translation Download using CLI

Download translations of the specific version branch:

$ crowdin download -b branch_name

Злиття гілок

Гілка Master буде містити нові тексти з гілок Feature як тільки вони поєднуються. Під час синхронізації з Crowdin тексти в гілці Master заповнюються перекладами з відповідної гілки.

Після синхронізації оновленої гілки Master із Crowdin ви можете видалити гілку Feature із Crowdin. Усі переклади зберігатимуться в цій гілці Master.

Підтвердження перекладу гілки

You can verify translations on production using only the Feature branch before changes are merged with your Master branch. Such test deployment allows you to quickly revert to the original Master branch version if needed.

Дивись також

Ця стаття була корисною?