@itwin/core-i18n 5.7.0-dev.7 → 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.
- package/lib/cjs/test/ITwinLocalization.test.js +3 -3
- package/lib/cjs/test/ITwinLocalization.test.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js +3 -3
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.js +3 -3
- package/lib/cjs/test/webpack/bundled-tests.js.map +1 -1
- package/lib/esm/test/ITwinLocalization.test.js +3 -3
- package/lib/esm/test/ITwinLocalization.test.js.map +1 -1
- package/package.json +6 -6
|
@@ -23375,7 +23375,7 @@ describe("ITwinLocalization", () => {
|
|
|
23375
23375
|
// For interpolation options, see: https://www.i18next.com/translation-function/interpolation
|
|
23376
23376
|
describe("#getLocalizedString", () => {
|
|
23377
23377
|
before(async () => {
|
|
23378
|
-
localization = new ITwinLocalization_1.ITwinLocalization();
|
|
23378
|
+
localization = new ITwinLocalization_1.ITwinLocalization({ initOptions: { lng: "en-US" } });
|
|
23379
23379
|
await localization.initialize(["Default", "Test"]);
|
|
23380
23380
|
germanLocalization = new ITwinLocalization_1.ITwinLocalization({ initOptions: { lng: "de" } });
|
|
23381
23381
|
await germanLocalization.initialize(["Default", "Test"]);
|
|
@@ -23948,11 +23948,11 @@ describe("ITwinLocalization", () => {
|
|
|
23948
23948
|
// On current Linux CI environment, "@POSIX" is appended as a suffix to the locale,
|
|
23949
23949
|
// which means that the en-US locales do not get loaded.
|
|
23950
23950
|
if (!navigator.userAgent.toLowerCase().includes("linux")) {
|
|
23951
|
-
it("
|
|
23951
|
+
it("default list includes en and the user's language", async () => {
|
|
23952
23952
|
localization = new ITwinLocalization_1.ITwinLocalization();
|
|
23953
23953
|
await localization.initialize([]);
|
|
23954
23954
|
languages = localization.getLanguageList();
|
|
23955
|
-
chai_1.assert.isTrue(languages.includes(
|
|
23955
|
+
chai_1.assert.isTrue(languages.includes(navigator.language));
|
|
23956
23956
|
chai_1.assert.isTrue(languages.includes("en"));
|
|
23957
23957
|
});
|
|
23958
23958
|
}
|