Commit 423a5152 authored by Josianne Hyson's avatar Josianne Hyson

Add guidelines around avoiding translation updates

We have been losing some of our translation progress due to un-nessecary
translation updates. Add some guidelines around avoiding this so that we
don't create duplicated effort for our translators.

Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/245431
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47078
parent 290f691c
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment