Esri / calcite-design-system

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

Use localization patterns vs hardcoded strings #7708

Open jcfranco opened 1 year ago

jcfranco commented 1 year ago

Check existing issues

Actual Behavior

The following hardcoded strings should be pulled into t9n bundles or use a formatting util:

  1. https://github.com/Esri/calcite-design-system/blob/fc2c720bc69db81075b7e021d69c4cb7e2c2b5a9/packages/calcite-components/src/components/stepper-item/stepper-item.tsx#L228 (trailing period)
  2. https://github.com/Esri/calcite-design-system/blob/3e1ed2dedeea09a6118e2f639201f5861dd492fd/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx#L551 (Date Format:)
  3. ~https://github.com/Esri/calcite-design-system/blob/8a575e451acb6b33d65124988b2e2f7ea8ec8b81/packages/calcite-components/src/components/tip-manager/tip-manager.tsx#L274 (label + index)~ deprecated

Expected Behavior

We avoid the hardcoded strings reported above.

Reproduction Sample

https://codepen.io/jcfranco/pen/RwEpwbL?editors=100

Reproduction Steps

  1. Open codepen
  2. Look at console to see the hardcoded assistive text

This repro sample is specific to one component. Links in the description show the hardcoded values.

Reproduction Version

1.8.0

Relevant Info

No response

Regression?

No response

Priority impact

p3 - want for upcoming milestone

Impact

Hardcoded values can interfere with AT and also not display as expected in certain locales.

Calcite package

Esri team

Calcite (dev)

jcfranco commented 1 year ago

@annierm18 Could you help confirm needing to localized string templates for items 1 and 3?