Skip to content

Commit ce20942

Browse files
committed
minor #14883 [Translator] Fix select & plural message format (mabar)
This PR was merged into the 4.4 branch. Discussion ---------- [Translator] Fix select & plural message format Current version produces spaces around message with both ext-int and symfony version of message formatter. This PR fixes it. e.g. for parameters `['gender_of_host' => 'male', 'num_guests' => 2, 'host' => 'John', 'guest' => 'Mr. Bean']` output changes from: (select text to see spaces) ```txt John invites Mr. Bean and one other person to his party. ``` To: ```txt John invites Mr. Bean and one other person to his party. ``` Commits ------- 86b2834 Fix select & plural message format
2 parents ccc6f36 + 86b2834 commit ce20942

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

translation/message_format.rst

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -256,27 +256,24 @@ Usage of this string is the same as with variables and select::
256256
.. code-block:: text
257257
258258
{gender_of_host, select,
259-
female {
260-
{num_guests, plural, offset:1
259+
female {{num_guests, plural, offset:1
261260
=0 {{host} does not give a party.}
262261
=1 {{host} invites {guest} to her party.}
263262
=2 {{host} invites {guest} and one other person to her party.}
264-
other {{host} invites {guest} and # other people to her party.}}
265-
}
266-
male {
267-
{num_guests, plural, offset:1
263+
other {{host} invites {guest} and # other people to her party.}
264+
}}
265+
male {{num_guests, plural, offset:1
268266
=0 {{host} does not give a party.}
269267
=1 {{host} invites {guest} to his party.}
270268
=2 {{host} invites {guest} and one other person to his party.}
271-
other {{host} invites {guest} and # other people to his party.}}
272-
}
273-
other {
274-
{num_guests, plural, offset:1
269+
other {{host} invites {guest} and # other people to his party.}
270+
}}
271+
other {{num_guests, plural, offset:1
275272
=0 {{host} does not give a party.}
276273
=1 {{host} invites {guest} to their party.}
277274
=2 {{host} invites {guest} and one other person to their party.}
278-
other {{host} invites {guest} and # other people to their party.}}
279-
}
275+
other {{host} invites {guest} and # other people to their party.}
276+
}}
280277
}
281278
282279
.. sidebar:: Using Ranges in Messages

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy