@itwin/core-i18n 5.7.0-dev.8 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -199,7 +199,7 @@ describe("ITwinLocalization", () => {
199
199
  // For interpolation options, see: https://www.i18next.com/translation-function/interpolation
200
200
  describe("#getLocalizedString", () => {
201
201
  before(async () => {
202
- localization = new ITwinLocalization();
202
+ localization = new ITwinLocalization({ initOptions: { lng: "en-US" } });
203
203
  await localization.initialize(["Default", "Test"]);
204
204
  germanLocalization = new ITwinLocalization({ initOptions: { lng: "de" } });
205
205
  await germanLocalization.initialize(["Default", "Test"]);
@@ -772,11 +772,11 @@ describe("ITwinLocalization", () => {
772
772
  // On current Linux CI environment, "@POSIX" is appended as a suffix to the locale,
773
773
  // which means that the en-US locales do not get loaded.
774
774
  if (!navigator.userAgent.toLowerCase().includes("linux")) {
775
- it("english language list includes en and en-US", async () => {
775
+ it("default list includes en and the user's language", async () => {
776
776
  localization = new ITwinLocalization();
777
777
  await localization.initialize([]);
778
778
  languages = localization.getLanguageList();
779
- assert.isTrue(languages.includes("en-US"));
779
+ assert.isTrue(languages.includes(navigator.language));
780
780
  assert.isTrue(languages.includes("en"));
781
781
  });
782
782
  }