Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
290 stars 75 forks source link

[input-time-zone] Add translations for other supported IANA time zones #8005

Open jcfranco opened 1 year ago

jcfranco commented 1 year ago

Check existing issues

Description

Safari and Firefox have additional time zones returned from Intl.supportedValuesOf("timeZone") that need to be translated for the offset mode:

Note: time zones without an associated region/city might not need translating

Acceptance Criteria

Time zones listed above are added to the translation bundle.

Relevant Info

Blocked issues: https://github.com/Esri/calcite-design-system/issues/8698

Which Component

calcite-input-time-zone

Example Use Case

No response

Priority impact

p3 - want for upcoming milestone

Calcite package

Esri team

Calcite (dev)

jcfranco commented 1 month ago

This should be improved by #10289, which introduced changes to use consistent, canonical time zones and maps deprecated ones to canonical zones.

I’ll need to check if the latest strings cover all translations for both offset and regionmodes.

jcfranco commented 1 month ago

I'm not quite sure about translating entries for the name mode though. Listing the region/location by itself doesn’t seem very useful as it will miss context if you are unfamiliar with the associated time zone. I’m also unsure about translating IANA time zones directly (e.g., America/Cd_Juarez ➡️ América/Ciudad Juárez, América - Ciudad Juárez or Ciudad Juárez, América - last examples start looking like region mode 🤔).

With the new region mode, I’m leaning towards keeping name as is (listing IANA time zone identifiers) and recommending users to use offset or region if they need translated time zone-related information.

@ashetland @richiecarmichael @emmilaakso212 WDYT?

ashetland commented 1 month ago

Is it worth deprecating name in favor of region? Is there a use case that name serves that region does not?

richiecarmichael commented 1 month ago

With the new region mode, I’m leaning towards keeping name as is...

I agree.

Is it worth deprecating name in favor of region?

Not sure without user feedback. One idea is that name could revert to raw (un-localized) IANA strings and the new region mode would be for localized and grouped time zones.

jcfranco commented 1 month ago

Is it worth deprecating name in favor of region?

Not sure without user feedback.

Agreed, we could keep it for a a while and gauge feedback.

One idea is that name could revert to raw (un-localized) IANA strings and the new region mode would be for localized and grouped time zones.

Do you mean as a doc/recommendation update or are you suggesting a tweak in functionality? The "revert" part threw me off. 😅

jcfranco commented 1 month ago

@richiecarmichael and I had a quick chat on ☝️ and we're both in agreement that name would be a better fit for use cases where the exact time zone identifier would be displayed (e.g., system administrator). If there's no objection, I can tweak the name mode to no longer replaces underscores with spaces from time zone item labels and display them as is.

jcfranco commented 1 month ago

I’ll need to check if the latest strings cover all translations for both offset and region modes.

Confirmed! Similar to #8112, this should be fixed by #10289. cc @geospatialem @DitwanP