To configure a Version Control System integration, specify which source files should be translated and how Crowdin should structure the translated files in your repository.
Once you selected your repository and branch for translation, the next step you need to do is to configure the selected branch. Click to open the Branch Configuration dialog and start the configuration. In the Branch Configuration dialog, you can either load the existing configuration file stored on your repository or create a new configuration from scratch.
To load the existing configuration file stored on your repository, follow these steps:
The configuration will be displayed in the Branch Configuration dialog. You can use it as is or modify it if needed.
To create a new configuration file that will be used by the integration, specify the preferred name and click Continue in the Branch Configuration dialog.
Then specify the source and translated file paths using patterns and placeholders listed below. In the right panel, you can preview the structure of the source files that will be uploaded for translation and the structure of the translated files based on the specified paths.
Once you finish setting up the configuration for the selected branch and save the changes, the configuration file will be saved to the root of the translation branch in your repository.
* (зірочка)
Represents any character in the file or directory name. Якщо ви виберете “*.json”, він буде включати всі файли, такі як “messages.json”, “about_us.json”, і все, що закінчується на “.json”.
*** (подвійна зірочка)
Збігається з будь-яким рядком рекурсивно (включаючи підпапки). Зверніть увагу, що ви можете використовувати ** і в шаблонах source і translation. When using ** in the translation pattern, it will always contain a sub-path from the source for a certain file. Наприклад, ви можете використовувати source: ‘/en/**/*.po’, щоб завантажити в Crowdin все рекурсивні файли *.po. Шаблон перекладу буде ‘/%two_letters_code%/**/%original_file_name%’.
? (знак питання)
Відповідає будь-якому одному символу.
[set]
Відповідає будь-якому одному символу в наборі. Behaves exactly like character sets in Regexp, including set negation ([^a-z]).
\ (зворотний слеш)
Пропускає такий метасимвол.
Ви можете використовувати наповнювачі, щоб визначити, де перекладені файл и будуть розміщені і як вони будуть названі:
Ім'я | Опис |
---|---|
%original_file_name% | Початкову назва файлу |
%original_path% | Візьміть імена батьківських папок у проекті Crowdin, щоб побудувати шлях до файлу в наведеному пакеті |
%file_extension% | Початкове розширення файлу |
%file_name% | Файл без розширення |
%language% | Language name (e.g., Ukrainian) |
%two_letters_code% | Language code ISO 639-1 (e.g., uk) |
%three_letters_code% | Language code ISO 639-2/T (e.g., ukr) |
%locale% | Locale (e.g., uk-UA) |
%locale_with_underscore% | Locale (e.g., uk_UA) |
%android_code% | Ідентифікатор мови в Android використаний в назвах «values-» директорій |
%osx_code% | Локаль OS X, яка використовується для назв ".lproj" директорій |
%osx_locale% | OS X locale used to name translation resources (e.g., uk, zh-Hans, zh_HK) |
If some files shouldn’t be translated, click Add ignored pattern, specify the respective pattern for these files, and Crowdin won’t upload specific files for translation.
If your project uses custom names for locale directories, you can use Language Mapping to map your own languages to be recognized by Crowdin.
Щоб додати відображення мови, дотримуйтесь цих кроків:
You can specify the scheme of your spreadsheet file in the Scheme field. To form the scheme for your CSV or XLS/XLSX file, use the following constants:
identifier
– Column contains string identifiers. source_phrase
– Column contains source strings. source_or_translation
– Column contains source strings, but the same column will be filled with translations when the file is exported. When uploading existing translations, the values from this column will be used as translations. translation
– Column contains translations. context
– Column contains comments or context information for the source strings. max_length
– Column contains max.length limit values for the translations of the strings. labels
– Column contains labels for the source strings. none
– Column that will be skipped on import.
Scheme example: identifier,source_phrase,context,fr,de,it,uk (Language Codes).
If a spreadsheet contains the translations for multiple target languages, select Multilingual spreadsheet. If you don’t want to translate the text stored in the first row, select Import first line as a header.
Перекладати контент | Select to translate texts stored inside the tags. |
Перекладати атрибути | Select to translate tag attributes. |
Сегментація контенту | Select to split the source XML file's content into shorter text segments. Note: When Content segmentation is enabled, the translation upload is handled by an experimental machine learning technology. |
Елементи, які перекладаються | Це масив рядків, де кожен елемент є елементом XPath для DOM, який повинен бути імпортований. Приклад шляху: /path/to/node or /path/to/attribute[@attr] |
Наступні параметри не можуть бути налаштовані онлайн:
preserve_hierarchy
- зберігає структуру каталогів в Crowdindest
- дозволяє задати ім’я файлу в Crowdintype
- дозволяє вказати тип файлу в Crowdinupdate_option
- зберігає переклади і зберігає/видаляє затвердження з змінених рядків під час оновлення файлуcommit_message
- additional commit message that can include Git tagsexport_languages
- експорт перекладів для зазначених мовOnce you save the online configuration, a crowdin.yml
file will be saved to the root of the configured branch in your repository. Ви можете редагувати цей файл вручну, щоб додати необхідні параметри.
Дізнайтеся більше про файл конфігурації.
Натисніть ** Зберегти** для попереднього перегляду створеної конфігурації.
Click Add File Filter if you have various file groups with different configurations.
If several branches in the project share the same configuration, and the same filters should be applied to them, select Apply filters to all translatable branches.
Натисніть Зберегти для збереження створеної конфігурації.
When the configuration is saved, the localizable files will start uploading to your Crowdin project.