Skip to content

Commit f14edf4

Browse files
committed
Minor tweaks
1 parent 60987f7 commit f14edf4

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

translation/message_format.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ typical usage of this is gender:
100100
# the 'other' key is required, and is selected if no other case matches
101101
invitation_title: >-
102102
{organizer_gender, select,
103-
female {{organizer_name} has invited you to her party!}
104-
male {{organizer_name} has invited you to his party!}
105-
multi {{organizer_name} have invited you to their party!}
106-
other {{organizer_name} has invited you to their party!}
103+
female {{organizer_name} has invited you to her party!}
104+
male {{organizer_name} has invited you to his party!}
105+
multiple {{organizer_name} have invited you to their party!}
106+
other {{organizer_name} has invited you to their party!}
107107
}
108108
109109
.. code-block:: xml
@@ -117,10 +117,10 @@ typical usage of this is gender:
117117
<source>invitation_title</source>
118118
<!-- the 'other' key is required, and is selected if no other case matches -->
119119
<target>{organizer_gender, select,
120-
female {{organizer_name} has invited you to her party!}
121-
male {{organizer_name} has invited you to his party!}
122-
multi {{organizer_name} have invited you to their party!}
123-
other {{organizer_name} has invited you to their party!}
120+
female {{organizer_name} has invited you to her party!}
121+
male {{organizer_name} has invited you to his party!}
122+
multiple {{organizer_name} have invited you to their party!}
123+
other {{organizer_name} has invited you to their party!}
124124
}</target>
125125
</trans-unit>
126126
</body>
@@ -133,10 +133,10 @@ typical usage of this is gender:
133133
return [
134134
// the 'other' key is required, and is selected if no other case matches
135135
'invitation_title' => '{organizer_gender, select,
136-
female {{organizer_name} has invited you to her party!}
137-
male {{organizer_name} has invited you to his party!}
138-
multi {{organizer_name} have invited you to their party!}
139-
other {{organizer_name} has invited you to their party!}
136+
female {{organizer_name} has invited you to her party!}
137+
male {{organizer_name} has invited you to his party!}
138+
multiple {{organizer_name} have invited you to their party!}
139+
other {{organizer_name} has invited you to their party!}
140140
}',
141141
];
142142
@@ -155,12 +155,12 @@ select. This function is applied over the ``organizer_gender`` variable::
155155
// prints "John & Jane have invited you to their party!"
156156
echo $translator->trans('invitation_title', [
157157
'organizer_name' => 'John & Jane',
158-
'organizer_gender' => 'multi',
158+
'organizer_gender' => 'multiple',
159159
]);
160160

161-
// prints "McDonalds has invited you to their party!"
161+
// prints "ACME Company has invited you to their party!"
162162
echo $translator->trans('invitation_title', [
163-
'organizer_name' => 'McDonalds',
163+
'organizer_name' => 'ACME Company',
164164
'organizer_gender' => 'not_applicable',
165165
]);
166166

@@ -179,7 +179,7 @@ you to use literal text in the select statements:
179179
While it might seem more logical to only put ``her``, ``his`` or ``their``
180180
in the switch statement, it is better to use "complex arguments" at the
181181
outermost structure of the message. The strings are in this way better
182-
readable for translators and, as you can see in the ``multi`` case, other
182+
readable for translators and, as you can see in the ``multiple`` case, other
183183
parts of the sentence might be influenced by the variables.
184184

185185
.. tip::
@@ -188,10 +188,10 @@ you to use literal text in the select statements:
188188
without having to define them in any file::
189189

190190
$invitation = '{organizer_gender, select,
191-
female {{organizer_name} has invited you to her party!}
192-
male {{organizer_name} has invited you to his party!}
193-
multi {{organizer_name} have invited you to their party!}
194-
other {{organizer_name} has invited you to their party!}
191+
female {{organizer_name} has invited you to her party!}
192+
male {{organizer_name} has invited you to his party!}
193+
multiple {{organizer_name} have invited you to their party!}
194+
other {{organizer_name} has invited you to their party!}
195195
}';
196196

197197
// prints "Ryan has invited you to his party!"

0 commit comments

Comments
 (0)