mirror of
https://github.com/flarum/core.git
synced 2025-08-21 07:41:49 +02:00
Switch to ICU MessageFormat (#2759)
This commit is contained in:
committed by
GitHub
parent
edaf45d133
commit
b45519974a
2
tests/fixtures/locales/en+intl-icu.yml
vendored
Normal file
2
tests/fixtures/locales/en+intl-icu.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
test:
|
||||
hello-intl: World-intl {name}
|
23
tests/fixtures/locales/en.yml
vendored
Normal file
23
tests/fixtures/locales/en.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
test:
|
||||
hello: World {name}
|
||||
party-invitation: | # From https://symfony.com/doc/current/translation/message_format.html#pluralization
|
||||
{gender_of_host, select,
|
||||
female {{num_guests, plural, offset:1
|
||||
=0 {{host} does not give a party.}
|
||||
=1 {{host} invites {guest} to her party.}
|
||||
=2 {{host} invites {guest} and one other person to her party.}
|
||||
other {{host} invites {guest} and # other people to her party.}
|
||||
}}
|
||||
male {{num_guests, plural, offset:1
|
||||
=0 {{host} does not give a party.}
|
||||
=1 {{host} invites {guest} to his party.}
|
||||
=2 {{host} invites {guest} and one other person to his party.}
|
||||
other {{host} invites {guest} and # other people to his party.}
|
||||
}}
|
||||
other {{num_guests, plural, offset:1
|
||||
=0 {{host} does not give a party.}
|
||||
=1 {{host} invites {guest} to their party.}
|
||||
=2 {{host} invites {guest} and one other person to their party.}
|
||||
other {{host} invites {guest} and # other people to their party.}
|
||||
}}
|
||||
}
|
Reference in New Issue
Block a user