@itwin/core-i18n 5.0.0-dev.57 → 5.0.0-dev.59
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/ITwinLocalization.d.ts +0 -9
- package/lib/cjs/ITwinLocalization.d.ts.map +1 -1
- package/lib/cjs/ITwinLocalization.js +0 -20
- package/lib/cjs/ITwinLocalization.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js +349 -527
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.js +0 -20
- package/lib/cjs/test/webpack/bundled-tests.js.map +1 -1
- package/lib/esm/ITwinLocalization.d.ts +0 -9
- package/lib/esm/ITwinLocalization.d.ts.map +1 -1
- package/lib/esm/ITwinLocalization.js +0 -20
- package/lib/esm/ITwinLocalization.js.map +1 -1
- package/package.json +6 -6
|
@@ -22310,26 +22310,6 @@ class ITwinLocalization {
|
|
|
22310
22310
|
}
|
|
22311
22311
|
return value;
|
|
22312
22312
|
}
|
|
22313
|
-
/** Similar to `getLocalizedString` but the default namespace is a separate parameter and the key does not need
|
|
22314
|
-
* to include a namespace. If a key includes a namespace, that namespace will be used for interpolating that key.
|
|
22315
|
-
* @param namespace - the namespace that identifies the particular localization file that contains the property.
|
|
22316
|
-
* @param key - the key that matches a property in the JSON localization file.
|
|
22317
|
-
* @returns The string corresponding to the first key that resolves.
|
|
22318
|
-
* @throws Error if no keys resolve to a string.
|
|
22319
|
-
* @internal
|
|
22320
|
-
*/
|
|
22321
|
-
getLocalizedStringWithNamespace(namespace, key, options) {
|
|
22322
|
-
let fullKey = "";
|
|
22323
|
-
if (typeof key === "string") {
|
|
22324
|
-
fullKey = `${namespace}:${key}`;
|
|
22325
|
-
}
|
|
22326
|
-
else {
|
|
22327
|
-
fullKey = key.map((subKey) => {
|
|
22328
|
-
return `${namespace}:${subKey}`;
|
|
22329
|
-
});
|
|
22330
|
-
}
|
|
22331
|
-
return this.getLocalizedString(fullKey, options);
|
|
22332
|
-
}
|
|
22333
22313
|
/** Gets the English translation.
|
|
22334
22314
|
* @param namespace - the namespace that identifies the particular localization file that contains the property.
|
|
22335
22315
|
* @param key - the key that matches a property in the JSON localization file.
|