ai-localize-config 2.0.1 → 2.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 +18 -0
- package/dist/index.d.mts +41 -3
- package/dist/index.d.ts +41 -3
- package/dist/index.js +72 -8
- package/dist/index.mjs +72 -8
- package/package.json +21 -2
- package/src/index.ts +0 -2
- package/src/loader.ts +0 -224
- package/src/schema.ts +0 -93
- package/tsconfig.json +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# ai-localize-config
|
|
2
2
|
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **`keyStyle` Zod schema field** — `ConfigSchema` now validates `keyStyle: "path" | "screaming_snake"` (default `"path"`); controls whether locale keys are hierarchical dot-notation or UPPER_SNAKE_CASE derived from the text value
|
|
8
|
+
- **`staticKeys` Zod schema field** — `ConfigSchema` now validates `staticKeys: Record<string, string>` (default `{}`); entries are injected into every locale file at extract/full-migrate time
|
|
9
|
+
|
|
10
|
+
## 2.0.2
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- **`CodemodConfigSchema` added** — Zod schema extended with `codemods` field (accessorStyle, translationFunction, namespace) and `localeStructure` field; both fields are now properly validated and surfaced in config loading
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- ai-localize-shared@2.0.2
|
|
20
|
+
|
|
3
21
|
## 2.0.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -64,9 +64,9 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
64
64
|
*/
|
|
65
65
|
namespace: z.ZodOptional<z.ZodString>;
|
|
66
66
|
/**
|
|
67
|
-
|
|
67
|
+
* How the translation accessor is written in generated code.
|
|
68
68
|
* "function" (default) — t('key')
|
|
69
|
-
|
|
69
|
+
* "bracket" — t['key']
|
|
70
70
|
*/
|
|
71
71
|
accessorStyle: z.ZodOptional<z.ZodEnum<["function", "bracket"]>>;
|
|
72
72
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -87,9 +87,43 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
87
87
|
* "nested" (default) — one file per language + namespace:
|
|
88
88
|
* locales/en/common.json, locales/fr/dashboard.json
|
|
89
89
|
* "flat" — one file per language, all keys merged:
|
|
90
|
-
*
|
|
90
|
+
* locales/en.json, locales/fr.json
|
|
91
91
|
*/
|
|
92
92
|
localeStructure: z.ZodDefault<z.ZodEnum<["nested", "flat"]>>;
|
|
93
|
+
/**
|
|
94
|
+
* Controls the format of generated locale keys for hardcoded text found
|
|
95
|
+
* during scanning.
|
|
96
|
+
*
|
|
97
|
+
* "path" (default) — hierarchical dot-notation derived from file path + text:
|
|
98
|
+
* src/pages/settings/SettingsPage.tsx + "Save Changes"
|
|
99
|
+
* → "settings.settings_page.save_changes"
|
|
100
|
+
*
|
|
101
|
+
* "screaming_snake" — UPPER_SNAKE_CASE derived solely from the text value.
|
|
102
|
+
* The key equals the value converted to UPPER_SNAKE_CASE:
|
|
103
|
+
* "Save Changes" → key: "SAVE_CHANGES", value: "Save Changes"
|
|
104
|
+
* "Max Count" → key: "MAX_COUNT", value: "Max Count"
|
|
105
|
+
* This matches the pattern used by staticKeys and is ideal for
|
|
106
|
+
* projects that use constant-style i18n keys.
|
|
107
|
+
*/
|
|
108
|
+
keyStyle: z.ZodDefault<z.ZodEnum<["path", "screaming_snake"]>>;
|
|
109
|
+
/**
|
|
110
|
+
* Static locale keys to inject into every generated locale file.
|
|
111
|
+
* These key/value pairs are merged with scanned keys and written to all
|
|
112
|
+
* languages (defaultLanguage + targetLanguages).
|
|
113
|
+
*
|
|
114
|
+
* Example:
|
|
115
|
+
* "staticKeys": {
|
|
116
|
+
* "MAX_COUNT": "Max Count",
|
|
117
|
+
* "ALLOWED": "Allowed",
|
|
118
|
+
* "DISABLED": "Disabled",
|
|
119
|
+
* "UNLIMITED": "Unlimited"
|
|
120
|
+
* }
|
|
121
|
+
*
|
|
122
|
+
* In nested mode these keys are placed in the default namespace file
|
|
123
|
+
* (translation.json / common.json). In flat mode they are merged at the
|
|
124
|
+
* top level of the single per-language file.
|
|
125
|
+
*/
|
|
126
|
+
staticKeys: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
93
127
|
}, "strip", z.ZodTypeAny, {
|
|
94
128
|
framework: "react" | "react-cra" | "react-vite" | "react-nextjs" | "angular" | "angular-ngx" | "angular-i18n" | "vue" | "vue-i18n" | "jquery" | "vanilla-js" | "jsp" | "unknown";
|
|
95
129
|
defaultLanguage: string;
|
|
@@ -101,6 +135,7 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
101
135
|
cacheDir: string;
|
|
102
136
|
plugins: string[];
|
|
103
137
|
localeStructure: "flat" | "nested";
|
|
138
|
+
keyStyle: "path" | "screaming_snake";
|
|
104
139
|
keyPrefix?: string | undefined;
|
|
105
140
|
namespaces?: string[] | undefined;
|
|
106
141
|
includePatterns?: string[] | undefined;
|
|
@@ -120,6 +155,7 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
120
155
|
namespace?: string | undefined;
|
|
121
156
|
accessorStyle?: "function" | "bracket" | undefined;
|
|
122
157
|
} | undefined;
|
|
158
|
+
staticKeys?: Record<string, string> | undefined;
|
|
123
159
|
}, {
|
|
124
160
|
framework?: "react" | "react-cra" | "react-vite" | "react-nextjs" | "angular" | "angular-ngx" | "angular-i18n" | "vue" | "vue-i18n" | "jquery" | "vanilla-js" | "jsp" | "unknown" | undefined;
|
|
125
161
|
defaultLanguage?: string | undefined;
|
|
@@ -150,6 +186,8 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
150
186
|
accessorStyle?: "function" | "bracket" | undefined;
|
|
151
187
|
} | undefined;
|
|
152
188
|
localeStructure?: "flat" | "nested" | undefined;
|
|
189
|
+
keyStyle?: "path" | "screaming_snake" | undefined;
|
|
190
|
+
staticKeys?: Record<string, string> | undefined;
|
|
153
191
|
}>;
|
|
154
192
|
type LocalizationConfigInput = z.input<typeof LocalizationConfigSchema>;
|
|
155
193
|
type LocalizationConfigOutput = z.output<typeof LocalizationConfigSchema>;
|
package/dist/index.d.ts
CHANGED
|
@@ -64,9 +64,9 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
64
64
|
*/
|
|
65
65
|
namespace: z.ZodOptional<z.ZodString>;
|
|
66
66
|
/**
|
|
67
|
-
|
|
67
|
+
* How the translation accessor is written in generated code.
|
|
68
68
|
* "function" (default) — t('key')
|
|
69
|
-
|
|
69
|
+
* "bracket" — t['key']
|
|
70
70
|
*/
|
|
71
71
|
accessorStyle: z.ZodOptional<z.ZodEnum<["function", "bracket"]>>;
|
|
72
72
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -87,9 +87,43 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
87
87
|
* "nested" (default) — one file per language + namespace:
|
|
88
88
|
* locales/en/common.json, locales/fr/dashboard.json
|
|
89
89
|
* "flat" — one file per language, all keys merged:
|
|
90
|
-
*
|
|
90
|
+
* locales/en.json, locales/fr.json
|
|
91
91
|
*/
|
|
92
92
|
localeStructure: z.ZodDefault<z.ZodEnum<["nested", "flat"]>>;
|
|
93
|
+
/**
|
|
94
|
+
* Controls the format of generated locale keys for hardcoded text found
|
|
95
|
+
* during scanning.
|
|
96
|
+
*
|
|
97
|
+
* "path" (default) — hierarchical dot-notation derived from file path + text:
|
|
98
|
+
* src/pages/settings/SettingsPage.tsx + "Save Changes"
|
|
99
|
+
* → "settings.settings_page.save_changes"
|
|
100
|
+
*
|
|
101
|
+
* "screaming_snake" — UPPER_SNAKE_CASE derived solely from the text value.
|
|
102
|
+
* The key equals the value converted to UPPER_SNAKE_CASE:
|
|
103
|
+
* "Save Changes" → key: "SAVE_CHANGES", value: "Save Changes"
|
|
104
|
+
* "Max Count" → key: "MAX_COUNT", value: "Max Count"
|
|
105
|
+
* This matches the pattern used by staticKeys and is ideal for
|
|
106
|
+
* projects that use constant-style i18n keys.
|
|
107
|
+
*/
|
|
108
|
+
keyStyle: z.ZodDefault<z.ZodEnum<["path", "screaming_snake"]>>;
|
|
109
|
+
/**
|
|
110
|
+
* Static locale keys to inject into every generated locale file.
|
|
111
|
+
* These key/value pairs are merged with scanned keys and written to all
|
|
112
|
+
* languages (defaultLanguage + targetLanguages).
|
|
113
|
+
*
|
|
114
|
+
* Example:
|
|
115
|
+
* "staticKeys": {
|
|
116
|
+
* "MAX_COUNT": "Max Count",
|
|
117
|
+
* "ALLOWED": "Allowed",
|
|
118
|
+
* "DISABLED": "Disabled",
|
|
119
|
+
* "UNLIMITED": "Unlimited"
|
|
120
|
+
* }
|
|
121
|
+
*
|
|
122
|
+
* In nested mode these keys are placed in the default namespace file
|
|
123
|
+
* (translation.json / common.json). In flat mode they are merged at the
|
|
124
|
+
* top level of the single per-language file.
|
|
125
|
+
*/
|
|
126
|
+
staticKeys: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
93
127
|
}, "strip", z.ZodTypeAny, {
|
|
94
128
|
framework: "react" | "react-cra" | "react-vite" | "react-nextjs" | "angular" | "angular-ngx" | "angular-i18n" | "vue" | "vue-i18n" | "jquery" | "vanilla-js" | "jsp" | "unknown";
|
|
95
129
|
defaultLanguage: string;
|
|
@@ -101,6 +135,7 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
101
135
|
cacheDir: string;
|
|
102
136
|
plugins: string[];
|
|
103
137
|
localeStructure: "flat" | "nested";
|
|
138
|
+
keyStyle: "path" | "screaming_snake";
|
|
104
139
|
keyPrefix?: string | undefined;
|
|
105
140
|
namespaces?: string[] | undefined;
|
|
106
141
|
includePatterns?: string[] | undefined;
|
|
@@ -120,6 +155,7 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
120
155
|
namespace?: string | undefined;
|
|
121
156
|
accessorStyle?: "function" | "bracket" | undefined;
|
|
122
157
|
} | undefined;
|
|
158
|
+
staticKeys?: Record<string, string> | undefined;
|
|
123
159
|
}, {
|
|
124
160
|
framework?: "react" | "react-cra" | "react-vite" | "react-nextjs" | "angular" | "angular-ngx" | "angular-i18n" | "vue" | "vue-i18n" | "jquery" | "vanilla-js" | "jsp" | "unknown" | undefined;
|
|
125
161
|
defaultLanguage?: string | undefined;
|
|
@@ -150,6 +186,8 @@ declare const LocalizationConfigSchema: z.ZodObject<{
|
|
|
150
186
|
accessorStyle?: "function" | "bracket" | undefined;
|
|
151
187
|
} | undefined;
|
|
152
188
|
localeStructure?: "flat" | "nested" | undefined;
|
|
189
|
+
keyStyle?: "path" | "screaming_snake" | undefined;
|
|
190
|
+
staticKeys?: Record<string, string> | undefined;
|
|
153
191
|
}>;
|
|
154
192
|
type LocalizationConfigInput = z.input<typeof LocalizationConfigSchema>;
|
|
155
193
|
type LocalizationConfigOutput = z.output<typeof LocalizationConfigSchema>;
|
package/dist/index.js
CHANGED
|
@@ -87,10 +87,10 @@ var CodemodConfigSchema = import_zod.z.object({
|
|
|
87
87
|
*/
|
|
88
88
|
namespace: import_zod.z.string().optional(),
|
|
89
89
|
/**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
* How the translation accessor is written in generated code.
|
|
91
|
+
* "function" (default) — t('key')
|
|
92
|
+
* "bracket" — t['key']
|
|
93
|
+
*/
|
|
94
94
|
accessorStyle: import_zod.z.enum(["function", "bracket"]).optional()
|
|
95
95
|
});
|
|
96
96
|
var LocalizationConfigSchema = import_zod.z.object({
|
|
@@ -114,9 +114,43 @@ var LocalizationConfigSchema = import_zod.z.object({
|
|
|
114
114
|
* "nested" (default) — one file per language + namespace:
|
|
115
115
|
* locales/en/common.json, locales/fr/dashboard.json
|
|
116
116
|
* "flat" — one file per language, all keys merged:
|
|
117
|
-
*
|
|
117
|
+
* locales/en.json, locales/fr.json
|
|
118
118
|
*/
|
|
119
|
-
localeStructure: import_zod.z.enum(["nested", "flat"]).default("nested")
|
|
119
|
+
localeStructure: import_zod.z.enum(["nested", "flat"]).default("nested"),
|
|
120
|
+
/**
|
|
121
|
+
* Controls the format of generated locale keys for hardcoded text found
|
|
122
|
+
* during scanning.
|
|
123
|
+
*
|
|
124
|
+
* "path" (default) — hierarchical dot-notation derived from file path + text:
|
|
125
|
+
* src/pages/settings/SettingsPage.tsx + "Save Changes"
|
|
126
|
+
* → "settings.settings_page.save_changes"
|
|
127
|
+
*
|
|
128
|
+
* "screaming_snake" — UPPER_SNAKE_CASE derived solely from the text value.
|
|
129
|
+
* The key equals the value converted to UPPER_SNAKE_CASE:
|
|
130
|
+
* "Save Changes" → key: "SAVE_CHANGES", value: "Save Changes"
|
|
131
|
+
* "Max Count" → key: "MAX_COUNT", value: "Max Count"
|
|
132
|
+
* This matches the pattern used by staticKeys and is ideal for
|
|
133
|
+
* projects that use constant-style i18n keys.
|
|
134
|
+
*/
|
|
135
|
+
keyStyle: import_zod.z.enum(["path", "screaming_snake"]).default("path"),
|
|
136
|
+
/**
|
|
137
|
+
* Static locale keys to inject into every generated locale file.
|
|
138
|
+
* These key/value pairs are merged with scanned keys and written to all
|
|
139
|
+
* languages (defaultLanguage + targetLanguages).
|
|
140
|
+
*
|
|
141
|
+
* Example:
|
|
142
|
+
* "staticKeys": {
|
|
143
|
+
* "MAX_COUNT": "Max Count",
|
|
144
|
+
* "ALLOWED": "Allowed",
|
|
145
|
+
* "DISABLED": "Disabled",
|
|
146
|
+
* "UNLIMITED": "Unlimited"
|
|
147
|
+
* }
|
|
148
|
+
*
|
|
149
|
+
* In nested mode these keys are placed in the default namespace file
|
|
150
|
+
* (translation.json / common.json). In flat mode they are merged at the
|
|
151
|
+
* top level of the single per-language file.
|
|
152
|
+
*/
|
|
153
|
+
staticKeys: import_zod.z.record(import_zod.z.string(), import_zod.z.string()).optional()
|
|
120
154
|
});
|
|
121
155
|
|
|
122
156
|
// src/loader.ts
|
|
@@ -180,7 +214,7 @@ function writeDefaultConfig(cwd = process.cwd(), framework = "unknown") {
|
|
|
180
214
|
// ── Framework ────────────────────────────────────────────────────────────
|
|
181
215
|
// Detected automatically by ai-localize init.
|
|
182
216
|
// Values: "react" | "react-cra" | "react-vite" | "react-nextjs"
|
|
183
|
-
//
|
|
217
|
+
// | "angular" | "angular-ngx" | "angular-i18n"
|
|
184
218
|
// | "vue" | "vue-i18n" | "jquery" | "vanilla-js" | "jsp" | "unknown"
|
|
185
219
|
framework,
|
|
186
220
|
// ── Languages ────────────────────────────────────────────────────────────
|
|
@@ -201,6 +235,20 @@ function writeDefaultConfig(cwd = process.cwd(), framework = "unknown") {
|
|
|
201
235
|
// "flat": one file per language, all keys merged
|
|
202
236
|
// locales/en.json (non-default namespace keys are prefixed: "dashboard.header.title")
|
|
203
237
|
localeStructure: "nested",
|
|
238
|
+
// ── Key style ────────────────────────────────────────────────────────────
|
|
239
|
+
// Controls the format of locale keys generated for scanned hardcoded text.
|
|
240
|
+
//
|
|
241
|
+
// "path" (default) — hierarchical dot-notation derived from file path + text:
|
|
242
|
+
// src/pages/settings/SettingsPage.tsx + "Save Changes"
|
|
243
|
+
// → "settings.settings_page.save_changes"
|
|
244
|
+
//
|
|
245
|
+
// "screaming_snake" — UPPER_SNAKE_CASE derived solely from the text value.
|
|
246
|
+
// The key equals the value converted to UPPER_SNAKE_CASE:
|
|
247
|
+
// "Save Changes" → key: "SAVE_CHANGES", value: "Save Changes"
|
|
248
|
+
// "Max Count" → key: "MAX_COUNT", value: "Max Count"
|
|
249
|
+
// This mirrors the staticKeys pattern and is ideal for projects that
|
|
250
|
+
// prefer constant-style i18n keys.
|
|
251
|
+
keyStyle: "path",
|
|
204
252
|
// ── Scan filtering ───────────────────────────────────────────────────────
|
|
205
253
|
// Directories/patterns to skip during scanning.
|
|
206
254
|
ignorePatterns: ["node_modules", "dist", ".git", "coverage"],
|
|
@@ -215,6 +263,22 @@ function writeDefaultConfig(cwd = process.cwd(), framework = "unknown") {
|
|
|
215
263
|
// Optional explicit list of namespace names.
|
|
216
264
|
// If omitted, namespace is derived from the first path segment after sourceDir.
|
|
217
265
|
namespaces: [],
|
|
266
|
+
// ── Static keys ──────────────────────────────────────────────────────────
|
|
267
|
+
// Key/value pairs to inject into every generated locale file regardless of
|
|
268
|
+
// what the scanner finds. Useful for enum labels, status codes, and other
|
|
269
|
+
// constant strings that are not hardcoded in source files.
|
|
270
|
+
//
|
|
271
|
+
// In nested mode these keys land in the default namespace file
|
|
272
|
+
// (translation.json). In flat mode they are merged at the top level.
|
|
273
|
+
//
|
|
274
|
+
// Example:
|
|
275
|
+
// "staticKeys": {
|
|
276
|
+
// "MAX_COUNT": "Max Count",
|
|
277
|
+
// "ALLOWED": "Allowed",
|
|
278
|
+
// "DISABLED": "Disabled",
|
|
279
|
+
// "UNLIMITED": "Unlimited"
|
|
280
|
+
// }
|
|
281
|
+
staticKeys: {},
|
|
218
282
|
// ── Incremental scanning ─────────────────────────────────────────────────
|
|
219
283
|
// Cache file hashes between runs — only re-scan changed files.
|
|
220
284
|
incrementalCache: true,
|
|
@@ -238,7 +302,7 @@ function writeDefaultConfig(cwd = process.cwd(), framework = "unknown") {
|
|
|
238
302
|
//
|
|
239
303
|
// accessorStyle:
|
|
240
304
|
// "function" (default) → t('key')
|
|
241
|
-
// "bracket"
|
|
305
|
+
// "bracket" → t['key']
|
|
242
306
|
codemods: {
|
|
243
307
|
importPackage: "react-i18next",
|
|
244
308
|
hookName: "useTranslation",
|
package/dist/index.mjs
CHANGED
|
@@ -48,10 +48,10 @@ var CodemodConfigSchema = z.object({
|
|
|
48
48
|
*/
|
|
49
49
|
namespace: z.string().optional(),
|
|
50
50
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
* How the translation accessor is written in generated code.
|
|
52
|
+
* "function" (default) — t('key')
|
|
53
|
+
* "bracket" — t['key']
|
|
54
|
+
*/
|
|
55
55
|
accessorStyle: z.enum(["function", "bracket"]).optional()
|
|
56
56
|
});
|
|
57
57
|
var LocalizationConfigSchema = z.object({
|
|
@@ -75,9 +75,43 @@ var LocalizationConfigSchema = z.object({
|
|
|
75
75
|
* "nested" (default) — one file per language + namespace:
|
|
76
76
|
* locales/en/common.json, locales/fr/dashboard.json
|
|
77
77
|
* "flat" — one file per language, all keys merged:
|
|
78
|
-
*
|
|
78
|
+
* locales/en.json, locales/fr.json
|
|
79
79
|
*/
|
|
80
|
-
localeStructure: z.enum(["nested", "flat"]).default("nested")
|
|
80
|
+
localeStructure: z.enum(["nested", "flat"]).default("nested"),
|
|
81
|
+
/**
|
|
82
|
+
* Controls the format of generated locale keys for hardcoded text found
|
|
83
|
+
* during scanning.
|
|
84
|
+
*
|
|
85
|
+
* "path" (default) — hierarchical dot-notation derived from file path + text:
|
|
86
|
+
* src/pages/settings/SettingsPage.tsx + "Save Changes"
|
|
87
|
+
* → "settings.settings_page.save_changes"
|
|
88
|
+
*
|
|
89
|
+
* "screaming_snake" — UPPER_SNAKE_CASE derived solely from the text value.
|
|
90
|
+
* The key equals the value converted to UPPER_SNAKE_CASE:
|
|
91
|
+
* "Save Changes" → key: "SAVE_CHANGES", value: "Save Changes"
|
|
92
|
+
* "Max Count" → key: "MAX_COUNT", value: "Max Count"
|
|
93
|
+
* This matches the pattern used by staticKeys and is ideal for
|
|
94
|
+
* projects that use constant-style i18n keys.
|
|
95
|
+
*/
|
|
96
|
+
keyStyle: z.enum(["path", "screaming_snake"]).default("path"),
|
|
97
|
+
/**
|
|
98
|
+
* Static locale keys to inject into every generated locale file.
|
|
99
|
+
* These key/value pairs are merged with scanned keys and written to all
|
|
100
|
+
* languages (defaultLanguage + targetLanguages).
|
|
101
|
+
*
|
|
102
|
+
* Example:
|
|
103
|
+
* "staticKeys": {
|
|
104
|
+
* "MAX_COUNT": "Max Count",
|
|
105
|
+
* "ALLOWED": "Allowed",
|
|
106
|
+
* "DISABLED": "Disabled",
|
|
107
|
+
* "UNLIMITED": "Unlimited"
|
|
108
|
+
* }
|
|
109
|
+
*
|
|
110
|
+
* In nested mode these keys are placed in the default namespace file
|
|
111
|
+
* (translation.json / common.json). In flat mode they are merged at the
|
|
112
|
+
* top level of the single per-language file.
|
|
113
|
+
*/
|
|
114
|
+
staticKeys: z.record(z.string(), z.string()).optional()
|
|
81
115
|
});
|
|
82
116
|
|
|
83
117
|
// src/loader.ts
|
|
@@ -141,7 +175,7 @@ function writeDefaultConfig(cwd = process.cwd(), framework = "unknown") {
|
|
|
141
175
|
// ── Framework ────────────────────────────────────────────────────────────
|
|
142
176
|
// Detected automatically by ai-localize init.
|
|
143
177
|
// Values: "react" | "react-cra" | "react-vite" | "react-nextjs"
|
|
144
|
-
//
|
|
178
|
+
// | "angular" | "angular-ngx" | "angular-i18n"
|
|
145
179
|
// | "vue" | "vue-i18n" | "jquery" | "vanilla-js" | "jsp" | "unknown"
|
|
146
180
|
framework,
|
|
147
181
|
// ── Languages ────────────────────────────────────────────────────────────
|
|
@@ -162,6 +196,20 @@ function writeDefaultConfig(cwd = process.cwd(), framework = "unknown") {
|
|
|
162
196
|
// "flat": one file per language, all keys merged
|
|
163
197
|
// locales/en.json (non-default namespace keys are prefixed: "dashboard.header.title")
|
|
164
198
|
localeStructure: "nested",
|
|
199
|
+
// ── Key style ────────────────────────────────────────────────────────────
|
|
200
|
+
// Controls the format of locale keys generated for scanned hardcoded text.
|
|
201
|
+
//
|
|
202
|
+
// "path" (default) — hierarchical dot-notation derived from file path + text:
|
|
203
|
+
// src/pages/settings/SettingsPage.tsx + "Save Changes"
|
|
204
|
+
// → "settings.settings_page.save_changes"
|
|
205
|
+
//
|
|
206
|
+
// "screaming_snake" — UPPER_SNAKE_CASE derived solely from the text value.
|
|
207
|
+
// The key equals the value converted to UPPER_SNAKE_CASE:
|
|
208
|
+
// "Save Changes" → key: "SAVE_CHANGES", value: "Save Changes"
|
|
209
|
+
// "Max Count" → key: "MAX_COUNT", value: "Max Count"
|
|
210
|
+
// This mirrors the staticKeys pattern and is ideal for projects that
|
|
211
|
+
// prefer constant-style i18n keys.
|
|
212
|
+
keyStyle: "path",
|
|
165
213
|
// ── Scan filtering ───────────────────────────────────────────────────────
|
|
166
214
|
// Directories/patterns to skip during scanning.
|
|
167
215
|
ignorePatterns: ["node_modules", "dist", ".git", "coverage"],
|
|
@@ -176,6 +224,22 @@ function writeDefaultConfig(cwd = process.cwd(), framework = "unknown") {
|
|
|
176
224
|
// Optional explicit list of namespace names.
|
|
177
225
|
// If omitted, namespace is derived from the first path segment after sourceDir.
|
|
178
226
|
namespaces: [],
|
|
227
|
+
// ── Static keys ──────────────────────────────────────────────────────────
|
|
228
|
+
// Key/value pairs to inject into every generated locale file regardless of
|
|
229
|
+
// what the scanner finds. Useful for enum labels, status codes, and other
|
|
230
|
+
// constant strings that are not hardcoded in source files.
|
|
231
|
+
//
|
|
232
|
+
// In nested mode these keys land in the default namespace file
|
|
233
|
+
// (translation.json). In flat mode they are merged at the top level.
|
|
234
|
+
//
|
|
235
|
+
// Example:
|
|
236
|
+
// "staticKeys": {
|
|
237
|
+
// "MAX_COUNT": "Max Count",
|
|
238
|
+
// "ALLOWED": "Allowed",
|
|
239
|
+
// "DISABLED": "Disabled",
|
|
240
|
+
// "UNLIMITED": "Unlimited"
|
|
241
|
+
// }
|
|
242
|
+
staticKeys: {},
|
|
179
243
|
// ── Incremental scanning ─────────────────────────────────────────────────
|
|
180
244
|
// Cache file hashes between runs — only re-scan changed files.
|
|
181
245
|
incrementalCache: true,
|
|
@@ -199,7 +263,7 @@ function writeDefaultConfig(cwd = process.cwd(), framework = "unknown") {
|
|
|
199
263
|
//
|
|
200
264
|
// accessorStyle:
|
|
201
265
|
// "function" (default) → t('key')
|
|
202
|
-
// "bracket"
|
|
266
|
+
// "bracket" → t['key']
|
|
203
267
|
codemods: {
|
|
204
268
|
importPackage: "react-i18next",
|
|
205
269
|
hookName: "useTranslation",
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-localize-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Configuration loader and schema validator for ai-localize-core",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md"
|
|
12
|
+
],
|
|
8
13
|
"exports": {
|
|
9
14
|
".": {
|
|
10
15
|
"types": "./dist/index.d.ts",
|
|
@@ -12,11 +17,25 @@
|
|
|
12
17
|
"require": "./dist/index.js"
|
|
13
18
|
}
|
|
14
19
|
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"i18n",
|
|
22
|
+
"localization",
|
|
23
|
+
"l10n",
|
|
24
|
+
"internationalization",
|
|
25
|
+
"ai-localize",
|
|
26
|
+
"config",
|
|
27
|
+
"configuration",
|
|
28
|
+
"zod",
|
|
29
|
+
"cosmiconfig"
|
|
30
|
+
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18.0.0"
|
|
33
|
+
},
|
|
15
34
|
"dependencies": {
|
|
16
35
|
"zod": "^3.22.4",
|
|
17
36
|
"cosmiconfig": "^9.0.0",
|
|
18
37
|
"dotenv": "^16.4.1",
|
|
19
|
-
"ai-localize-shared": "2.0.
|
|
38
|
+
"ai-localize-shared": "2.0.4"
|
|
20
39
|
},
|
|
21
40
|
"devDependencies": {
|
|
22
41
|
"tsup": "^8.0.1",
|
package/src/index.ts
DELETED
package/src/loader.ts
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import * as fs from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import { cosmiconfig } from 'cosmiconfig';
|
|
4
|
-
import * as dotenv from 'dotenv';
|
|
5
|
-
|
|
6
|
-
import type { LocalizationConfig } from 'ai-localize-shared';
|
|
7
|
-
import { CONFIG_FILE_NAME } from 'ai-localize-shared';
|
|
8
|
-
import { LocalizationConfigSchema } from './schema.js';
|
|
9
|
-
|
|
10
|
-
export interface ConfigLoadResult {
|
|
11
|
-
config: LocalizationConfig;
|
|
12
|
-
filePath: string | null;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Loads and validates the ai-localize configuration.
|
|
17
|
-
* Searches for config in standard locations using cosmiconfig.
|
|
18
|
-
*/
|
|
19
|
-
export async function loadConfig(
|
|
20
|
-
cwd = process.cwd(),
|
|
21
|
-
overrides: Partial<LocalizationConfig> = {}
|
|
22
|
-
): Promise<ConfigLoadResult> {
|
|
23
|
-
// Load .env files for AWS credentials etc.
|
|
24
|
-
dotenv.config({ path: path.join(cwd, '.env') });
|
|
25
|
-
dotenv.config({ path: path.join(cwd, '.env.local') });
|
|
26
|
-
|
|
27
|
-
const explorer = cosmiconfig('ai-localize', {
|
|
28
|
-
searchPlaces: [
|
|
29
|
-
CONFIG_FILE_NAME,
|
|
30
|
-
'ai-localize.config.js',
|
|
31
|
-
'ai-localize.config.ts',
|
|
32
|
-
'.ai-localizerc',
|
|
33
|
-
'.ai-localizerc.json',
|
|
34
|
-
'.ai-localizerc.js',
|
|
35
|
-
'package.json',
|
|
36
|
-
],
|
|
37
|
-
packageProp: 'aiLocalize',
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
let rawConfig: Record<string, unknown> = {};
|
|
41
|
-
let filePath: string | null = null;
|
|
42
|
-
|
|
43
|
-
try {
|
|
44
|
-
const result = await explorer.search(cwd);
|
|
45
|
-
if (result) {
|
|
46
|
-
rawConfig = result.config as Record<string, unknown>;
|
|
47
|
-
filePath = result.filepath;
|
|
48
|
-
}
|
|
49
|
-
} catch (err) {
|
|
50
|
-
// Config not found — use defaults
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Merge env vars for AWS
|
|
54
|
-
const awsFromEnv = extractAwsFromEnv();
|
|
55
|
-
if (awsFromEnv && !rawConfig.aws) {
|
|
56
|
-
rawConfig.aws = awsFromEnv;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const merged = { ...rawConfig, ...overrides };
|
|
60
|
-
const validated = LocalizationConfigSchema.parse(merged);
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
config: validated as LocalizationConfig,
|
|
64
|
-
filePath,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/** Extract AWS configuration from environment variables */
|
|
69
|
-
function extractAwsFromEnv(): Record<string, string> | null {
|
|
70
|
-
const bucket = process.env.AI_LOCALIZE_S3_BUCKET || process.env.AWS_S3_BUCKET;
|
|
71
|
-
const distributionId =
|
|
72
|
-
process.env.AI_LOCALIZE_CF_DISTRIBUTION_ID || process.env.AWS_CF_DISTRIBUTION_ID;
|
|
73
|
-
|
|
74
|
-
if (!bucket || !distributionId) return null;
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
bucket,
|
|
78
|
-
distributionId,
|
|
79
|
-
region: process.env.AWS_REGION || process.env.AI_LOCALIZE_AWS_REGION || 'us-east-1',
|
|
80
|
-
cdnBaseUrl: process.env.AI_LOCALIZE_CDN_BASE_URL || '',
|
|
81
|
-
legacyCdnPattern: process.env.AI_LOCALIZE_LEGACY_CDN_PATTERN || '',
|
|
82
|
-
profile: process.env.AWS_PROFILE || '',
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Writes a fully-populated default config file to the project root.
|
|
88
|
-
*
|
|
89
|
-
* Every supported configuration field is included so users can see all
|
|
90
|
-
* available options and edit them directly. Fields that are optional/unused
|
|
91
|
-
* are set to their default values or left as empty strings / empty arrays.
|
|
92
|
-
*/
|
|
93
|
-
export function writeDefaultConfig(cwd = process.cwd(), framework = 'unknown'): string {
|
|
94
|
-
const configPath = path.join(cwd, CONFIG_FILE_NAME);
|
|
95
|
-
|
|
96
|
-
const defaultConfig = {
|
|
97
|
-
// ── Framework ────────────────────────────────────────────────────────────
|
|
98
|
-
// Detected automatically by ai-localize init.
|
|
99
|
-
// Values: "react" | "react-cra" | "react-vite" | "react-nextjs"
|
|
100
|
-
// | "angular" | "angular-ngx" | "angular-i18n"
|
|
101
|
-
// | "vue" | "vue-i18n" | "jquery" | "vanilla-js" | "jsp" | "unknown"
|
|
102
|
-
framework,
|
|
103
|
-
|
|
104
|
-
// ── Languages ────────────────────────────────────────────────────────────
|
|
105
|
-
// Source language — used as reference for missing-translation detection.
|
|
106
|
-
defaultLanguage: 'en',
|
|
107
|
-
|
|
108
|
-
// Additional languages to generate locale files for.
|
|
109
|
-
// All target files are seeded with the source value (no blank entries).
|
|
110
|
-
targetLanguages: ['fr', 'de'],
|
|
111
|
-
|
|
112
|
-
// ── Directories ──────────────────────────────────────────────────────────
|
|
113
|
-
// Root of your source code — scanning starts here.
|
|
114
|
-
// Keys are generated relative to this directory.
|
|
115
|
-
sourceDir: 'src',
|
|
116
|
-
|
|
117
|
-
// Where locale JSON files are written.
|
|
118
|
-
localesDir: 'locales',
|
|
119
|
-
|
|
120
|
-
// ── Locale file layout ───────────────────────────────────────────────────
|
|
121
|
-
// "nested" (default): one file per language + namespace
|
|
122
|
-
// locales/en/common.json, locales/en/dashboard.json
|
|
123
|
-
// "flat": one file per language, all keys merged
|
|
124
|
-
// locales/en.json (non-default namespace keys are prefixed: "dashboard.header.title")
|
|
125
|
-
localeStructure: 'nested',
|
|
126
|
-
|
|
127
|
-
// ── Scan filtering ───────────────────────────────────────────────────────
|
|
128
|
-
// Directories/patterns to skip during scanning.
|
|
129
|
-
ignorePatterns: ['node_modules', 'dist', '.git', 'coverage'],
|
|
130
|
-
|
|
131
|
-
// Optional: only scan files matching these glob patterns.
|
|
132
|
-
// If empty/omitted, all files under sourceDir are scanned.
|
|
133
|
-
// Example: ["src/components/**/*.tsx", "src/pages/**/*.tsx"]
|
|
134
|
-
includePatterns: [],
|
|
135
|
-
|
|
136
|
-
// ── Key generation ───────────────────────────────────────────────────────
|
|
137
|
-
// Optional prefix prepended to every generated key.
|
|
138
|
-
// Example: "myapp" → "myapp.components.button.save"
|
|
139
|
-
keyPrefix: '',
|
|
140
|
-
|
|
141
|
-
// Optional explicit list of namespace names.
|
|
142
|
-
// If omitted, namespace is derived from the first path segment after sourceDir.
|
|
143
|
-
namespaces: [],
|
|
144
|
-
|
|
145
|
-
// ── Incremental scanning ─────────────────────────────────────────────────
|
|
146
|
-
// Cache file hashes between runs — only re-scan changed files.
|
|
147
|
-
incrementalCache: true,
|
|
148
|
-
cacheDir: '.ai-localize-cache',
|
|
149
|
-
|
|
150
|
-
// ── Codemod behaviour ────────────────────────────────────────────────────
|
|
151
|
-
// Controls what the codemod injects when wrapping hardcoded strings.
|
|
152
|
-
//
|
|
153
|
-
// importPackage: npm package name OR project-relative path to the hook file.
|
|
154
|
-
// npm package: "react-i18next"
|
|
155
|
-
// local hook path: "src/hooks/useTranslation" (path relative to project root)
|
|
156
|
-
// The codemod computes the correct relative import path per file automatically.
|
|
157
|
-
//
|
|
158
|
-
// hookName: the hook function to import and call.
|
|
159
|
-
// Default: "useTranslation"
|
|
160
|
-
//
|
|
161
|
-
// translationFunction: the accessor destructured from the hook.
|
|
162
|
-
// Default: "t"
|
|
163
|
-
//
|
|
164
|
-
// namespace: passed as argument to the hook, e.g. useTranslation("common").
|
|
165
|
-
// Leave empty to omit the argument.
|
|
166
|
-
//
|
|
167
|
-
// accessorStyle:
|
|
168
|
-
// "function" (default) → t('key')
|
|
169
|
-
// "bracket" → t['key']
|
|
170
|
-
codemods: {
|
|
171
|
-
importPackage: 'react-i18next',
|
|
172
|
-
hookName: 'useTranslation',
|
|
173
|
-
translationFunction: 't',
|
|
174
|
-
namespace: '',
|
|
175
|
-
accessorStyle: 'function',
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
// ── AWS / CloudFront (optional) ──────────────────────────────────────────
|
|
179
|
-
// Required only for CDN migration commands (migrate-cdn, upload-assets, replace-cdn).
|
|
180
|
-
// Leave all fields empty if not using CDN migration.
|
|
181
|
-
// Credentials can also be supplied via environment variables (see docs).
|
|
182
|
-
aws: {
|
|
183
|
-
region: 'us-east-1',
|
|
184
|
-
bucket: '',
|
|
185
|
-
distributionId: '',
|
|
186
|
-
cdnBaseUrl: '',
|
|
187
|
-
legacyCdnPattern: '',
|
|
188
|
-
assetsPrefix: 'assets',
|
|
189
|
-
profile: '',
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
// ── Plugins ──────────────────────────────────────────────────────────────
|
|
193
|
-
// Paths to custom plugin modules. See docs/PLUGIN_SYSTEM.md for details.
|
|
194
|
-
plugins: [],
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
fs.writeFileSync(configPath, JSON.stringify(defaultConfig, null, 2) + '\n', 'utf-8');
|
|
198
|
-
return configPath;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/** Validate an existing config file */
|
|
202
|
-
export function validateConfig(configPath: string): {
|
|
203
|
-
valid: boolean;
|
|
204
|
-
errors: string[];
|
|
205
|
-
} {
|
|
206
|
-
try {
|
|
207
|
-
const raw = fs.readFileSync(configPath, 'utf-8');
|
|
208
|
-
const parsed = JSON.parse(raw);
|
|
209
|
-
LocalizationConfigSchema.parse(parsed);
|
|
210
|
-
return { valid: true, errors: [] };
|
|
211
|
-
} catch (err: unknown) {
|
|
212
|
-
if (err && typeof err === 'object' && 'errors' in err) {
|
|
213
|
-
const zodError = err as { errors: Array<{ path: unknown[]; message: string }> };
|
|
214
|
-
return {
|
|
215
|
-
valid: false,
|
|
216
|
-
errors: zodError.errors.map((e) => `${e.path.join('.')}: ${e.message}`),
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
return {
|
|
220
|
-
valid: false,
|
|
221
|
-
errors: [err instanceof Error ? err.message : String(err)],
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
}
|
package/src/schema.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
const AwsConfigSchema = z.object({
|
|
4
|
-
region: z.string().default('us-east-1'),
|
|
5
|
-
bucket: z.string().min(1, 'S3 bucket name is required'),
|
|
6
|
-
distributionId: z.string().min(1, 'CloudFront distribution ID is required'),
|
|
7
|
-
cdnBaseUrl: z.string().url().optional(),
|
|
8
|
-
legacyCdnPattern: z.string().optional(),
|
|
9
|
-
assetsPrefix: z.string().default('assets'),
|
|
10
|
-
profile: z.string().optional(),
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const FrameworkSchema = z.enum([
|
|
14
|
-
'react',
|
|
15
|
-
'react-cra',
|
|
16
|
-
'react-vite',
|
|
17
|
-
'react-nextjs',
|
|
18
|
-
'angular',
|
|
19
|
-
'angular-ngx',
|
|
20
|
-
'angular-i18n',
|
|
21
|
-
'vue',
|
|
22
|
-
'vue-i18n',
|
|
23
|
-
'jquery',
|
|
24
|
-
'vanilla-js',
|
|
25
|
-
'jsp',
|
|
26
|
-
'unknown',
|
|
27
|
-
]);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Optional codemod behaviour overrides.
|
|
31
|
-
* Controls which i18n library / hook / pipe the codemod injects.
|
|
32
|
-
*/
|
|
33
|
-
const CodemodConfigSchema = z.object({
|
|
34
|
-
/**
|
|
35
|
-
* The npm package to import from.
|
|
36
|
-
* React default: "react-i18next"
|
|
37
|
-
* Vue default: "vue-i18n"
|
|
38
|
-
* Angular default: "@ngx-translate/core"
|
|
39
|
-
*/
|
|
40
|
-
importPackage: z.string().optional(),
|
|
41
|
-
/**
|
|
42
|
-
* The hook / function name to import and call.
|
|
43
|
-
* React default: "useTranslation"
|
|
44
|
-
* Vue default: "useI18n"
|
|
45
|
-
*/
|
|
46
|
-
hookName: z.string().optional(),
|
|
47
|
-
/**
|
|
48
|
-
* The translation function identifier returned by the hook (default: "t").
|
|
49
|
-
*/
|
|
50
|
-
translationFunction: z.string().optional(),
|
|
51
|
-
/**
|
|
52
|
-
* Namespace to pass as the first argument to the hook call.
|
|
53
|
-
* When omitted no namespace argument is injected.
|
|
54
|
-
*/
|
|
55
|
-
namespace: z.string().optional(),
|
|
56
|
-
/**
|
|
57
|
-
* How the translation accessor is written in generated code.
|
|
58
|
-
* "function" (default) — t('key')
|
|
59
|
-
* "bracket" — t['key']
|
|
60
|
-
*/
|
|
61
|
-
accessorStyle: z.enum(['function', 'bracket']).optional(),
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export const LocalizationConfigSchema = z.object({
|
|
65
|
-
framework: FrameworkSchema.default('unknown'),
|
|
66
|
-
defaultLanguage: z.string().default('en'),
|
|
67
|
-
targetLanguages: z.array(z.string()).default([]),
|
|
68
|
-
sourceDir: z.string().default('src'),
|
|
69
|
-
localesDir: z.string().default('locales'),
|
|
70
|
-
keyPrefix: z.string().optional(),
|
|
71
|
-
namespaces: z.array(z.string()).optional(),
|
|
72
|
-
ignorePatterns: z
|
|
73
|
-
.array(z.string())
|
|
74
|
-
.default(['node_modules', 'dist', '.git', 'coverage']),
|
|
75
|
-
includePatterns: z.array(z.string()).optional(),
|
|
76
|
-
incrementalCache: z.boolean().default(true),
|
|
77
|
-
cacheDir: z.string().default('.ai-localize-cache'),
|
|
78
|
-
aws: AwsConfigSchema.optional().nullable(),
|
|
79
|
-
plugins: z.array(z.string()).default([]),
|
|
80
|
-
/** Codemod behaviour overrides — all fields are optional. */
|
|
81
|
-
codemods: CodemodConfigSchema.optional(),
|
|
82
|
-
/**
|
|
83
|
-
* Locale file layout.
|
|
84
|
-
* "nested" (default) — one file per language + namespace:
|
|
85
|
-
* locales/en/common.json, locales/fr/dashboard.json
|
|
86
|
-
* "flat" — one file per language, all keys merged:
|
|
87
|
-
* locales/en.json, locales/fr.json
|
|
88
|
-
*/
|
|
89
|
-
localeStructure: z.enum(['nested', 'flat']).default('nested'),
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
export type LocalizationConfigInput = z.input<typeof LocalizationConfigSchema>;
|
|
93
|
-
export type LocalizationConfigOutput = z.output<typeof LocalizationConfigSchema>;
|