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

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.
@@ -201,7 +201,7 @@ describe("ITwinLocalization", () => {
201
201
  // For interpolation options, see: https://www.i18next.com/translation-function/interpolation
202
202
  describe("#getLocalizedString", () => {
203
203
  before(async () => {
204
- localization = new ITwinLocalization_1.ITwinLocalization();
204
+ localization = new ITwinLocalization_1.ITwinLocalization({ initOptions: { lng: "en-US" } });
205
205
  await localization.initialize(["Default", "Test"]);
206
206
  germanLocalization = new ITwinLocalization_1.ITwinLocalization({ initOptions: { lng: "de" } });
207
207
  await germanLocalization.initialize(["Default", "Test"]);
@@ -774,11 +774,11 @@ describe("ITwinLocalization", () => {
774
774
  // On current Linux CI environment, "@POSIX" is appended as a suffix to the locale,
775
775
  // which means that the en-US locales do not get loaded.
776
776
  if (!navigator.userAgent.toLowerCase().includes("linux")) {
777
- it("english language list includes en and en-US", async () => {
777
+ it("default list includes en and the user's language", async () => {
778
778
  localization = new ITwinLocalization_1.ITwinLocalization();
779
779
  await localization.initialize([]);
780
780
  languages = localization.getLanguageList();
781
- chai_1.assert.isTrue(languages.includes("en-US"));
781
+ chai_1.assert.isTrue(languages.includes(navigator.language));
782
782
  chai_1.assert.isTrue(languages.includes("en"));
783
783
  });
784
784
  }