Commit 24c212ed authored by Mark Florian's avatar Mark Florian

Merge branch...

Merge branch 'dreedy-fix-mentions-and-usage-of-n_-and-n__-in-i18n-externalization-docs' into 'master'

Adjust mentions & usage of n_ & n__ in i18n externalization docs

See merge request gitlab-org/gitlab!64351
parents c4deb2a5 0ddc2d8d
......@@ -363,7 +363,7 @@ use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make sure to
// => When x == 2: 'Last 2 days'
```
The `n_` method should only be used to fetch pluralized translations of the same
The `n_` and `n__` methods should only be used to fetch pluralized translations of the same
string, not to control the logic of showing different strings for different
quantities. Some languages have different quantities of target plural forms.
For example, Chinese (simplified) has only one target plural form in our
......@@ -376,7 +376,7 @@ For example, use this:
if selected_projects.one?
selected_projects.first.name
else
n__("Project selected", "%d projects selected", selected_projects.count)
n_("Project selected", "%d projects selected", selected_projects.count)
end
```
......
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