Skip to content

[Translation] Fix plural rules at message format page #18057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions reference/formats/message_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ handle pluralization in your messages (e.g. ``There are 3 apples`` vs
num_of_apples: >-
{apples, plural,
=0 {There are no apples}
one {There is one apple...}
=1 {There is one apple...}
other {There are # apples!}
}

Expand All @@ -236,7 +236,7 @@ handle pluralization in your messages (e.g. ``There are 3 apples`` vs
<body>
<trans-unit id="num_of_apples">
<source>num_of_apples</source>
<target>{apples, plural, =0 {There are no apples} one {There is one apple...} other {There are # apples!}}</target>
<target>{apples, plural, =0 {There are no apples} =1 {There is one apple...} other {There are # apples!}}</target>
</trans-unit>
</body>
</file>
Expand All @@ -248,7 +248,7 @@ handle pluralization in your messages (e.g. ``There are 3 apples`` vs
return [
'num_of_apples' => '{apples, plural,
=0 {There are no apples}
one {There is one apple...}
=1 {There is one apple...}
other {There are # apples!}
}',
];
Expand Down