Commit dc9cdbaf authored by Mike Jang's avatar Mike Jang

Merge branch 'jh-translation_guidelines' into 'master'

Add guidelines around avoiding translation updates

See merge request gitlab-org/gitlab!47078
parents 8a7280d0 423a5152
......@@ -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