Skip to content
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

TimezoneMap: fix fractional timezone offset formatting #73

Merged
merged 1 commit into from
Aug 11, 2022
Merged

TimezoneMap: fix fractional timezone offset formatting #73

merged 1 commit into from
Aug 11, 2022

Conversation

jpnurmi
Copy link
Contributor

@jpnurmi jpnurmi commented Aug 11, 2022

When formatting fractional timezone offsets, force the "en_US" locale
to ensure that "." is used as the decimal separator instead of "," that
some (e.g. nordic) locales use.

This fixes the issue that depending on the value of Intl.defaultLocale,
the map would try to load SVGs with wrong file names such as "tz_5,5.svg"
instead of "tz_5.5.svg" for India.

When formatting fractional timezone offsets, force the "en_US" locale
to ensure that "." is used as the decimal separator instead of "," that
some (e.g. nordic) locales use.

This fixes the issue that depending on the value of `Intl.defaultLocale`,
the map would try to load SVGs with wrong file names such as "tz_5,5.svg"
instead of "tz_5.5.svg" for India.
Copy link
Contributor

@CarlosNihelton CarlosNihelton left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jpnurmi jpnurmi merged commit c8227e3 into canonical:main Aug 11, 2022
@jpnurmi jpnurmi deleted the timezone-map-number-format-locale branch August 11, 2022 11:26
spydon pushed a commit to spydon/ubuntu-flutter-plugins that referenced this pull request Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants