The GitLab integration allows you to synchronize files between your GitLab repo and Crowdin Enterprise project.
There are two possible GitLab integration modes you can choose from:
All translated and approved files will be automatically pushed as a merge request to the l10n
branch in the GitLab repository in either of the above modes.
In case the repository you need is private, and you have limited or no access to it, please ask the repository owner to provide you with an access token.
Na caixa de diálogo exibida, selecione seu repositório e branches que devem ser traduzidas. É recomendável alternar Strings Duplicadas para Mostrar em um branch de versão, para que strings idênticas sejam ocultadas entre os branches. Se seus arquivos de origem contiverem strings com identificadores aparentes (chaves), é melhor usar uma versão estrita desta opção. Em outros casos, sinta-se à vontade para usar um regular.
Read more about Duplicate Strings.
When working with GitLab integration in the Target File Bundles Mode, the integration will send the completed translations from your Crowdin Enterprise project without pulling sources from your repo. So when selecting a repository and branches that should be translated, you specify where the integration should put the generated bundles with translations.
Read more about configuring target file bundles for VCS integration.
When you work with private integrations (e.g., integrations with self-hosted VCS), you need to add dedicated Crowdin Enterprise IP addresses to the allowlist to ensure that it operates properly while staying secure.
Read more about IP Addresses.
When translations are finished and your languages are ready to go live, Crowdin Enterprise sends the merge request with translations to your version control system. For every branch that is under localization, Crowdin Enterprise creates an additional service branch with translations. Não nos comprometemos diretamente com o branch mestre para que você possa verificar as traduções primeiro.
By default, l10n_ is added to the created service branch name. Se necessário, você pode alterá-lo facilmente.
To import existing translations from your repo, select one of the following options:
By default, the first option is selected to import translations only once. Alternatively, you can clear both options if you don’t want to import translations from your repo.
Por padrão, as fontes não são enviadas para o repositório com as traduções. Although, if you perform a source text review in your Crowdin Enterprise project and would like to push the changes made to your source files on Crowdin Enterprise back to your repo, click Edit, select Push Sources in the integration settings, and click Save.
Há casos em que é necessário desativar temporariamente as traduções de serem enviadas para o repositório. Nessa situação, clique em Editar, desmarque Agendamento de Sincronização nas configurações de integração e clique em Salvar. Quando estiver pronto para sincronizar as traduções com o repositório, selecione Agendamento de Sincronização e clique em Salvar.
A sincronização é processada a cada hora automaticamente. Se necessário, você pode alterar o intervalo de atualização nas configurações de integração. Para configurar a programação de sincronização – clique em Editar, role para baixo até Agendamento de Sincronização, defina o intervalo preferido e clique em Salvar.
Not depending on the synchronization settings, the source files’ changes on the repo will still be synced with Crowdin Enterprise continuously.
When you set up the integration, you select existing repository branches to be added to the Crowdin Enterprise project. When you set up the integration, you select existing repository branches to be added to the Crowdin Enterprise project.
Por exemplo, você adiciona um *recurso padrão nas configurações de integração do GitLab. Neste caso, serão adicionados ao projeto os branches futuros que contenham esta palavra no final do título.
Para adicionar um padrão para nomes de branches, siga estas etapas:
crowdin.yml
é o nome de arquivo padrão usado para branches sincronizados automaticamente. Para alterar as configurações padrão, clique em Editar, especifique o nome preferido no campo Nome do arquivo de configuração padrão nas configurações de integração e clique em Salvar.
If you don’t specify your custom configuration file name for automatically synchronized branches, and the integration doesn’t find a configuration file with the default name crowdin.yml
in the root of the branch, these branches will be marked in the integration settings with a red icon with an exclamation mark saying “Not Ready. Check the configuration”.
To make integration work, you need to specify which source files should be translated and how Crowdin Enterprise should structure translated files in your repository. If you see a red icon with an exclamation mark next to the service branch name, it means that you haven’t selected any content for synchronization.
There are two ways you can specify content for synchronization:
Este procedimento é o mesmo para todas as integrações com sistemas de controle de versão (VCS). Check VCS Integrations: Configuring Online to get to know how to select content for synchronization online.
Configuration file crowdin.yml
should be stored in the GitLab repository along with each separate branch that you want to translate, so Crowdin Enterprise knows what files exactly should be sent for translations.
Ele deve ter a mesma estrutura exigida para CLI, mas as credenciais do seu projeto não devem ser armazenadas no cabeçalho do arquivo por motivos de segurança.
Read more about creating a configuration file.
If you’re working with a multi-platform product that has versions for different operating systems, you may want to connect multiple repositories that contain source files for each operating system. Nesse caso, os recursos de localização (por exemplo, MTs, Glossários) e traduções poderiam ser utilizados de forma mais eficiente, reduzindo o tempo necessário para a localização do projeto.
Para adicionar outro repositório, siga estas etapas:
Once the integration is set up, all the related information is stored in the Integrations > GitLab section.
Depois que a integração é conectada, as configurações podem ser atualizadas apenas pelo membro do projeto que a configurou. All project managers except the person who configured the integration will see the Edit button disabled with the following message when hovering over it: Integration was configured by {Full Name}
.
Por padrão, a sincronização é processada a cada hora automaticamente. If you need to launch the synchronization immediately – click Sync Now. Alternatively, if you need to sync only one branch separately, click on the needed branch and select Sync branch.
By default, the translations stored on the repo are uploaded to Crowdin Enterprise during the first synchronization only. To upload translations to Crowdin Enterprise manually, click next to the Sync Now button, and click Upload Translations. A integração fará o carregamento das traduções existentes para o projeto no Crowdin Enterprise.
P: Eu tenho uma compilação de aplicativo configurada para ser acionada por cada commit. Since Crowdin commits each translation file in a separate commit, how can I avoid unnecessary application builds triggered by commits from Crowdin?
A: Since VCS integrations in Crowdin use API to commit files but not Git, each file is committed separately.
Aqui estão algumas recomendações que podem ajudar a resolver situações semelhantes:
export_languages
para pular commits de idiomas nos quais você ainda não está interessado. Read more about the Export languages parameter for VCS integrations.