diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 13:37:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 13:37:47 +0000 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /doc/development/i18n | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) | |
download | gitlab-ce-aee0a117a889461ce8ced6fcf73207fe017f1d99.tar.gz |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'doc/development/i18n')
-rw-r--r-- | doc/development/i18n/externalization.md | 12 | ||||
-rw-r--r-- | doc/development/i18n/index.md | 6 | ||||
-rw-r--r-- | doc/development/i18n/merging_translations.md | 32 | ||||
-rw-r--r-- | doc/development/i18n/translation.md | 10 |
4 files changed, 29 insertions, 31 deletions
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md index 52a7f839286..65cf8911e12 100644 --- a/doc/development/i18n/externalization.md +++ b/doc/development/i18n/externalization.md @@ -133,11 +133,9 @@ You can mark that content for translation with: The `~/locale` module exports the following key functions for externalization: -- `__()` (double underscore parenthesis) -- `s__()` (namespaced double underscore parenthesis) -- `__()` Mark content for translation (note the double underscore). -- `s__()` Mark namespaced content for translation -- `n__()` Mark pluralized content for translation +- `__()` Mark content for translation (double underscore parenthesis). +- `s__()` Mark namespaced content for translation (s double underscore parenthesis). +- `n__()` Mark pluralized content for translation (n double underscore parenthesis). ```javascript import { __, s__, n__ } from '~/locale'; @@ -822,11 +820,11 @@ bin/rake gettext:regenerate ``` This command updates the `locale/gitlab.pot` file with the newly externalized strings and removes -any unused strings. Once the changes are on the default branch, [CrowdIn](https://translate.gitlab.com) +any unused strings. Once the changes are on the default branch, [Crowdin](https://translate.gitlab.com) picks them up and presents them for translation. You don't need to check in any changes to the `locale/[language]/gitlab.po` files. They are updated -automatically when [translations from CrowdIn are merged](merging_translations.md). +automatically when [translations from Crowdin are merged](merging_translations.md). If there are merge conflicts in the `gitlab.pot` file, you can delete the file and regenerate it using the same command. diff --git a/doc/development/i18n/index.md b/doc/development/i18n/index.md index c22bb6ff020..0870a0e6750 100644 --- a/doc/development/i18n/index.md +++ b/doc/development/i18n/index.md @@ -32,8 +32,8 @@ See [Externalization for GitLab](externalization.md). ## Translate strings The translation process is managed at [https://translate.gitlab.com](https://translate.gitlab.com) -using [CrowdIn](https://crowdin.com/). -You must create a CrowdIn account before you can submit translations. Once you are signed in, select +using [Crowdin](https://crowdin.com/). +You must create a Crowdin account before you can submit translations. Once you are signed in, select the language you wish to contribute translations to. Voting for translations is also valuable, helping to confirm good translations and flag inaccurate @@ -54,4 +54,4 @@ instructions on becoming a proofreader yourself. Translations are typically included in the next major or minor release. -See [Merging translations from CrowdIn](merging_translations.md). +See [Merging translations from Crowdin](merging_translations.md). diff --git a/doc/development/i18n/merging_translations.md b/doc/development/i18n/merging_translations.md index f89190fc316..43f19f8a9d6 100644 --- a/doc/development/i18n/merging_translations.md +++ b/doc/development/i18n/merging_translations.md @@ -4,27 +4,27 @@ group: Import info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- -# Merging translations from CrowdIn +# Merging translations from Crowdin -CrowdIn automatically syncs the `gitlab.pot` file with the CrowdIn service, presenting +Crowdin automatically syncs the `gitlab.pot` file with the Crowdin service, presenting newly added externalized strings to the community of translators. -The [GitLab CrowdIn Bot](https://gitlab.com/gitlab-crowdin-bot) also creates merge requests +The [GitLab Crowdin Bot](https://gitlab.com/gitlab-crowdin-bot) also creates merge requests to take newly approved translation submissions and merge them into the `locale/<language>/gitlab.po` files. Check the [merge requests created by `gitlab-crowdin-bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests?scope=all&state=opened&author_username=gitlab-crowdin-bot) to see new and merged merge requests. ## Validation -By default CrowdIn commits translations with `[skip ci]` in the commit +By default Crowdin commits translations with `[skip ci]` in the commit message. This avoids an excessive number of pipelines from running. Before merging translations, make sure to trigger a pipeline to validate -translations. Static analysis validates things CrowdIn doesn't do. Create +translations. Static analysis validates things Crowdin doesn't do. Create a new pipeline at [`https://gitlab.com/gitlab-org/gitlab/pipelines/new`](https://gitlab.com/gitlab-org/gitlab/pipelines/new) (requires the Developer role) for the `master-i18n` branch. If there are validation errors, the easiest solution is to disapprove -the offending string in CrowdIn, leaving a comment with what is +the offending string in Crowdin, leaving a comment with what is required to fix the errors. There's an [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/23256) that suggests automating this process. Disapproving excludes the @@ -32,18 +32,18 @@ invalid translation. The merge request is then updated within a few minutes. If the translation fails validation due to angle brackets (`<` or `>`), -it should be disapproved in CrowdIn. Our strings must use [variables](externalization.md#html) +it should be disapproved in Crowdin. Our strings must use [variables](externalization.md#html) for HTML instead. -It might be useful to pause the integration on the CrowdIn side for a +It might be useful to pause the integration on the Crowdin side for a moment so translations don't keep coming. You can do this by clicking -**Pause sync** on the [CrowdIn integration settings page](https://translate.gitlab.com/project/gitlab-ee/settings#integration). +**Pause sync** on the [Crowdin integration settings page](https://translate.gitlab.com/project/gitlab-ee/settings#integration). ## Merging translations After all translations are determined to be appropriate and the pipelines pass, you can merge the translations into the default branch. When merging translations, -be sure to select the **Remove source branch** checkbox. This causes CrowdIn +be sure to select the **Remove source branch** checkbox. This causes Crowdin to recreate the `master-i18n` branch from the default branch after merging the new translation. @@ -51,26 +51,26 @@ We are discussing [automating this entire process](https://gitlab.com/gitlab-org ## Recreate the merge request -CrowdIn creates a new merge request as soon as the old one is closed +Crowdin creates a new merge request as soon as the old one is closed or merged. But it does not recreate the `master-i18n` branch every -time. To force CrowdIn to recreate the branch, close any [open merge requests](https://gitlab.com/gitlab-org/gitlab/-/merge_requests?scope=all&state=opened&author_username=gitlab-crowdin-bot) +time. To force Crowdin to recreate the branch, close any [open merge requests](https://gitlab.com/gitlab-org/gitlab/-/merge_requests?scope=all&state=opened&author_username=gitlab-crowdin-bot) and delete the [`master-18n`](https://gitlab.com/gitlab-org/gitlab/-/branches/all?utf8=✓&search=master-i18n) branch. This might be needed when the merge request contains failures that have been fixed on the default branch. -## Recreate the GitLab integration in CrowdIn +## Recreate the GitLab integration in Crowdin NOTE: These instructions work only for GitLab Team Members. -If for some reason the GitLab integration in CrowdIn doesn't exist, you can +If for some reason the GitLab integration in Crowdin doesn't exist, you can recreate it with the following steps: 1. Sign in to GitLab as `gitlab-crowdin-bot`. (If you're a GitLab Team Member, find credentials in the GitLab shared [1Password account](https://about.gitlab.com/handbook/security/#1password-for-teams).) -1. Sign in to CrowdIn with the GitLab integration. +1. Sign in to Crowdin with the GitLab integration. 1. Go to **Settings > Integrations > GitLab > Set Up Integration**. 1. Select the `gitlab-org/gitlab` repository. 1. In **Select Branches for Translation**, select `master`. @@ -78,7 +78,7 @@ recreate it with the following steps: ## Manually update the translation levels -There's no automated way to pull the translation levels from CrowdIn, to display +There's no automated way to pull the translation levels from Crowdin, to display this information in the language selection dropdown. Therefore, the translation levels are hard-coded in the `TRANSLATION_LEVELS` constant in [`i18n.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/i18n.rb), and must be regularly updated. diff --git a/doc/development/i18n/translation.md b/doc/development/i18n/translation.md index 04a9f68abec..61f9d7a25c3 100644 --- a/doc/development/i18n/translation.md +++ b/doc/development/i18n/translation.md @@ -6,9 +6,9 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Translating GitLab -For managing the translation process, we use [CrowdIn](https://crowdin.com). +For managing the translation process, we use [Crowdin](https://crowdin.com). To contribute translations at [`translate.gitlab.com`](https://translate.gitlab.com), -you must create a CrowdIn account. You may create a new account or use any of their supported +you must create a Crowdin account. You may create a new account or use any of their supported sign-in services. ## Language selections @@ -16,12 +16,12 @@ sign-in services. GitLab is being translated into many languages. To select a language to contribute to: 1. Find the language that you want to contribute to, in the - [GitLab CrowdIn project](https://crowdin.com/project/gitlab-ee). + [GitLab Crowdin project](https://crowdin.com/project/gitlab-ee). - If the language you want is available, proceed to the next step. - If the language you want is not available, [open an issue](https://gitlab.com/gitlab-org/gitlab/-/issues?scope=all&utf8=✓&state=all&label_name[]=Category%3AInternationalization). - Notify our CrowdIn administrators by including `@gitlab-org/manage/import` in your issue. + Notify our Crowdin administrators by including `@gitlab-org/manage/import` in your issue. - After the issue and any merge requests are complete, restart this procedure. 1. View the list of files and folders. Select `gitlab.pot` to open the translation editor. @@ -30,7 +30,7 @@ GitLab is being translated into many languages. To select a language to contribu The online translation editor is the easiest way to contribute translations. -![CrowdIn Editor](img/crowdin-editor.png) +![Crowdin Editor](img/crowdin-editor.png) - Strings for translation are listed in the left panel. - Translations are entered into the central panel. Multiple translations are required for strings |