i18next-cli 1.51.8 → 1.52.0

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/README.md CHANGED
@@ -119,6 +119,7 @@ npx i18next-cli extract [options]
119
119
  - `--dry-run`: Does not change any files - useful in combination with `--ci` (for CI/CD)
120
120
  - `--sync-primary`: Sync primary language values with default values from code
121
121
  - `--sync-all`: Sync primary language values with default values from code AND clear synced keys in all other locales (implies `--sync-primary`)
122
+ - `--trust-derived`: When used with `--sync-primary` or `--sync-all`, also trust defaults inferred from keys such as `t('Hello')` or `keyPrefix`-derived values. This keeps the default sync behavior strict unless you opt in.
122
123
  - `--quiet`: Suppress spinner and non-essential output (for CI or scripting)
123
124
 
124
125
  ### Spinner and Logger Output Control
@@ -165,6 +166,9 @@ npx i18next-cli extract --sync-primary
165
166
  # Sync primary and clear synced keys in all other locales
166
167
  npx i18next-cli extract --sync-all
167
168
 
169
+ # Sync using explicit defaults plus inferred key-derived defaults
170
+ npx i18next-cli extract --sync-all --trust-derived
171
+
168
172
  # Combine options for optimal development workflow
169
173
  npx i18next-cli extract --sync-primary --watch
170
174
  ```
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.8'); // This string is replaced with the actual version at build time by rollup
34
+ .version('1.52.0'); // 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
@@ -42,6 +42,7 @@ program
42
42
  .option('--dry-run', 'Run the extractor without writing any files to disk.')
43
43
  .option('--sync-primary', 'Sync primary language values with default values from code.')
44
44
  .option('--sync-all', 'Sync primary language values with default values from code AND clear synced keys in all other locales.')
45
+ .option('--trust-derived', 'When used with --sync-primary or --sync-all, also trust defaults inferred from keys (including keyPrefix-derived values).')
45
46
  .option('-q, --quiet', 'Suppress spinner and output')
46
47
  .action(async (options) => {
47
48
  try {
@@ -55,6 +56,7 @@ program
55
56
  isDryRun: !!options.dryRun,
56
57
  syncPrimaryWithDefaults: syncPrimary,
57
58
  syncAll: !!options.syncAll,
59
+ trustDerivedDefaults: !!options.trustDerived,
58
60
  quiet: !!options.quiet
59
61
  });
60
62
  if (options.ci && !anyFileUpdated) {
@@ -59,6 +59,7 @@ async function runExtractor(config, options = {}) {
59
59
  const results = await translationManager.getTranslations(allKeys, objectKeys, config, {
60
60
  syncPrimaryWithDefaults: options.syncPrimaryWithDefaults,
61
61
  syncAll: options.syncAll,
62
+ trustDerivedDefaults: options.trustDerivedDefaults,
62
63
  logger: options.logger
63
64
  });
64
65
  let anyFileUpdated = false;
@@ -210,7 +210,7 @@ function sortObject(obj, config, customSort) {
210
210
  * A helper function to build a new translation object for a single namespace.
211
211
  * This centralizes the core logic of merging keys.
212
212
  */
213
- function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, namespace, preservePatterns = [], objectKeys = new Set(), syncPrimaryWithDefaults = false, syncAll = false, logger$1 = new logger.ConsoleLogger()) {
213
+ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, namespace, preservePatterns = [], objectKeys = new Set(), syncPrimaryWithDefaults = false, syncAll = false, trustDerivedDefaults = false, logger$1 = new logger.ConsoleLogger()) {
214
214
  const { keySeparator = '.', sort = true, removeUnusedKeys = true, primaryLanguage, defaultValue: emptyDefaultValue = '', pluralSeparator = '_', contextSeparator = '_', preserveContextVariants = false, } = config.extract;
215
215
  const nsSep = typeof config.extract.nsSeparator === 'string' ? config.extract.nsSeparator : ':';
216
216
  // Keep the raw configured defaultValue so we can distinguish:
@@ -644,7 +644,7 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
644
644
  // use the unified "derived" detector (includes keyPrefix suffixes).
645
645
  const isDerivedDefault = isDerivedFromKey(key, defaultValue$1, explicitDefault);
646
646
  valueToSet =
647
- (defaultValue$1 && !isDerivedDefault)
647
+ (defaultValue$1 && (!isDerivedDefault || trustDerivedDefaults))
648
648
  ? defaultValue$1
649
649
  : defaultValue.resolveDefaultValue(emptyDefaultValue, key, namespace || config?.extract?.defaultNS || 'translation', locale, defaultValue$1);
650
650
  }
@@ -668,21 +668,15 @@ 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
- // Only update when we have a meaningful defaultValue that's not derived from the key pattern.
672
- const isDerivedDefault = defaultValue$1 && (defaultValue$1 === key || // Exact match with the key itself
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);
682
676
  if (isVariantKey && !explicitDefault) {
683
677
  valueToSet = existingValue;
684
678
  }
685
- else if (defaultValue$1 && !isDerivedDefault) {
679
+ else if (defaultValue$1 && (!isDerivedDefault || trustDerivedDefaults)) {
686
680
  valueToSet = defaultValue.resolveDefaultValue(defaultValue$1, key, namespace || config?.extract?.defaultNS || 'translation', locale, defaultValue$1);
687
681
  }
688
682
  else {
@@ -691,7 +685,8 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
691
685
  }
692
686
  else {
693
687
  // Non-primary locale behavior
694
- if (syncAll && locale !== primaryLanguage && explicitDefault) {
688
+ const syncDerivedDefault = Boolean(trustDerivedDefaults && defaultValue$1 && isDerivedFromKey(key, defaultValue$1, explicitDefault));
689
+ if (syncAll && locale !== primaryLanguage && (explicitDefault || syncDerivedDefault)) {
695
690
  // When syncAll is requested, clear (reset) any existing translations for keys
696
691
  // that had explicit defaults in code so the primary default can be propagated
697
692
  // while secondary locales get a blank/placeholder value.
@@ -844,7 +839,7 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
844
839
  * // Results contain update status and new/existing translations for each locale.
845
840
  * ```
