Skip to content

Add methods to allow creating internationalized listings #20818

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 9 commits into from
Jun 7, 2023
Merged

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jun 1, 2023

Description:

Currently we have no possibility to create listings/enumerations correctly for the users language.
In some cases we simply concatenate the items with commas or prepend an (translated) and before the last item.
This is actually not correct as listings are done in different ways for other languages.

This PR updates our command to fetch patterns from cldr. It now also includes patterns around and and or listings.
In addition I've added methods to the translator class and introduced a new javascript object to allow creating such listings.

Note: This PR also updates all our Intl data from CLDR, so there are a lot more changes in those translation files...

Review

@sgiehl sgiehl added the c: i18n For issues around internationalisation and localisation. label Jun 1, 2023
@sgiehl sgiehl added this to the 5.0.0 milestone Jun 1, 2023
@sgiehl sgiehl force-pushed the i18nlistings branch 2 times, most recently from 8096662 to b4ed1e4 Compare June 2, 2023 07:07
@sgiehl sgiehl marked this pull request as ready for review June 2, 2023 07:07
@sgiehl sgiehl added the Needs Review PRs that need a code review label Jun 2, 2023
Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, failing tests don't seem to be related to the change.

@michalkleiner
Copy link
Contributor

Up to you when you merge this @sgiehl.

@sgiehl sgiehl merged commit 62ea1e2 into 5.x-dev Jun 7, 2023
@sgiehl sgiehl deleted the i18nlistings branch June 7, 2023 15:32
@michalkleiner michalkleiner removed the Needs Review PRs that need a code review label Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: i18n For issues around internationalisation and localisation.
Development

Successfully merging this pull request may close these issues.

2 participants