apostrophe icon indicating copy to clipboard operation
apostrophe copied to clipboard

Admin UI localization not working correctly for locales with country suffix

Open waldemar-p opened this issue 2 years ago • 0 comments

To Reproduce

1a. Without Assembly create a localization with

// sites/modules/@apostrophecms/i18n/index.js
module.exports = {
  options: {
    locales: {
      en: {
        label: "English",
        // The default locale since there is no prefix requirement.
      },
      "de-de": {
        label: "German",
        prefix: "/de-de",
      },
      de: {
        label: "German",
        prefix: "/de",
      },
    },
  },
};

1b. With Assembly simply create the two "German" locales via the UI.

  1. Now simply log into your apostrophe site to see the admin UI. You should see the german version for "de" but for "de-de" it seems to be English, even though the localization for the template content is working fine.

Expected behavior

German version of the admin UI for "de" and for "de-de"

Describe the bug

It seems that the admin UI is translated differently than the template content. That leads to the bug, that only "de" has a german admin UI and "de-de" is English.

Details

Version of Node.js: 14.18.0

Server Operating System: MacOS X

Screenshots 7a7117359d6fa74dfe86e789facfcf2e036500bb3a39275ea8042eeebb86922e

a74de784f09c47c4fb3d9b1e60ab40401cf26e660a84822c5d5b27fecfb889fb

waldemar-p avatar Jan 11 '23 12:01 waldemar-p