846
841
  */
847
- async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaults = false, syncAll = false, logger: logger$1 = new logger.ConsoleLogger() } = {}) {
842
+ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaults = false, syncAll = false, trustDerivedDefaults = false, logger: logger$1 = new logger.ConsoleLogger() } = {}) {
848
843
  config.extract.primaryLanguage ||= config.locales[0] || 'en';
849
844
  config.extract.secondaryLanguages ||= config.locales.filter((l) => l !== config?.extract?.primaryLanguage);
850
845
  const patternsToPreserve = [...(config.extract.preservePatterns || [])];
@@ -925,12 +920,12 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
925
920
  const nsKeys = keysByNS.get(nsKey) || [];
926
921
  if (isTopLevel(nsKey)) {
927
922
  // keys without namespace -> merged into top-level of the merged file
928
- const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger$1);
923
+ const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, trustDerivedDefaults, logger$1);
929
924
  Object.assign(newMergedTranslations, built);
930
925
  }
931
926
  else {
932
927
  const existingTranslations = existingMergedFile[nsKey] || {};
933
- newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger$1);
928
+ newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, trustDerivedDefaults, logger$1);
934
929
  }
935
930
  }
936
931
  // Preserve ignored namespaces as-is from the existing merged file
@@ -968,7 +963,7 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
968
963
  const outputPath = fileUtils.getOutputPath(config.extract.output, locale, ns);
969
964
  const fullPath = node_path.resolve(process.cwd(), outputPath);
970
965
  const existingTranslations = await fileUtils.loadTranslationFile(fullPath) || {};
971
- const newTranslations = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, ns, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger$1);
966
+ const newTranslations = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, ns, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, trustDerivedDefaults, logger$1);
972
967
  const oldContent = JSON.stringify(existingTranslations, null, indentation);
973
968
  const newContent = JSON.stringify(newTranslations, null, indentation);
974
969
  // Push one result per namespace file
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.8'); // This string is replaced with the actual version at build time by rollup
32
+ .version('1.52.0'); // 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
@@ -40,6 +40,7 @@ program
40
40
  .option('--dry-run', 'Run the extractor without writing any files to disk.')
41
41
  .option('--sync-primary', 'Sync primary language values with default values from code.')
