Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22722

Fix language defaulting to English when locale sub-code is missing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: WEBUI-1.0.0, 9.2
    • Fix Version/s: WEBUI-1.0.2, 9.3
    • Component/s: Web UI
    • Sprint:
      nxGang Sprint 9.3.2, nxGang Sprint 9.3.3, nxGang Sprint 9.3.4, nxGang Sprint 9.3.5
    • Story Points:
      3

      Description

      On macOs, Chrome selects the display language base on the OS locale. However, macOs omits the sub-code for some languages. This creates a disparity between Web UI translations and languages loaded by the browser in some conditions. For example, in Crowdin Spanish is labeled es-ES, with locale code es (ISO 639-1/2) and sub-code ES (ISO 3166-2), whereas it is just labeled es by macOs. Therefore, the es messages file won't be found by Web UI which will default to the English reference file. This is also supported by other browsers, like Firefox.

      We need to come up with a mapping strategy to solve these discrepancies. We could use a global js object to map es to es-ES. This approach would also allow custom rules to be added by third parties afterwards. Another alternative would be to generate a messages-es.json from messages-es-ES.json on build time.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h