To configure a Version Control System integration, specify which source files should be translated and how Crowdin Enterprise 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.
* (asterisco)
Represents any character in the file or directory name. Se você especificar um “*.json”, ele incluirá todos os arquivos, como “messages.json”, “about_us.json” e qualquer coisa que termine com “.json”.
** (duplo asterisco)
Corresponde a qualquer texto recursivo (incluindo subdiretórios). Nota que podes usa ** nos padrões de origem e tradução. When using ** in the translation pattern, it will always contain a sub-path from the source for a certain file. For example, you can use source: ‘/en/**/*.po’ to upload all *.po files to Crowdin Enterprise recursively. O padrão de tradução será ‘/%two_letters_code%/**/%original_file_name%’.
? (ponto de interrogação)
Corresponde a qualquer caractere único.
[set]
Corresponde a qualquer caractere único em um conjunto. Comporta-se exatamente como conjuntos de caracteres no Regexp, incluindo negação de conjunto ([^a-z]).
\ (barra invertida)
Escapa o próximo metacaractere.
Usa espaços reservados para identificar onde os arquivos traduzidos serão colocados e como eles serão nomeados:
Nome | Descrição |
---|---|
%original_file_name% | Nome do arquivo original |
%original_path% | Take parent folders names in Crowdin Enterprise project to build file path in the resulted bundle |
%file_extension% | Extensão do arquivo original |
%file_name% | Nome do arquivo sem extensão |
%language% | Nome do idioma (por exemplo, Ucraniano) |
%two_letters_code% | Código do idioma ISO 639-1 (por exemplo uk) |
%three_letters_code% | Código do idioma ISO 639-2/T (por exemplo ukr) |
%locale% | Localidade (por exemplo uk-UA) |
%locale_with_underscore% | Localidade (por exemplo uk-Ua) |
%android_code% | Identificador de localidade do Android usado para nomear diretórios "values-" |
%osx_code% | Identificador de localidade do OS X usado para nomear diretórios ".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, select Ignore files or folders, specify the respective pattern for these files, and Crowdin Enterprise 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 Enterprise.
Para adicionar mapeamento de idiomas, siga estes passos:
You can specify the scheme of your spreadsheet file in the Scheme field. Para formar o esquema de seu arquivo CSV ou XLS/XLSX, use as seguintes constantes:
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.
Traduzir conteúdo | Select to translate texts stored inside the tags. |
Traduzir atributos | Select to translate tag attributes. |
Segmentação de conteúdo | Select to split the source XML file's content into shorter text segments. Nota: Quando a segmentação de conteúdo está ativada, o upload da tradução é feito por uma tecnologia experimental de aprendizado de máquina. |
Elementos traduzíveis | Este é um array de frases, onde cada item é o XPaths para elemento DOM que deve ser importado. Caminho da amostra: /path/to/node or /path/to/attribute[@attr] |
Os seguintes parâmetros não podem ser configurados online:
preserve_hierarchy
- saves directory structure in Crowdin Enterprisedest
- allows you to specify a file name in Crowdin Enterprisetype
- allows you to specify a file type in Crowdin Enterpriseupdate_option
- mantém traduções e mantém/remove aprovações das frases alteradas durante a atualização do arquivocommit_message
- additional commit message that can include Git tagsexport_languages
- exporta as traduções para os idiomas especificadosOnce you save the online configuration, a crowdin.yml
file will be saved to the root of the configured branch in your repository. Pode editar este arquivo, manualmente, para adicionar os parâmetros necessários.
Read more about the configuration file.
Click Save changes to preview the created configuration.
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.
Clique Salvar para salvar a configuração criada.
When the configuration is saved, the localizable files will start uploading to your Crowdin Enterprise project.