gt-i18n 1.0.2 → 1.0.4
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/CHANGELOG.md +14 -0
- package/dist/{LocalesCache-BrqsSW3K.d.cts → WritableConditionStore-7OwoOSxr.d.cts} +6 -8
- package/dist/{LocalesCache-Cgg8OjSV.d.mts → WritableConditionStore-Y7klxD29.d.mts} +6 -8
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal-types.d.cts +1 -1
- package/dist/internal-types.d.mts +1 -1
- package/dist/internal.cjs +270 -490
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +17 -4
- package/dist/internal.d.mts +17 -4
- package/dist/internal.mjs +271 -491
- package/dist/internal.mjs.map +1 -1
- package/dist/{versionId-CSjMQCR_.cjs → versionId-CT-IBMV6.cjs} +18 -7
- package/dist/{versionId-CSjMQCR_.cjs.map → versionId-CT-IBMV6.cjs.map} +1 -1
- package/dist/{versionId-CfPcJY78.mjs → versionId-JokehdDv.mjs} +13 -2
- package/dist/{versionId-CfPcJY78.mjs.map → versionId-JokehdDv.mjs.map} +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# gt-i18n
|
|
2
2
|
|
|
3
|
+
## 1.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1856](https://github.com/generaltranslation/gt/pull/1856) [`b742df9`](https://github.com/generaltranslation/gt/commit/b742df9f0684c6ea12da140c4fd73eebb42f897a) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Flatten the internal i18n cache structure: the locale-cache layer is inlined into `I18nCache`, the in-flight promise dedupe shared by the caches is extracted into one helper, and the dev-only prefetch machinery is statically gated behind `process.env.NODE_ENV !== 'production'` so production bundles drop it. No public API changes; `gt-i18n/internal` and `gt-i18n/internal/types` exports are unchanged.
|
|
8
|
+
|
|
9
|
+
- [#1855](https://github.com/generaltranslation/gt/pull/1855) [`a148737`](https://github.com/generaltranslation/gt/commit/a1487377728b662dfd749ecfbd449a1e8d47db49) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Collapse the I18nCache constructor-time validation layer into a single helper. Observable behavior is unchanged: the same warnings are logged when a custom `runtimeUrl` is configured without GT credentials, and providing `loadDictionary` without a source `dictionary` still throws. The unreachable validation branches are removed, slightly shrinking browser bundles.
|
|
10
|
+
|
|
11
|
+
## 1.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#1861](https://github.com/generaltranslation/gt/pull/1861) [`6345dc5`](https://github.com/generaltranslation/gt/commit/6345dc5e3fe0a1e3ead9a3c30a0adaa4037d50a8) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - Skip interpolation in compiler-injected string prefetch calls so dev hot reload no longer logs "String interpolation failed" for messages with placeholders
|
|
16
|
+
|
|
3
17
|
## 1.0.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -66,6 +66,10 @@ type TranslationBatchConfig = {
|
|
|
66
66
|
* Just a way to be more explicit about what "hash" is
|
|
67
67
|
*/
|
|
68
68
|
type Hash = string;
|
|
69
|
+
/**
|
|
70
|
+
* Just being explicit about the purpose of this type
|
|
71
|
+
*/
|
|
72
|
+
type Locale = string;
|
|
69
73
|
//#endregion
|
|
70
74
|
//#region src/i18n-cache/translations-manager/translations-loaders/types.d.ts
|
|
71
75
|
/**
|
|
@@ -231,11 +235,5 @@ declare class WritableConditionStore extends ReadonlyConditionStore implements W
|
|
|
231
235
|
setEnableI18n: (enableI18n: boolean) => void;
|
|
232
236
|
}
|
|
233
237
|
//#endregion
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
* Just being explicit about the purpose of this type
|
|
237
|
-
*/
|
|
238
|
-
type Locale = string;
|
|
239
|
-
//#endregion
|
|
240
|
-
export { TranslationsLoader as _, ReadonlyConditionStoreParams as a, LocaleCandidates as c, I18nCacheConfig as d, I18nCacheConstructorParams as f, WritableConditionStoreInterface as g, ScopedConditionStoreInterface as h, ReadonlyConditionStore as i, AsyncReadonlyConditionStoreInterface as l, ReadonlyConditionStoreInterface as m, WritableConditionStore as n, I18nConfig as o, LocaleResolverConfig as p, WritableConditionStoreParams as r, I18nConfigParams as s, Locale as t, DictionaryConfig as u, Hash as v, GTConfig as y };
|
|
241
|
-
//# sourceMappingURL=LocalesCache-BrqsSW3K.d.cts.map
|
|
238
|
+
export { Hash as _, I18nConfig as a, AsyncReadonlyConditionStoreInterface as c, I18nCacheConstructorParams as d, LocaleResolverConfig as f, TranslationsLoader as g, WritableConditionStoreInterface as h, ReadonlyConditionStoreParams as i, DictionaryConfig as l, ScopedConditionStoreInterface as m, WritableConditionStoreParams as n, I18nConfigParams as o, ReadonlyConditionStoreInterface as p, ReadonlyConditionStore as r, LocaleCandidates as s, WritableConditionStore as t, I18nCacheConfig as u, Locale as v, GTConfig as y };
|
|
239
|
+
//# sourceMappingURL=WritableConditionStore-7OwoOSxr.d.cts.map
|
|
@@ -65,6 +65,10 @@ type TranslationBatchConfig = {
|
|
|
65
65
|
* Just a way to be more explicit about what "hash" is
|
|
66
66
|
*/
|
|
67
67
|
type Hash = string;
|
|
68
|
+
/**
|
|
69
|
+
* Just being explicit about the purpose of this type
|
|
70
|
+
*/
|
|
71
|
+
type Locale = string;
|
|
68
72
|
//#endregion
|
|
69
73
|
//#region src/i18n-cache/translations-manager/translations-loaders/types.d.ts
|
|
70
74
|
/**
|
|
@@ -230,11 +234,5 @@ declare class WritableConditionStore extends ReadonlyConditionStore implements W
|
|
|
230
234
|
setEnableI18n: (enableI18n: boolean) => void;
|
|
231
235
|
}
|
|
232
236
|
//#endregion
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
* Just being explicit about the purpose of this type
|
|
236
|
-
*/
|
|
237
|
-
type Locale = string;
|
|
238
|
-
//#endregion
|
|
239
|
-
export { TranslationsLoader as _, ReadonlyConditionStoreParams as a, LocaleCandidates as c, I18nCacheConfig as d, I18nCacheConstructorParams as f, WritableConditionStoreInterface as g, ScopedConditionStoreInterface as h, ReadonlyConditionStore as i, AsyncReadonlyConditionStoreInterface as l, ReadonlyConditionStoreInterface as m, WritableConditionStore as n, I18nConfig as o, LocaleResolverConfig as p, WritableConditionStoreParams as r, I18nConfigParams as s, Locale as t, DictionaryConfig as u, Hash as v, GTConfig as y };
|
|
240
|
-
//# sourceMappingURL=LocalesCache-Cgg8OjSV.d.mts.map
|
|
237
|
+
export { Hash as _, I18nConfig as a, AsyncReadonlyConditionStoreInterface as c, I18nCacheConstructorParams as d, LocaleResolverConfig as f, TranslationsLoader as g, WritableConditionStoreInterface as h, ReadonlyConditionStoreParams as i, DictionaryConfig as l, ScopedConditionStoreInterface as m, WritableConditionStoreParams as n, I18nConfigParams as o, ReadonlyConditionStoreInterface as p, ReadonlyConditionStore as r, LocaleCandidates as s, WritableConditionStore as t, I18nCacheConfig as u, Locale as v, GTConfig as y };
|
|
238
|
+
//# sourceMappingURL=WritableConditionStore-Y7klxD29.d.mts.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_versionId = require("./versionId-
|
|
2
|
+
const require_versionId = require("./versionId-CT-IBMV6.cjs");
|
|
3
3
|
let generaltranslation_internal = require("generaltranslation/internal");
|
|
4
4
|
let _generaltranslation_format = require("@generaltranslation/format");
|
|
5
5
|
let generaltranslation = require("generaltranslation");
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as logger_default, S as extractVariables, _ as resolveStringContentWithFallback, a as getDefaultLocale, b as interpolateIcuMessage, c as getLocales, d as getWritableConditionStore, g as resolveStringContent, i as hashMessage, l as getRegion, n as isEncodedTranslationOptions, o as getLocale, r as decodeOptions, s as getLocaleProperties, t as getVersionId, u as resolveCanonicalLocale, x as createInterpolationFailureMessage } from "./versionId-JokehdDv.mjs";
|
|
2
2
|
import { VAR_IDENTIFIER, encode, libraryDefaultLocale } from "generaltranslation/internal";
|
|
3
3
|
import { formatMessage } from "@generaltranslation/format";
|
|
4
4
|
import { declareVar, decodeVars, derive } from "generaltranslation";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as JsxTranslationOptions, c as NormalizedLookupOptions, d as TranslationOptions, f as TranslationVariables, i as GTTranslationOptions, l as RuntimeTranslationOptions, n as DictionaryLookupOptions, o as LookupOptions, r as EncodedTranslationOptions, s as LookupOptionsFor, t as DictionaryEntryOptions, u as TranslationMetadata } from "./options-BXeFwN0R.cjs";
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as Hash, c as AsyncReadonlyConditionStoreInterface, d as I18nCacheConstructorParams, f as LocaleResolverConfig, g as TranslationsLoader, h as WritableConditionStoreInterface, i as ReadonlyConditionStoreParams, l as DictionaryConfig, m as ScopedConditionStoreInterface, n as WritableConditionStoreParams, o as I18nConfigParams, p as ReadonlyConditionStoreInterface, s as LocaleCandidates, u as I18nCacheConfig, v as Locale, y as GTConfig } from "./WritableConditionStore-7OwoOSxr.cjs";
|
|
3
3
|
import { a as DictionaryLeaf, c as DictionaryValue, i as DictionaryKey, n as Dictionary, o as DictionaryObject, r as DictionaryEntry, s as DictionaryPath, t as DictionaryLoader } from "./DictionaryCache-DjAdDNiM.cjs";
|
|
4
4
|
export { type AsyncReadonlyConditionStoreInterface, type Dictionary, type DictionaryConfig, type DictionaryEntry, DictionaryEntryOptions, type DictionaryKey, type DictionaryLeaf, type DictionaryLoader, DictionaryLookupOptions, type DictionaryObject, type DictionaryPath, type DictionaryValue, EncodedTranslationOptions, type GTConfig, GTTranslationOptions, type Hash, type I18nCacheConfig, type I18nCacheConstructorParams, type I18nConfigParams, JsxTranslationOptions, type Locale, type LocaleCandidates, type LocaleResolverConfig, LookupOptions, LookupOptionsFor, NormalizedLookupOptions, type ReadonlyConditionStoreInterface, type ReadonlyConditionStoreParams, RuntimeTranslationOptions, type ScopedConditionStoreInterface, TranslationMetadata, TranslationOptions, TranslationVariables, type TranslationsLoader, type WritableConditionStoreInterface, type WritableConditionStoreParams };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as JsxTranslationOptions, c as NormalizedLookupOptions, d as TranslationOptions, f as TranslationVariables, i as GTTranslationOptions, l as RuntimeTranslationOptions, n as DictionaryLookupOptions, o as LookupOptions, r as EncodedTranslationOptions, s as LookupOptionsFor, t as DictionaryEntryOptions, u as TranslationMetadata } from "./options-DDUyXaLT.mjs";
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as Hash, c as AsyncReadonlyConditionStoreInterface, d as I18nCacheConstructorParams, f as LocaleResolverConfig, g as TranslationsLoader, h as WritableConditionStoreInterface, i as ReadonlyConditionStoreParams, l as DictionaryConfig, m as ScopedConditionStoreInterface, n as WritableConditionStoreParams, o as I18nConfigParams, p as ReadonlyConditionStoreInterface, s as LocaleCandidates, u as I18nCacheConfig, v as Locale, y as GTConfig } from "./WritableConditionStore-Y7klxD29.mjs";
|
|
3
3
|
import { a as DictionaryLeaf, c as DictionaryValue, i as DictionaryKey, n as Dictionary, o as DictionaryObject, r as DictionaryEntry, s as DictionaryPath, t as DictionaryLoader } from "./DictionaryCache-B7oTBs5W.mjs";
|
|
4
4
|
export { type AsyncReadonlyConditionStoreInterface, type Dictionary, type DictionaryConfig, type DictionaryEntry, DictionaryEntryOptions, type DictionaryKey, type DictionaryLeaf, type DictionaryLoader, DictionaryLookupOptions, type DictionaryObject, type DictionaryPath, type DictionaryValue, EncodedTranslationOptions, type GTConfig, GTTranslationOptions, type Hash, type I18nCacheConfig, type I18nCacheConstructorParams, type I18nConfigParams, JsxTranslationOptions, type Locale, type LocaleCandidates, type LocaleResolverConfig, LookupOptions, LookupOptionsFor, NormalizedLookupOptions, type ReadonlyConditionStoreInterface, type ReadonlyConditionStoreParams, RuntimeTranslationOptions, type ScopedConditionStoreInterface, TranslationMetadata, TranslationOptions, TranslationVariables, type TranslationsLoader, type WritableConditionStoreInterface, type WritableConditionStoreParams };
|