@barcidev/ngx-autogen 0.1.62 → 0.1.64

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barcidev/ngx-autogen",
3
- "version": "0.1.62",
3
+ "version": "0.1.64",
4
4
  "description": "A collection of Angular schematics for essential functionalities.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -50,7 +50,7 @@
50
50
  "dependencies": {
51
51
  "@angular-devkit/core": "^21.2.0",
52
52
  "@angular-devkit/schematics": "^21.2.0",
53
- "@barcidev/typed-transloco": "^0.0.13",
53
+ "@barcidev/typed-transloco": "^0.0.14",
54
54
  "@schematics/angular": "^21.2.0",
55
55
  "typescript": "~5.9.2"
56
56
  },
@@ -1,4 +1,4 @@
1
- import { TranslationScopeConfig } from '@barcidev/typed-transloco';
1
+ import { TranslationScopeConfig, TranslocoUtils } from '@barcidev/typed-transloco';
2
2
 
3
3
  const esCO = {
4
4
  title: 'Titulo'
@@ -7,12 +7,7 @@ const enUS = {
7
7
  title: 'Title'
8
8
  };
9
9
 
10
- const scope = '<%= camelize(name) %>' as const;
11
-
12
- export const <%= camelize(name) %>I18n: TranslationScopeConfig<typeof esCO, typeof scope> = {
13
- scope,
14
- translations: {
10
+ export const <%= camelize(name) %>I18n = TranslocoUtils.createScopeConfig('<%= camelize(name) %>', {
15
11
  'en-US': enUS,
16
12
  'es-CO': esCO
17
- }
18
- };
13
+ });
@@ -122,7 +122,7 @@ function updateAppI18nTypeRule(options) {
122
122
  let newObjectStr = (0, jsonc_parser_1.applyEdits)(oldObjectStr, edits);
123
123
  // 3. Reemplazamos los placeholders por el código real (sin comillas)
124
124
  const realKey = `[${i18nConstantName}.scope]`;
125
- const realValue = `${i18nConstantName}.translations['en-US']`;
125
+ const realValue = `${i18nConstantName}.translations['en-US'],`;
126
126
  newObjectStr = newObjectStr
127
127
  .replace(`"${keyPlaceholder}"`, realKey) // Limpia la llave
128
128
  .replace(`"${valuePlaceholder}"`, realValue); // Limpia el valor