i18next-cli 1.51.8 → 1.51.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/dist/cjs/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ const program = new commander.Command();
|
|
|
31
31
|
program
|
|
32
32
|
.name('i18next-cli')
|
|
33
33
|
.description('A unified, high-performance i18next CLI.')
|
|
34
|
-
.version('1.51.
|
|
34
|
+
.version('1.51.9'); // This string is replaced with the actual version at build time by rollup
|
|
35
35
|
// new: global config override option
|
|
36
36
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
37
37
|
program
|
|
@@ -668,14 +668,8 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
|
|
|
668
668
|
else {
|
|
669
669
|
// Existing value exists - decide whether to preserve, sync primary, or clear other locales when requested
|
|
670
670
|
if (locale === primaryLanguage && syncPrimaryWithDefaults) {
|
|
671
|
-
//
|
|
672
|
-
const isDerivedDefault =
|
|
673
|
-
// Check if defaultValue matches the namespaced key format (namespace:key)
|
|
674
|
-
(nsSep && namespace && defaultValue$1 === `${namespace}${nsSep}${key}`) ||
|
|
675
|
-
// For variant keys (plural/context), check if defaultValue is the base
|
|
676
|
-
(key !== defaultValue$1 &&
|
|
677
|
-
(key.startsWith(defaultValue$1 + pluralSeparator) ||
|
|
678
|
-
key.startsWith(defaultValue$1 + contextSeparator))));
|
|
671
|
+
// Reuse the same derived-default detection as the initial write path so reruns stay idempotent.
|
|
672
|
+
const isDerivedDefault = isDerivedFromKey(key, defaultValue$1, explicitDefault);
|
|
679
673
|
// If this key looks like a plural/context variant and the default
|
|
680
674
|
// wasn't explicitly provided in source code, preserve the existing value.
|
|
681
675
|
const isVariantKey = key.includes(pluralSeparator) || key.includes(contextSeparator);
|
package/dist/esm/cli.js
CHANGED
|
@@ -29,7 +29,7 @@ const program = new Command();
|
|
|
29
29
|
program
|
|
30
30
|
.name('i18next-cli')
|
|
31
31
|
.description('A unified, high-performance i18next CLI.')
|
|
32
|
-
.version('1.51.
|
|
32
|
+
.version('1.51.9'); // This string is replaced with the actual version at build time by rollup
|
|
33
33
|
// new: global config override option
|
|
34
34
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
35
35
|
program
|
|
@@ -666,14 +666,8 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
|
|
|
666
666
|
else {
|
|
667
667
|
// Existing value exists - decide whether to preserve, sync primary, or clear other locales when requested
|
|
668
668
|
if (locale === primaryLanguage && syncPrimaryWithDefaults) {
|
|
669
|
-
//
|
|
670
|
-
const isDerivedDefault =
|
|
671
|
-
// Check if defaultValue matches the namespaced key format (namespace:key)
|
|
672
|
-
(nsSep && namespace && defaultValue === `${namespace}${nsSep}${key}`) ||
|
|
673
|
-
// For variant keys (plural/context), check if defaultValue is the base
|
|
674
|
-
(key !== defaultValue &&
|
|
675
|
-
(key.startsWith(defaultValue + pluralSeparator) ||
|
|
676
|
-
key.startsWith(defaultValue + contextSeparator))));
|
|
669
|
+
// Reuse the same derived-default detection as the initial write path so reruns stay idempotent.
|
|
670
|
+
const isDerivedDefault = isDerivedFromKey(key, defaultValue, explicitDefault);
|
|
677
671
|
// If this key looks like a plural/context variant and the default
|
|
678
672
|
// wasn't explicitly provided in source code, preserve the existing value.
|
|
679
673
|
const isVariantKey = key.includes(pluralSeparator) || key.includes(contextSeparator);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/translation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"translation-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/translation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAq6B9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EACvB,MAAM,EAAE,oBAAoB,EAC5B,EACE,uBAA+B,EAC/B,OAAe,EACf,MAA4B,EAC7B,GAAE;IACD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CACX,GACL,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAuJ9B"}
|