Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-12750

Translations API does not support the region part of bcp47 codes

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: l10n & i18n
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      The backend API /api/l10n is designed to support the official bcp47 standard : https://tools.ietf.org/html/bcp47. The internal representation is the Java class Locale, which is compliant with this standard. We then crawl the classpath for a translation file matching the locale.

      But still, if we provide a bcp47 code with a region (zh-tw for eg.), the 'tw' part is ignored by the API which only return the first `zh` properties found in the classpath.

      This cause translation plugins to conflict when providing a translation for a specific region, like traditional Chinese vs simplified Chinese : https://community.sonarsource.com/t/new-release-sonar-l10n-zh-tw-plugin-1-0/16402

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pierre.guillot Pierre Guillot
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: