@intlayer/docs 8.2.4 → 8.3.0-canary.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/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/blog.cjs.map +1 -1
- package/dist/cjs/common.cjs +1 -1
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/doc.cjs.map +1 -1
- package/dist/cjs/frequentQuestions.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +1 -1
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +1 -1
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +1 -1
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/cjs/legal.cjs.map +1 -1
- package/dist/esm/blog.mjs.map +1 -1
- package/dist/esm/common.mjs +1 -1
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/doc.mjs.map +1 -1
- package/dist/esm/frequentQuestions.mjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/esm/legal.mjs.map +1 -1
- package/dist/types/blog.d.ts +1 -1
- package/dist/types/common.d.ts +1 -1
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/doc.d.ts +1 -1
- package/dist/types/frequentQuestions.d.ts +1 -1
- package/dist/types/generated/blog.entry.d.ts +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts +1 -1
- package/dist/types/generated/legal.entry.d.ts +1 -1
- package/dist/types/legal.d.ts +1 -1
- package/docs/ar/compiler.md +73 -8
- package/docs/ar/configuration.md +53 -17
- package/docs/ar/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/ar/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/de/compiler.md +74 -9
- package/docs/de/configuration.md +49 -13
- package/docs/de/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/de/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/en/compiler.md +79 -1
- package/docs/en/configuration.md +39 -1
- package/docs/en/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/en/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/en-GB/compiler.md +72 -6
- package/docs/en-GB/configuration.md +39 -2
- package/docs/en-GB/intlayer_with_nextjs_compiler.md +22 -3
- package/docs/en-GB/intlayer_with_vite+react_compiler.md +22 -3
- package/docs/es/compiler.md +71 -6
- package/docs/es/configuration.md +52 -16
- package/docs/es/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/es/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/fr/compiler.md +69 -4
- package/docs/fr/configuration.md +50 -14
- package/docs/fr/intlayer_with_nextjs_compiler.md +9 -1
- package/docs/fr/intlayer_with_vite+react_compiler.md +9 -1
- package/docs/hi/compiler.md +74 -9
- package/docs/hi/configuration.md +49 -13
- package/docs/hi/intlayer_with_nextjs_compiler.md +15 -7
- package/docs/hi/intlayer_with_vite+react_compiler.md +15 -7
- package/docs/id/compiler.md +73 -8
- package/docs/id/configuration.md +46 -10
- package/docs/id/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/id/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/it/compiler.md +73 -8
- package/docs/it/configuration.md +54 -18
- package/docs/it/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/it/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/ja/compiler.md +75 -10
- package/docs/ja/configuration.md +50 -14
- package/docs/ja/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/ja/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/ko/compiler.md +75 -10
- package/docs/ko/configuration.md +50 -14
- package/docs/ko/intlayer_with_nextjs_compiler.md +22 -3
- package/docs/ko/intlayer_with_vite+react_compiler.md +22 -3
- package/docs/pl/compiler.md +73 -8
- package/docs/pl/configuration.md +47 -11
- package/docs/pl/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/pl/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/pt/compiler.md +74 -9
- package/docs/pt/configuration.md +50 -14
- package/docs/pt/intlayer_with_nextjs_compiler.md +12 -4
- package/docs/pt/intlayer_with_vite+react_compiler.md +12 -4
- package/docs/ru/compiler.md +74 -9
- package/docs/ru/configuration.md +49 -13
- package/docs/ru/intlayer_with_nextjs_compiler.md +11 -3
- package/docs/ru/intlayer_with_vite+react_compiler.md +11 -3
- package/docs/tr/compiler.md +73 -8
- package/docs/tr/configuration.md +53 -17
- package/docs/tr/intlayer_with_nextjs_compiler.md +11 -3
- package/docs/tr/intlayer_with_vite+react_compiler.md +11 -3
- package/docs/uk/compiler.md +74 -9
- package/docs/uk/configuration.md +183 -147
- package/docs/uk/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/uk/intlayer_with_vite+react_compiler.md +13 -5
- package/docs/vi/compiler.md +75 -10
- package/docs/vi/configuration.md +47 -11
- package/docs/vi/intlayer_with_nextjs_compiler.md +14 -6
- package/docs/vi/intlayer_with_vite+react_compiler.md +14 -6
- package/docs/zh/compiler.md +75 -10
- package/docs/zh/configuration.md +54 -18
- package/docs/zh/intlayer_with_nextjs_compiler.md +13 -5
- package/docs/zh/intlayer_with_vite+react_compiler.md +13 -5
- package/package.json +16 -16
- package/src/blog.ts +1 -1
- package/src/common.ts +2 -1
- package/src/doc.ts +1 -1
- package/src/frequentQuestions.ts +1 -1
- package/src/generated/blog.entry.ts +1 -1
- package/src/generated/docs.entry.ts +1 -1
- package/src/generated/frequentQuestions.entry.ts +1 -1
- package/src/generated/legal.entry.ts +1 -1
- package/src/legal.ts +1 -1
package/docs/fr/configuration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-13
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-10
|
|
4
4
|
title: Configuration
|
|
5
5
|
description: Apprenez à configurer Intlayer pour votre application. Comprenez les différents paramètres et options disponibles pour personnaliser Intlayer selon vos besoins.
|
|
6
6
|
keywords:
|
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.2.0
|
|
18
|
+
date: 2026-03-10
|
|
19
|
+
changes: Update compiler options, add FilePathPattern support
|
|
17
20
|
- version: 8.1.7
|
|
18
21
|
date: 2026-02-25
|
|
19
22
|
changes: Mise à jour des options du compilateur
|
|
@@ -422,12 +425,12 @@ const config: IntlayerConfig = {
|
|
|
422
425
|
*/
|
|
423
426
|
compiler: {
|
|
424
427
|
/**
|
|
425
|
-
*
|
|
428
|
+
* Réglez sur 'build-only' pour ignorer le compilateur pendant le développement et accélérer les temps de démarrage.
|
|
426
429
|
*/
|
|
427
430
|
enabled: true,
|
|
428
431
|
|
|
429
432
|
/**
|
|
430
|
-
*
|
|
433
|
+
* Modèle pour parcourir le code à optimiser.
|
|
431
434
|
*/
|
|
432
435
|
transformPattern: [
|
|
433
436
|
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
@@ -435,23 +438,28 @@ const config: IntlayerConfig = {
|
|
|
435
438
|
],
|
|
436
439
|
|
|
437
440
|
/**
|
|
438
|
-
*
|
|
441
|
+
* Modèle à exclure de l'optimisation.
|
|
439
442
|
*/
|
|
440
443
|
excludePattern: ["**/node_modules/**"],
|
|
441
444
|
|
|
442
445
|
/**
|
|
443
|
-
*
|
|
446
|
+
* Répertoire de sortie pour les dictionnaires optimisés.
|
|
444
447
|
*/
|
|
445
|
-
|
|
448
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
446
449
|
|
|
447
450
|
/**
|
|
448
|
-
*
|
|
451
|
+
* Insérer uniquement le contenu dans le fichier généré, sans clé.
|
|
449
452
|
*/
|
|
450
|
-
|
|
453
|
+
noMetadata: false,
|
|
451
454
|
|
|
452
455
|
/**
|
|
453
|
-
*
|
|
454
|
-
|
|
456
|
+
* Préfixe de clé de dictionnaire
|
|
457
|
+
*/
|
|
458
|
+
dictionaryKeyPrefix: "", // Supprimer le préfixe de base
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Indique si les composants doivent être sauvegardés après avoir été transformés.
|
|
462
|
+
* De cette façon, le compilateur peut être exécuté une seule fois pour transformer l'application, puis il peut être supprimé.
|
|
455
463
|
*/
|
|
456
464
|
saveComponents: false,
|
|
457
465
|
},
|
|
@@ -707,7 +715,7 @@ Paramètres liés à la gestion du contenu au sein de l'application, incluant le
|
|
|
707
715
|
#### Propriétés
|
|
708
716
|
|
|
709
717
|
- **autoFill** :
|
|
710
|
-
- _Type_ : `boolean | string | { [key in Locales]?: string }`
|
|
718
|
+
- _Type_ : `boolean | string | FilePathPattern | { [key in Locales]?: string }`
|
|
711
719
|
- _Défaut_ : `undefined`
|
|
712
720
|
- _Description_ : Indique comment le contenu doit être automatiquement rempli à l'aide de l'IA. Peut être déclaré globalement dans le fichier `intlayer.config.ts`.
|
|
713
721
|
- _Exemple_ : true
|
|
@@ -837,9 +845,9 @@ Pour plus d'informations sur les fichiers de déclaration de contenu et la faço
|
|
|
837
845
|
- **importMode**:
|
|
838
846
|
- _Note_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
839
847
|
- _Type_: `'static' | 'dynamic' | 'fetch'`
|
|
840
|
-
-
|
|
848
|
+
- _Par défaut_: `'static'`
|
|
841
849
|
- _Description_: Controls how dictionaries are imported.
|
|
842
|
-
-
|
|
850
|
+
- _Exemple_: `'dynamic'`
|
|
843
851
|
- **priority**
|
|
844
852
|
- **live**
|
|
845
853
|
- **schema**
|
|
@@ -1061,7 +1069,35 @@ Paramètres qui contrôlent le compilateur Intlayer, qui extrait les dictionnair
|
|
|
1061
1069
|
- _Description_ : Modèles qui définissent quels fichiers doivent être exclus lors de l'optimisation.
|
|
1062
1070
|
- _Exemple_ : `['**/node_modules/**', '!**/node_modules/react/**']`
|
|
1063
1071
|
|
|
1064
|
-
- **outputDir** :
|
|
1072
|
+
- **outputDir** (Deprecated) :
|
|
1065
1073
|
- _Type_ : `string`
|
|
1066
1074
|
- _Par défaut_ : `'compiler'`
|
|
1067
1075
|
- _Description_ : Le répertoire où les dictionnaires extraits seront stockés, relatif au chemin de base de votre projet.
|
|
1076
|
+
|
|
1077
|
+
- **output**:
|
|
1078
|
+
- _Type_: `FilePathPattern`
|
|
1079
|
+
- _Par défaut_: `({ key }) => 'compiler/${key}.content.json'`
|
|
1080
|
+
- _Description_: Définit le chemin des fichiers de sortie. Remplace `outputDir`. Gère les variables dynamiques telles que `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, `{{componentFormat}}`. Peut être configuré sous forme de chaîne à l'aide du format `'my/{{var}}/path'` ou sous forme de fonction.
|
|
1081
|
+
- _Note_: `./**/*` Les chemins sont résolus par rapport au composant. `/**/*` les chemins sont résolus par rapport au `baseDir` d'Intlayer.
|
|
1082
|
+
- _Exemple_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
1083
|
+
|
|
1084
|
+
- **noMetadata**:
|
|
1085
|
+
- _Type_: `boolean`
|
|
1086
|
+
- _Par défaut_: `false`
|
|
1087
|
+
- _Description_: Indique si les métadonnées doivent être enregistrées dans le fichier. Si vrai, le compilateur n'enregistrera pas les métadonnées des dictionnaires (clé, enveloppe de contenu).
|
|
1088
|
+
- _Note_: Utile si utilisé avec le plugin `loadJSON`.
|
|
1089
|
+
- _Exemple_: Si `true` :
|
|
1090
|
+
```json
|
|
1091
|
+
{
|
|
1092
|
+
"key": "value"
|
|
1093
|
+
}
|
|
1094
|
+
```
|
|
1095
|
+
Si `false` :
|
|
1096
|
+
```json
|
|
1097
|
+
{
|
|
1098
|
+
"key": "value",
|
|
1099
|
+
"content": {
|
|
1100
|
+
"key": "value"
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
```
|
|
@@ -20,6 +20,9 @@ slugs:
|
|
|
20
20
|
applicationTemplate: https://github.com/aymericzip/intlayer-next-no-lolale-path-template
|
|
21
21
|
youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
|
|
22
22
|
history:
|
|
23
|
+
- version: 8.2.0
|
|
24
|
+
date: 2026-03-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.6
|
|
24
27
|
date: 2026-02-23
|
|
25
28
|
changes: Première version
|
|
@@ -135,7 +138,12 @@ const config: IntlayerConfig = {
|
|
|
135
138
|
/**
|
|
136
139
|
* Répertoire de sortie pour les dictionnaires optimisés.
|
|
137
140
|
*/
|
|
138
|
-
|
|
141
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Insérer uniquement le contenu dans le fichier généré, sans clé.
|
|
145
|
+
*/
|
|
146
|
+
noMetadata: false,
|
|
139
147
|
|
|
140
148
|
/**
|
|
141
149
|
* Préfixe de clé de dictionnaire
|
|
@@ -19,6 +19,9 @@ slugs:
|
|
|
19
19
|
applicationTemplate: https://github.com/aymericzip/intlayer-vite-react-template
|
|
20
20
|
youtubeVideo: https://www.youtube.com/watch?v=dS9L7uJeak4
|
|
21
21
|
history:
|
|
22
|
+
- version: 8.2.0
|
|
23
|
+
date: 2026-03-09
|
|
24
|
+
changes: Update compiler options, add FilePathPattern support
|
|
22
25
|
- version: 8.1.6
|
|
23
26
|
date: 2026-02-23
|
|
24
27
|
changes: Sortie initiale
|
|
@@ -132,7 +135,12 @@ const config: IntlayerConfig = {
|
|
|
132
135
|
/**
|
|
133
136
|
* Répertoire de sortie pour les dictionnaires optimisés.
|
|
134
137
|
*/
|
|
135
|
-
|
|
138
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Insérer uniquement le contenu dans le fichier généré, sans clé.
|
|
142
|
+
*/
|
|
143
|
+
noMetadata: false,
|
|
136
144
|
|
|
137
145
|
/**
|
|
138
146
|
* Préfixe de clé de dictionnaire
|
package/docs/hi/compiler.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-10
|
|
4
4
|
title: Intlayer Compiler | i18n के लिए स्वचालित सामग्री निष्कर्षण
|
|
5
5
|
description: Intlayer Compiler के साथ अपने अंतरराष्ट्रीयकरण प्रक्रिया को स्वचालित करें। Vite, Next.js, और अन्य में तेज़, अधिक कुशल i18n के लिए सीधे अपने कंपोनेंट्स से सामग्री निकालें।
|
|
6
6
|
keywords:
|
|
@@ -20,6 +20,9 @@ slugs:
|
|
|
20
20
|
- doc
|
|
21
21
|
- compiler
|
|
22
22
|
history:
|
|
23
|
+
- version: 8.2.0
|
|
24
|
+
date: 2026-03-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.7
|
|
24
27
|
date: 2026-02-25
|
|
25
28
|
changes: कंपाइलर विकल्पों को अपडेट करें
|
|
@@ -157,13 +160,12 @@ import { type IntlayerConfig, Locales } from "intlayer";
|
|
|
157
160
|
const config: IntlayerConfig = {
|
|
158
161
|
compiler: {
|
|
159
162
|
/**
|
|
160
|
-
*
|
|
161
|
-
* विकास के दौरान कंपाइलर को छोड़ने और स्टार्टअप समय को तेज़ करने के लिए 'build-only' पर सेट करें।
|
|
163
|
+
* विकास के दौरान कंपाइलर को छोड़ने और स्टार्टअप समय को तेज करने के लिए 'build-only' पर सेट करें।
|
|
162
164
|
*/
|
|
163
165
|
enabled: true,
|
|
164
166
|
|
|
165
167
|
/**
|
|
166
|
-
*
|
|
168
|
+
* Pattern to traverse the code to optimize.
|
|
167
169
|
*/
|
|
168
170
|
transformPattern: [
|
|
169
171
|
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
@@ -171,23 +173,28 @@ const config: IntlayerConfig = {
|
|
|
171
173
|
],
|
|
172
174
|
|
|
173
175
|
/**
|
|
174
|
-
*
|
|
176
|
+
* Pattern to exclude from the optimization.
|
|
175
177
|
*/
|
|
176
178
|
excludePattern: ["**/node_modules/**"],
|
|
177
179
|
|
|
178
180
|
/**
|
|
179
181
|
* अनुकूलित शब्दकोशों के लिए आउटपुट निर्देशिका।
|
|
180
182
|
*/
|
|
181
|
-
|
|
183
|
+
output: ({ key }) => `compiler/${key}.content.json`,
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
|
|
187
|
+
*/
|
|
188
|
+
noMetadata: false,
|
|
182
189
|
|
|
183
190
|
/**
|
|
184
191
|
* शब्दकोश कुंजी उपसर्ग
|
|
185
192
|
*/
|
|
186
|
-
dictionaryKeyPrefix: "", //
|
|
193
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
187
194
|
|
|
188
195
|
/**
|
|
189
|
-
* इंगित करता है कि क्या
|
|
190
|
-
* इस तरह,
|
|
196
|
+
* इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
|
197
|
+
* इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
|
|
191
198
|
*/
|
|
192
199
|
saveComponents: false,
|
|
193
200
|
},
|
|
@@ -209,3 +216,61 @@ npx intlayer fill # लापता अनुवाद भरें
|
|
|
209
216
|
```
|
|
210
217
|
|
|
211
218
|
> अधिक विवरण के लिए, [CLI दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/cli/ci.md) देखें।
|
|
219
|
+
|
|
220
|
+
### कंपाइलर कॉन्फ़िगरेशन संदर्भ
|
|
221
|
+
|
|
222
|
+
निम्नलिखित गुणों को आपकी `intlayer.config.ts` फ़ाइल के `compiler` ब्लॉक में कॉन्फ़िगर किया जा सकता है:
|
|
223
|
+
|
|
224
|
+
- **enabled**:
|
|
225
|
+
- _प्रकार_: `boolean | 'build-only'`
|
|
226
|
+
- _डिफ़ॉल्ट_: `true`
|
|
227
|
+
- _विवरण_: इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
|
|
228
|
+
- **dictionaryKeyPrefix**:
|
|
229
|
+
- _प्रकार_: `string`
|
|
230
|
+
- _डिफ़ॉल्ट_: `'comp-'`
|
|
231
|
+
- _विवरण_: निकाली गई शब्दकोश कुंजियों के लिए उपसर्ग।
|
|
232
|
+
- **transformPattern**:
|
|
233
|
+
- _प्रकार_: `string | string[]`
|
|
234
|
+
- _डिफ़ॉल्ट_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
|
|
235
|
+
- _विवरण_: ऑप्टिमाइज़ करने के लिए कोड को पार करने के पैटर्न।
|
|
236
|
+
- **excludePattern**:
|
|
237
|
+
- _प्रकार_: `string | string[]`
|
|
238
|
+
- _डिफ़ॉल्ट_: `['**/node_modules/**']`
|
|
239
|
+
- _विवरण_: ऑप्टिमाइज़ेशन से बाहर रखने के पैटर्न।
|
|
240
|
+
- **outputDir** (Deprecated):
|
|
241
|
+
- _प्रकार_: `string`
|
|
242
|
+
- _डिफ़ॉल्ट_: `'compiler'`
|
|
243
|
+
- _विवरण_: वह निर्देशिका जहाँ निकाली गई शब्दकोश सामग्री संग्रहीत की जाएगी।
|
|
244
|
+
|
|
245
|
+
- **output**:
|
|
246
|
+
- _प्रकार_: `FilePathPattern`
|
|
247
|
+
- _डिफ़ॉल्ट_: `({ key }) => 'compiler/${key}.content.json'`
|
|
248
|
+
- _विवरण_: आउटपुट फ़ाइल पथ को परिभाषित करता है। `outputDir` को प्रतिस्थापित करता है। `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, और `{{componentFormat}}` जैसे गतिशील चरों को संभालता है। इसे `'my/{{var}}/path'` प्रारूप का उपयोग करके एक स्ट्रिंग के रूप में, या एक फ़ंक्शन के रूप में सेट किया जा सकता है।
|
|
249
|
+
- _नोट_: `./**/*` पथ घटक के सापेक्ष हल किए जाते हैं। `/**/*` पथ Intlayer `baseDir` के सापेक्ष हल किए जाते हैं।
|
|
250
|
+
- _उदाहरण_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
251
|
+
|
|
252
|
+
- **noMetadata**:
|
|
253
|
+
- _प्रकार_: `boolean`
|
|
254
|
+
- _डिफ़ॉल्ट_: `false`
|
|
255
|
+
- _विवरण_: इंगित करता है कि फ़ाइल में मेटाडेटा सहेजा जाना चाहिए या नहीं। यदि सही है, तो कंपाइलर शब्दकोशों (कुंजी, सामग्री रैपर) के मेटाडेटा को नहीं बचाएगा।
|
|
256
|
+
- _नोट_: `loadJSON` प्लगइन के साथ उपयोग किए जाने पर उपयोगी।
|
|
257
|
+
- _उदाहरण_: यदि `सही` है:
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"key": "value"
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
यदि `गलत` है:
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"key": "value",
|
|
267
|
+
"content": {
|
|
268
|
+
"key": "value"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- **saveComponents**:
|
|
274
|
+
- _प्रकार_: `boolean`
|
|
275
|
+
- _डिफ़ॉल्ट_: `false`
|
|
276
|
+
- _विवरण_: इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
package/docs/hi/configuration.md
CHANGED
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.2.0
|
|
18
|
+
date: 2026-03-09
|
|
19
|
+
changes: Update compiler options, add 'output' and 'noMetadata' support
|
|
17
20
|
- version: 8.1.7
|
|
18
21
|
date: 2026-02-25
|
|
19
22
|
changes: कंपाइलर विकल्पों को अपडेट करें
|
|
@@ -419,7 +422,7 @@ const config: IntlayerConfig = {
|
|
|
419
422
|
*/
|
|
420
423
|
compiler: {
|
|
421
424
|
/**
|
|
422
|
-
*
|
|
425
|
+
* इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
|
|
423
426
|
*/
|
|
424
427
|
enabled: true,
|
|
425
428
|
|
|
@@ -437,18 +440,23 @@ const config: IntlayerConfig = {
|
|
|
437
440
|
excludePattern: ["**/node_modules/**"],
|
|
438
441
|
|
|
439
442
|
/**
|
|
440
|
-
*
|
|
443
|
+
* अनुकूलित शब्दकोशों के लिए आउटपुट निर्देशिका।
|
|
441
444
|
*/
|
|
442
|
-
|
|
445
|
+
output: ({ key }) => `compiler/${key}.content.json`,
|
|
443
446
|
|
|
444
447
|
/**
|
|
445
|
-
*
|
|
448
|
+
* उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
|
|
449
|
+
*/
|
|
450
|
+
noMetadata: false,
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* शब्दकोश कुंजी उपसर्ग
|
|
446
454
|
*/
|
|
447
455
|
dictionaryKeyPrefix: "", // Remove base prefix
|
|
448
456
|
|
|
449
457
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
458
|
+
* इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
|
459
|
+
* इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
|
|
452
460
|
*/
|
|
453
461
|
saveComponents: false,
|
|
454
462
|
},
|
|
@@ -704,7 +712,7 @@ export default config;
|
|
|
704
712
|
#### गुण
|
|
705
713
|
|
|
706
714
|
- **autoFill**:
|
|
707
|
-
- _प्रकार_: `boolean | string | { [key in Locales]?: string }`
|
|
715
|
+
- _प्रकार_: `boolean | string | FilePathPattern | { [key in Locales]?: string }`
|
|
708
716
|
- _डिफ़ॉल्ट_: `undefined`
|
|
709
717
|
- _विवरण_: यह संकेत करता है कि सामग्री को AI का उपयोग करके स्वचालित रूप से कैसे भरा जाना चाहिए। इसे वैश्विक रूप से `intlayer.config.ts` फ़ाइल में घोषित किया जा सकता है।
|
|
710
718
|
- _उदाहरण_: true
|
|
@@ -847,7 +855,7 @@ export default config;
|
|
|
847
855
|
- _डिफ़ॉल्ट_: `'[intlayer] '`
|
|
848
856
|
- _विवरण_: लॉगर का उपसर्ग।
|
|
849
857
|
- _उदाहरण_: `'[my custom prefix] '`
|
|
850
|
-
-
|
|
858
|
+
- _नोट_: लॉगर का उपसर्ग।
|
|
851
859
|
|
|
852
860
|
### एआई कॉन्फ़िगरेशन
|
|
853
861
|
|
|
@@ -950,10 +958,10 @@ Intlayer बेहतर लचीलापन और विकल्प के
|
|
|
950
958
|
- _नोट_: शब्दकोश बिल्ड को अक्षम करने के लिए उपयोग किया जा सकता है, उदाहरण के लिए जब Node.js वातावरण में निष्पादन से बचना चाहिए।
|
|
951
959
|
|
|
952
960
|
- **checkTypes**:
|
|
953
|
-
-
|
|
954
|
-
-
|
|
955
|
-
-
|
|
956
|
-
-
|
|
961
|
+
- _प्रकार_: `boolean`
|
|
962
|
+
- _डिफ़ॉल्ट_: `false`
|
|
963
|
+
- _विवरण_: इंगित करता है कि क्या बिल्ड को TypeScript प्रकारों की जांच करनी चाहिए और त्रुटियों को लॉग करना चाहिए।
|
|
964
|
+
- _नोट_: यह बिल्ड को धीमा कर सकता है।
|
|
957
965
|
|
|
958
966
|
- **optimize**:
|
|
959
967
|
- _प्रकार_: `boolean`
|
|
@@ -966,7 +974,7 @@ Intlayer बेहतर लचीलापन और विकल्प के
|
|
|
966
974
|
- _नोट_: सुनिश्चित करें कि सभी कुंजियाँ `useIntlayer` कॉल्स में स्थैतिक रूप से घोषित हों। उदाहरण के लिए `useIntlayer('navbar')`।
|
|
967
975
|
|
|
968
976
|
- **importMode**:
|
|
969
|
-
-
|
|
977
|
+
- _नोट_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
970
978
|
- _प्रकार_: `'static' | 'dynamic' | 'fetch'`
|
|
971
979
|
- _डिफ़ॉल्ट_: `'static'`
|
|
972
980
|
- _विवरण_: नियंत्रित करता है कि शब्दकोश कैसे आयात किए जाते हैं।
|
|
@@ -1045,3 +1053,31 @@ Intlayer बेहतर लचीलापन और विकल्प के
|
|
|
1045
1053
|
- _प्रकार_: `string`
|
|
1046
1054
|
- _डिफ़ॉल्ट_: `'compiler'`
|
|
1047
1055
|
- _विवरण_: वह निर्देशिका जहाँ निकाले गए शब्दकोश संग्रहीत किए जाएंगे, आपके प्रोजेक्ट बेस पाथ के सापेक्ष।
|
|
1056
|
+
|
|
1057
|
+
- **output**:
|
|
1058
|
+
- _प्रकार_: `FilePathPattern`
|
|
1059
|
+
- _डिफ़ॉल्ट_: `({ key }) => 'compiler/${key}.content.json'`
|
|
1060
|
+
- _विवरण_: आउटपुट फ़ाइल पथ को परिभाषित करता है। `outputDir` को प्रतिस्थापित करता है। `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, और `{{componentFormat}}` जैसे गतिशील चरों को संभालता है। इसे `'my/{{var}}/path'` प्रारूप का उपयोग करके एक स्ट्रिंग के रूप में, या एक फ़ंक्शन के रूप में सेट किया जा सकता है।
|
|
1061
|
+
- _नोट_: `./**/*` पथ घटक के सापेक्ष हल किए जाते हैं। `/**/*` पथ Intlayer `baseDir` के सापेक्ष हल किए जाते हैं।
|
|
1062
|
+
- _उदाहरण_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
1063
|
+
|
|
1064
|
+
- **noMetadata**:
|
|
1065
|
+
- _प्रकार_: `boolean`
|
|
1066
|
+
- _डिफ़ॉल्ट_: `false`
|
|
1067
|
+
- _विवरण_: इंगित करता है कि फ़ाइल में मेटाडेटा सहेजा जाना चाहिए या नहीं। यदि सही है, तो कंपाइलर शब्दकोशों (कुंजी, सामग्री रैपर) के मेटाडेटा को नहीं बचाएगा।
|
|
1068
|
+
- _नोट_: `loadJSON` प्लगइन के साथ उपयोग किए जाने पर उपयोगी।
|
|
1069
|
+
- _उदाहरण_: यदि `सही` है:
|
|
1070
|
+
```json
|
|
1071
|
+
{
|
|
1072
|
+
"key": "value"
|
|
1073
|
+
}
|
|
1074
|
+
```
|
|
1075
|
+
यदि `गलत` है:
|
|
1076
|
+
```json
|
|
1077
|
+
{
|
|
1078
|
+
"key": "value",
|
|
1079
|
+
"content": {
|
|
1080
|
+
"key": "value"
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
```
|
|
@@ -20,6 +20,9 @@ slugs:
|
|
|
20
20
|
applicationTemplate: https://github.com/aymericzip/intlayer-next-no-lolale-path-template
|
|
21
21
|
youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
|
|
22
22
|
history:
|
|
23
|
+
- version: 8.2.0
|
|
24
|
+
date: 2026-03-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.6
|
|
24
27
|
date: 2026-02-23
|
|
25
28
|
changes: प्रारंभिक विमोचन
|
|
@@ -128,23 +131,28 @@ const config: IntlayerConfig = {
|
|
|
128
131
|
},
|
|
129
132
|
compiler: {
|
|
130
133
|
/**
|
|
131
|
-
* इंगित करता है कि कंपाइलर सक्षम होना
|
|
134
|
+
* इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
|
|
132
135
|
*/
|
|
133
136
|
enabled: true,
|
|
134
137
|
|
|
135
138
|
/**
|
|
136
|
-
*
|
|
139
|
+
* अनुकूलित शब्दकोशों के लिए आउटपुट निर्देशिका।
|
|
137
140
|
*/
|
|
138
|
-
|
|
141
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
139
142
|
|
|
140
143
|
/**
|
|
141
|
-
*
|
|
144
|
+
* उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
|
|
142
145
|
*/
|
|
143
|
-
|
|
146
|
+
noMetadata: false,
|
|
144
147
|
|
|
145
148
|
/**
|
|
146
|
-
*
|
|
147
|
-
|
|
149
|
+
* शब्दकोश कुंजी उपसर्ग
|
|
150
|
+
*/
|
|
151
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
|
155
|
+
* इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
|
|
148
156
|
*/
|
|
149
157
|
saveComponents: false,
|
|
150
158
|
},
|
|
@@ -19,6 +19,9 @@ slugs:
|
|
|
19
19
|
applicationTemplate: https://github.com/aymericzip/intlayer-vite-react-template
|
|
20
20
|
youtubeVideo: https://www.youtube.com/watch?v=dS9L7uJeak4
|
|
21
21
|
history:
|
|
22
|
+
- version: 8.2.0
|
|
23
|
+
date: 2026-03-09
|
|
24
|
+
changes: Update compiler options, add FilePathPattern support
|
|
22
25
|
- version: 8.1.6
|
|
23
26
|
date: 2026-02-23
|
|
24
27
|
changes: प्रारंभिक रिलीज़
|
|
@@ -125,23 +128,28 @@ const config: IntlayerConfig = {
|
|
|
125
128
|
},
|
|
126
129
|
compiler: {
|
|
127
130
|
/**
|
|
128
|
-
* इंगित करता है कि कंपाइलर सक्षम होना
|
|
131
|
+
* इंगित करता है कि क्या कंपाइलर सक्षम होना चाहिए।
|
|
129
132
|
*/
|
|
130
133
|
enabled: true,
|
|
131
134
|
|
|
132
135
|
/**
|
|
133
|
-
*
|
|
136
|
+
* अनुकूलित शब्दकोशों के लिए आउटपुट निर्देशिका।
|
|
134
137
|
*/
|
|
135
|
-
|
|
138
|
+
output: ({ locale, key }) => `compiler/${locale}/${key}.json`,
|
|
136
139
|
|
|
137
140
|
/**
|
|
138
|
-
*
|
|
141
|
+
* उत्पन्न फ़ाइल में केवल सामग्री डालें, बिना कुंजी के।
|
|
139
142
|
*/
|
|
140
|
-
|
|
143
|
+
noMetadata: false,
|
|
141
144
|
|
|
142
145
|
/**
|
|
143
|
-
*
|
|
144
|
-
|
|
146
|
+
* शब्दकोश कुंजी उपसर्ग
|
|
147
|
+
*/
|
|
148
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* इंगित करता है कि क्या घटकों को रूपांतरित होने के बाद सहेजा जाना चाहिए।
|
|
152
|
+
* इस तरह, कंपाइलer को ऐप को रूपांतरित करने के लिए केवल एक बार चलाया जा सकता है, और फिर इसे हटाया जा सकता है।
|
|
145
153
|
*/
|
|
146
154
|
saveComponents: false,
|
|
147
155
|
},
|
package/docs/id/compiler.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-09-09
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-03-10
|
|
4
4
|
title: Intlayer Compiler | Ekstraksi Konten Otomatis untuk i18n
|
|
5
5
|
description: Otomatiskan proses internasionalisasi Anda dengan Intlayer Compiler. Ekstrak konten langsung dari komponen Anda untuk i18n yang lebih cepat dan efisien di Vite, Next.js, dan lainnya.
|
|
6
6
|
keywords:
|
|
@@ -20,6 +20,9 @@ slugs:
|
|
|
20
20
|
- doc
|
|
21
21
|
- compiler
|
|
22
22
|
history:
|
|
23
|
+
- version: 8.2.0
|
|
24
|
+
date: 2026-03-09
|
|
25
|
+
changes: Update compiler options, add FilePathPattern support
|
|
23
26
|
- version: 8.1.7
|
|
24
27
|
date: 2026-02-25
|
|
25
28
|
changes: Perbarui opsi kompiler
|
|
@@ -157,13 +160,12 @@ import { type IntlayerConfig, Locales } from "intlayer";
|
|
|
157
160
|
const config: IntlayerConfig = {
|
|
158
161
|
compiler: {
|
|
159
162
|
/**
|
|
160
|
-
*
|
|
161
|
-
* Atur ke 'build-only' untuk melewatkan compiler selama pengembangan dan mempercepat waktu startup.
|
|
163
|
+
* Atur ke 'build-only' untuk melewatkan kompiler selama pengembangan dan mempercepat waktu mulai.
|
|
162
164
|
*/
|
|
163
165
|
enabled: true,
|
|
164
166
|
|
|
165
167
|
/**
|
|
166
|
-
*
|
|
168
|
+
* Pattern to traverse the code to optimize.
|
|
167
169
|
*/
|
|
168
170
|
transformPattern: [
|
|
169
171
|
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
@@ -171,23 +173,28 @@ const config: IntlayerConfig = {
|
|
|
171
173
|
],
|
|
172
174
|
|
|
173
175
|
/**
|
|
174
|
-
*
|
|
176
|
+
* Pattern to exclude from the optimization.
|
|
175
177
|
*/
|
|
176
178
|
excludePattern: ["**/node_modules/**"],
|
|
177
179
|
|
|
178
180
|
/**
|
|
179
181
|
* Direktori output untuk kamus yang dioptimalkan.
|
|
180
182
|
*/
|
|
181
|
-
|
|
183
|
+
output: ({ key }) => `compiler/${key}.content.json`,
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Masukkan konten saja dalam file yang dihasilkan, tanpa kunci.
|
|
187
|
+
*/
|
|
188
|
+
noMetadata: false,
|
|
182
189
|
|
|
183
190
|
/**
|
|
184
191
|
* Awalan kunci kamus
|
|
185
192
|
*/
|
|
186
|
-
dictionaryKeyPrefix: "", //
|
|
193
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
187
194
|
|
|
188
195
|
/**
|
|
189
196
|
* Menunjukkan apakah komponen harus disimpan setelah ditransformasi.
|
|
190
|
-
* Dengan begitu,
|
|
197
|
+
* Dengan begitu, kompiler hanya perlu dijalankan sekali untuk mentransformasi aplikasi, lalu dapat dihapus.
|
|
191
198
|
*/
|
|
192
199
|
saveComponents: false,
|
|
193
200
|
},
|
|
@@ -209,3 +216,61 @@ npx intlayer fill # Isi terjemahan yang hilang
|
|
|
209
216
|
```
|
|
210
217
|
|
|
211
218
|
> Untuk rincian lebih lanjut, silakan merujuk ke [dokumentasi CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/cli/ci.md)
|
|
219
|
+
|
|
220
|
+
### Referensi Konfigurasi Kompiler
|
|
221
|
+
|
|
222
|
+
Properti berikut dapat dikonfigurasi dalam blok `compiler` pada file `intlayer.config.ts` Anda:
|
|
223
|
+
|
|
224
|
+
- **enabled**:
|
|
225
|
+
- _Tipe_: `boolean | 'build-only'`
|
|
226
|
+
- _Default_: `true`
|
|
227
|
+
- _Deskripsi_: Menunjukkan apakah kompiler harus diaktifkan.
|
|
228
|
+
- **dictionaryKeyPrefix**:
|
|
229
|
+
- _Tipe_: `string`
|
|
230
|
+
- _Default_: `'comp-'`
|
|
231
|
+
- _Deskripsi_: Awalan untuk kunci kamus yang diekstrak.
|
|
232
|
+
- **transformPattern**:
|
|
233
|
+
- _Tipe_: `string | string[]`
|
|
234
|
+
- _Default_: `['**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}', '!**/node_modules/**']`
|
|
235
|
+
- _Deskripsi_: Pola untuk menelusuri kode yang ingin dioptimalkan.
|
|
236
|
+
- **excludePattern**:
|
|
237
|
+
- _Tipe_: `string | string[]`
|
|
238
|
+
- _Default_: `['**/node_modules/**']`
|
|
239
|
+
- _Deskripsi_: Pola yang harus dikecualikan dari optimasi.
|
|
240
|
+
- **outputDir** (Deprecated):
|
|
241
|
+
- _Tipe_: `string`
|
|
242
|
+
- _Default_: `'compiler'`
|
|
243
|
+
- _Deskripsi_: Direktori tempat kamus yang diekstrak akan disimpan.
|
|
244
|
+
|
|
245
|
+
- **output**:
|
|
246
|
+
- _Tipe_: `FilePathPattern`
|
|
247
|
+
- _Default_: `({ key }) => 'compiler/${key}.content.json'`
|
|
248
|
+
- _Deskripsi_: Mendefinisikan jalur file output. Menggantikan `outputDir`. Menangani variabel dinamis seperti `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`, `{{format}}`, `{{dirPath}}`, `{{componentFileName}}`, `{{componentExtension}}`, dan `{{componentFormat}}`. Dapat diatur sebagai string menggunakan format `'my/{{var}}/path'`, atau sebagai fungsi.
|
|
249
|
+
- _Catatan_: Jalur `./**/*` diselesaikan relatif terhadap komponen. Jalur `/**/*` diselesaikan relatif terhadap `baseDir` Intlayer.
|
|
250
|
+
- _Contoh_: `output: ({ locale, key }) => 'compiler/${locale}/${key}.json'`
|
|
251
|
+
|
|
252
|
+
- **noMetadata**:
|
|
253
|
+
- _Tipe_: `boolean`
|
|
254
|
+
- _Default_: `false`
|
|
255
|
+
- _Deskripsi_: Menunjukkan apakah metadata harus disimpan dalam file. Jika benar, kompiler tidak akan menyimpan metadata kamus (kunci, pembungkus konten).
|
|
256
|
+
- _Catatan_: Berguna jika digunakan dengan plugin `loadJSON`.
|
|
257
|
+
- _Contoh_: Jika `true`:
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"key": "value"
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
Jika `false`:
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"key": "value",
|
|
267
|
+
"content": {
|
|
268
|
+
"key": "value"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- **saveComponents**:
|
|
274
|
+
- _Tipe_: `boolean`
|
|
275
|
+
- _Default_: `false`
|
|
276
|
+
- _Deskripsi_: Menunjukkan apakah komponen harus disimpan setelah ditransformasi.
|