Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-19 14:01:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-19 14:01:45 +0300
commit9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch)
tree865198c01d1824a9b098127baa3ab980c9cd2c06 /doc/development/i18n
parent6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff)
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'doc/development/i18n')
-rw-r--r--doc/development/i18n/externalization.md35
-rw-r--r--doc/development/i18n/index.md6
-rw-r--r--doc/development/i18n/merging_translations.md2
-rw-r--r--doc/development/i18n/proofreader.md4
-rw-r--r--doc/development/i18n/translation.md4
5 files changed, 32 insertions, 19 deletions
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md
index 1ce35b254f1..47936dc6f70 100644
--- a/doc/development/i18n/externalization.md
+++ b/doc/development/i18n/externalization.md
@@ -1,7 +1,7 @@
---
stage: Manage
group: Import and Integrate
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
+info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
---
# Internationalization for GitLab
@@ -27,23 +27,27 @@ After you have the GitLab project ready, you can start working on the translatio
The following tools are used:
+- Custom written tools to aid day-to-day development work with translations:
+
+ - `tooling/bin/gettext_extractor locale/gitlab.pot`: scan all source files for [new content to translate](#updating-the-po-files-with-the-new-content)
+ - `rake gettext:compile`: reads the contents of the PO files and generates JS files which
+ contain all the available translations for the Frontend.
+ - `rake gettext:lint`: [validate PO files](#validating-po-files)
+
- [`gettext_i18n_rails`](https://github.com/grosser/gettext_i18n_rails):
- this gem allows us to translate content from models, views, and controllers. It also gives us
- access to the following Rake tasks:
+ this gem allows us to translate content from models, views, and controllers.
+ It uses [`fast_gettext`](https://github.com/grosser/fast_gettext) under the hood.
+ It also provides access to the following Rake tasks, which are rarely needed in day-to-day:
+
+ - `rake gettext:add_language[language]`: [adding a new language](#adding-a-new-language)
- `rake gettext:find`: parses almost all the files from the Rails application looking for content
marked for translation. It then updates the PO files with this content.
- `rake gettext:pack`: processes the PO files and generates the binary MO files that the
application uses.
-- [`gettext_i18n_rails_js`](https://github.com/webhippie/gettext_i18n_rails_js):
- this gem makes the translations available in JavaScript. It provides the following Rake task:
-
- - `rake gettext:compile`: reads the contents of the PO files and generates JS files which
- contain all the available translations.
-
-- PO editor: there are multiple applications that can help us work with PO files. A good option is
- [Poedit](https://poedit.net/download),
+- PO editor: there are multiple applications that can help us work with PO files.
+ A good option is [Poedit](https://poedit.net/download),
which is available for macOS, GNU/Linux, and Windows.
## Preparing a page for translation
@@ -258,6 +262,11 @@ expect(wrapper.text()).toBe('There was an error: Please refresh and hope for the
For more details you can see how we [keep translations dynamic](#keep-translations-dynamic).
+## Making changes to translated strings
+
+If you change the source strings in GitLab, you must [update the `pot` file](#updating-the-po-files-with-the-new-content) before pushing your changes.
+If the `pot` file is out of date, pre-push checks and a pipeline job for `gettext` fail.
+
## Working with special content
### Interpolation
@@ -839,7 +848,7 @@ When in doubt, try to follow the best practices described in this [Mozilla Devel
### Always pass string literals to the translation helpers
-The `bin/rake gettext:regenerate` script parses the codebase and extracts all the strings from the
+The `tooling/bin/gettext_extractor locale/gitlab.pot` script parses the codebase and extracts all the strings from the
[translation helpers](#preparing-a-page-for-translation) ready to be translated.
The script cannot resolve the strings if they are passed as variables or function calls. Therefore,
@@ -865,7 +874,7 @@ Now that the new content is marked for translation, run this command to update t
`locale/gitlab.pot` files:
```shell
-bin/rake gettext:regenerate
+tooling/bin/gettext_extractor locale/gitlab.pot
```
This command updates the `locale/gitlab.pot` file with the newly externalized strings and removes
diff --git a/doc/development/i18n/index.md b/doc/development/i18n/index.md
index b7e385a774a..9e39d5554ab 100644
--- a/doc/development/i18n/index.md
+++ b/doc/development/i18n/index.md
@@ -1,7 +1,7 @@
---
stage: Manage
group: Import and Integrate
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
+info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
---
# Translate GitLab to your language
@@ -29,6 +29,10 @@ strings.
See [Externalization for GitLab](externalization.md).
+### Editing externalized strings
+
+If you edit externalized strings in GitLab, you must [update the `pot` file](externalization.md#updating-the-po-files-with-the-new-content) before pushing your changes.
+
## Translate strings
The translation process is managed at [https://crowdin.com/project/gitlab-ee](https://crowdin.com/project/gitlab-ee)
diff --git a/doc/development/i18n/merging_translations.md b/doc/development/i18n/merging_translations.md
index 4f36cbe125a..d33b8e701e9 100644
--- a/doc/development/i18n/merging_translations.md
+++ b/doc/development/i18n/merging_translations.md
@@ -1,7 +1,7 @@
---
stage: Manage
group: Import and Integrate
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
+info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
---
# Merging translations from Crowdin
diff --git a/doc/development/i18n/proofreader.md b/doc/development/i18n/proofreader.md
index f24ebacab18..35e423b28e9 100644
--- a/doc/development/i18n/proofreader.md
+++ b/doc/development/i18n/proofreader.md
@@ -1,7 +1,7 @@
---
stage: Manage
group: Import and Integrate
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
+info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
---
# Proofread Translations
@@ -33,7 +33,7 @@ are very appreciative of the work done by translators and proofreaders!
- Huang Tao - [GitLab](https://gitlab.com/htve), [Crowdin](https://crowdin.com/profile/htve)
- Victor Wu - [GitLab](https://gitlab.com/_victorwu_), [Crowdin](https://crowdin.com/profile/victorwu)
- Xiaogang Wen - [GitLab](https://gitlab.com/xiaogang_cn), [Crowdin](https://crowdin.com/profile/xiaogang_gitlab)
- - Qi Zhao - [GitLab](https://gitlab.com/zhaoqi01), [Crowdin](https://crowdin.com/profile/zhaoqi01)
+ - Zhiyuan Lu - [GitLab](https://gitlab.com/luzhiyuan.deer), [Crowdin](https://crowdin.com/profile/luzhiyuan.deer)
- Chinese Traditional 繁體中文
- Weizhe Ding - [GitLab](https://gitlab.com/d.weizhe), [Crowdin](https://crowdin.com/profile/d.weizhe)
- Yi-Jyun Pan - [GitLab](https://gitlab.com/pan93412), [Crowdin](https://crowdin.com/profile/pan93412)
diff --git a/doc/development/i18n/translation.md b/doc/development/i18n/translation.md
index cf6ee16f157..7149d431c30 100644
--- a/doc/development/i18n/translation.md
+++ b/doc/development/i18n/translation.md
@@ -1,7 +1,7 @@
---
stage: Manage
group: Import and Integrate
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
+info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
---
# Translating GitLab
@@ -96,7 +96,7 @@ For example, in German, the word _user_ can be translated into _Benutzer_ (male)
### Updating the glossary
-To propose additions to the glossary, please
+To propose additions to the glossary,
[open an issue](https://gitlab.com/gitlab-org/gitlab/-/issues?scope=all&utf8=✓&state=all&label_name[]=Category%3AInternationalization).
## French translation guidelines