42
42
  .option('--sync-all', 'Sync primary language values with default values from code AND clear synced keys in all other locales.')
43
+ .option('--trust-derived', 'When used with --sync-primary or --sync-all, also trust defaults inferred from keys (including keyPrefix-derived values).')
43
44
  .option('-q, --quiet', 'Suppress spinner and output')
44
45
  .action(async (options) => {
45
46
  try {
@@ -53,6 +54,7 @@ program
53
54
  isDryRun: !!options.dryRun,
54
55
  syncPrimaryWithDefaults: syncPrimary,
55
56
  syncAll: !!options.syncAll,
57
+ trustDerivedDefaults: !!options.trustDerived,
56
58
  quiet: !!options.quiet
57
59
  });
58
60
  if (options.ci && !anyFileUpdated) {
@@ -57,6 +57,7 @@ async function runExtractor(config, options = {}) {
57
57
  const results = await getTranslations(allKeys, objectKeys, config, {
58
58
  syncPrimaryWithDefaults: options.syncPrimaryWithDefaults,
59
59
  syncAll: options.syncAll,
60
+ trustDerivedDefaults: options.trustDerivedDefaults,
60
61
  logger: options.logger
61
62
  });
62
63
  let anyFileUpdated = false;
@@ -208,7 +208,7 @@ function sortObject(obj, config, customSort) {
208
208
  * A helper function to build a new translation object for a single namespace.
209
209
  * This centralizes the core logic of merging keys.
210
210
  */
211
- function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, namespace, preservePatterns = [], objectKeys = new Set(), syncPrimaryWithDefaults = false, syncAll = false, logger = new ConsoleLogger()) {
211
+ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, namespace, preservePatterns = [], objectKeys = new Set(), syncPrimaryWithDefaults = false, syncAll = false, trustDerivedDefaults = false, logger = new ConsoleLogger()) {
212
212
  const { keySeparator = '.', sort = true, removeUnusedKeys = true, primaryLanguage, defaultValue: emptyDefaultValue = '', pluralSeparator = '_', contextSeparator = '_', preserveContextVariants = false, } = config.extract;
213
213
  const nsSep = typeof config.extract.nsSeparator === 'string' ? config.extract.nsSeparator : ':';
214
214
  // Keep the raw configured defaultValue so we can distinguish:
@@ -642,7 +642,7 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
642
642
  // use the unified "derived" detector (includes keyPrefix suffixes).
643
643
  const isDerivedDefault = isDerivedFromKey(key, defaultValue, explicitDefault);
644
644
  valueToSet =
645
- (defaultValue && !isDerivedDefault)
645
+ (defaultValue && (!isDerivedDefault || trustDerivedDefaults))
646
646
  ? defaultValue
647
647
  : resolveDefaultValue(emptyDefaultValue, key, namespace || config?.extract?.defaultNS || 'translation', locale, defaultValue);
648
648
  }
@@ -666,21 +666,15 @@ 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
- // Only update when we have a meaningful defaultValue that's not derived from the key pattern.
670
- const isDerivedDefault = defaultValue && (defaultValue === key || // Exact match with the key itself
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);
680
674
  if (isVariantKey && !explicitDefault) {
681
675
  valueToSet = existingValue;
682
676
  }
683
- else if (defaultValue && !isDerivedDefault) {
677
+ else if (defaultValue && (!isDerivedDefault || trustDerivedDefaults)) {
684
678
  valueToSet = resolveDefaultValue(defaultValue, key, namespace || config?.extract?.defaultNS || 'translation', locale, defaultValue);
685
679
  }
686
680
  else {
@@ -689,7 +683,8 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
689
683
  }
690
684
  else {
691
685
  // Non-primary locale behavior
692
- if (syncAll && locale !== primaryLanguage && explicitDefault) {
686
+ const syncDerivedDefault = Boolean(trustDerivedDefaults && defaultValue && isDerivedFromKey(key, defaultValue, explicitDefault));
687
+ if (syncAll && locale !== primaryLanguage && (explicitDefault || syncDerivedDefault)) {
693
688
  // When syncAll is requested, clear (reset) any existing translations for keys
694
689
  // that had explicit defaults in code so the primary default can be propagated
695
690
  // while secondary locales get a blank/placeholder value.
@@ -842,7 +837,7 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
842
837
  * // Results contain update status and new/existing translations for each locale.
843
838
  * ```
844
839
  */
845
- async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaults = false, syncAll = false, logger = new ConsoleLogger() } = {}) {
840
+ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaults = false, syncAll = false, trustDerivedDefaults = false, logger = new ConsoleLogger() } = {}) {
846
841
  config.extract.primaryLanguage ||= config.locales[0] || 'en';
847
842
  config.extract.secondaryLanguages ||= config.locales.filter((l) => l !== config?.extract?.primaryLanguage);
848
843
  const patternsToPreserve = [...(config.extract.preservePatterns || [])];
@@ -923,12 +918,12 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
923
918
  const nsKeys = keysByNS.get(nsKey) || [];
924
919
  if (isTopLevel(nsKey)) {
925
920
  // keys without namespace -> merged into top-level of the merged file
926
- const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger);
921
+ const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, trustDerivedDefaults, logger);
927
922
  Object.assign(newMergedTranslations, built);
928
923
  }
929
924
  else {
930
925
  const existingTranslations = existingMergedFile[nsKey] || {};
931
- newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger);
926
+ newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, trustDerivedDefaults, logger);
932
927
  }
933
928
  }
934
929
  // Preserve ignored namespaces as-is from the existing merged file
@@ -966,7 +961,7 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
966
961
  const outputPath = getOutputPath(config.extract.output, locale, ns);
967
962
  const fullPath = resolve(process.cwd(), outputPath);
968
963
  const existingTranslations = await loadTranslationFile(fullPath) || {};
969
- const newTranslations = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, ns, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger);
964
+ const newTranslations = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, ns, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, trustDerivedDefaults, logger);
970
965
  const oldContent = JSON.stringify(existingTranslations, null, indentation);
971
966
  const newContent = JSON.stringify(newTranslations, null, indentation);
972
967
  // Push one result per namespace file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18next-cli",
3
- "version": "1.51.8",
3
+ "version": "1.52.0",
4
4
  "description": "A unified, high-performance i18next CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAmBnC,QAAA,MAAM,OAAO,SAAgB,CAAA;AA2U7B,OAAO,EAAE,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAmBnC,QAAA,MAAM,OAAO,SAAgB,CAAA;AA6U7B,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -31,6 +31,7 @@ export declare function runExtractor(config: I18nextToolkitConfig, options?: {
31
31
  isDryRun?: boolean;
32
32
  syncPrimaryWithDefaults?: boolean;
33
33
  syncAll?: boolean;
34
+ trustDerivedDefaults?: boolean;
34
35
  quiet?: boolean;
35
36
  logger?: Logger;
36
37
  }): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/ext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,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAC7C,MAAM,GAAE,MAA4B,EACpC,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CA6Df;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,OAAO,CAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,uBAA+B,EAAE,GAAE;IAAE,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAO1K"}
@@ -28,9 +28,10 @@ import { TranslationResult, ExtractedKey, I18nextToolkitConfig, Logger } from '.
28
28
  * // Results contain update status and new/existing translations for each locale.
29
29
  * ```
30
30
  */
31
- export declare function getTranslations(keys: Map<string, ExtractedKey>, objectKeys: Set<string>, config: I18nextToolkitConfig, { syncPrimaryWithDefaults, syncAll, logger }?: {
31
+ export declare function getTranslations(keys: Map<string, ExtractedKey>, objectKeys: Set<string>, config: I18nextToolkitConfig, { syncPrimaryWithDefaults, syncAll, trustDerivedDefaults, logger }?: {
32
32
  syncPrimaryWithDefaults?: boolean;
33
33
  syncAll?: boolean;
34
+ trustDerivedDefaults?: boolean;
34
35
  logger?: Logger;
35
36
  }): Promise<TranslationResult[]>;
36
37
  //# sourceMappingURL=translation-manager.d.ts.map
@@ -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;AA66B9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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;AAu6B9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,oBAA4B,EAC5B,MAA4B,EAC7B,GAAE;IACD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;CACX,GACL,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAuJ9B"}