Uploaded image for project: 'stripes-acq-components'
  1. stripes-acq-components
  2. UISACQCOMP-2

ACQ - CurrencySelect values are not translated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Labels:
    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      ACQ Sprint 93
    • Story Points:
      1
    • Development Team:
      Thunderjet

      Description

      CurrencySelect provides labels directly from util/currencies.js which are in English only. Instead, it should use the code attribute to produce a localized value.

      Acceptance criteria:
      Currency selection component in acq modules uses translated currency labels.

      Implementation details:
      See https://formatjs.io/docs/react-intl/api/#formatdisplayname and an example in ui-developer. Here, we can just pipe the currency abbreviation through intl like

      import { useIntl } from 'react-intl';
      
      const intl = useIntl(); // or via props.intl / injectIntl if you're using a class component
      const currencyCode = 'USD';
      const happyTranslatedCurrencyName = intl.formatDisplayName(currencyCode, { type: 'currency' });
      

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dennisbridges Dennis Bridges
                Reporter:
                aliaksei_chumakou Aliaksei Chumakou
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases