summaryrefslogtreecommitdiff
path: root/doc/development/i18n
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-09 18:09:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-09 18:09:11 +0000
commit42c8bf63670403d3f5cd23091bb56edde7e187c6 (patch)
tree57d2fe27b7bd9dc89a6c8a8f2793310767c97018 /doc/development/i18n
parent22d08de610d047ae55ab548d8e398b41b4ce28db (diff)
downloadgitlab-ce-42c8bf63670403d3f5cd23091bb56edde7e187c6.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/i18n')
-rw-r--r--doc/development/i18n/externalization.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md
index abdaa681230..78caac0d6d5 100644
--- a/doc/development/i18n/externalization.md
+++ b/doc/development/i18n/externalization.md
@@ -480,6 +480,21 @@ This makes use of [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/do
## Best practices
+### Minimize translation updates
+
+Updates can result in the loss of the translations for this string. To minimize risks,
+avoid changes to strings, unless they:
+
+- Add value to the user.
+- Include extra context for translators.
+
+For example, we should avoid changes like this:
+
+```diff
+- _('Number of things: %{count}') % { count: 10 }
++ n_('Number of things: %d', 10)
+```
+
### Keep translations dynamic
There are cases when it makes sense to keep translations together within an array or a hash.