@intlayer/docs 8.3.1 → 8.3.3
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/blog/ar/i18n_using_next-i18next.md +1 -0
- package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +0 -29
- package/blog/uk/internationalization_and_SEO.md +1 -1
- package/docs/ar/cli/init.md +1 -1
- package/docs/ar/configuration.md +2 -21
- package/docs/ar/intlayer_with_analog.md +2 -2
- package/docs/ar/intlayer_with_angular.md +2 -2
- package/docs/ar/intlayer_with_astro.md +2 -2
- package/docs/ar/intlayer_with_lynx+react.md +2 -2
- package/docs/ar/intlayer_with_nextjs_no_locale_path.md +4 -7
- package/docs/ar/intlayer_with_react_native+expo.md +2 -2
- package/docs/ar/intlayer_with_vite+preact.md +2 -2
- package/docs/ar/intlayer_with_vite+solid.md +2 -2
- package/docs/ar/intlayer_with_vite+svelte.md +2 -2
- package/docs/ar/intlayer_with_vite+vue.md +4 -4
- package/docs/ar/vs_code_extension.md +1 -1
- package/docs/de/configuration.md +2 -21
- package/docs/de/intlayer_with_analog.md +2 -2
- package/docs/de/intlayer_with_angular.md +2 -2
- package/docs/de/intlayer_with_astro.md +2 -2
- package/docs/de/intlayer_with_lynx+react.md +2 -2
- package/docs/de/intlayer_with_react_native+expo.md +2 -2
- package/docs/de/intlayer_with_vite+preact.md +2 -2
- package/docs/de/intlayer_with_vite+solid.md +2 -2
- package/docs/de/intlayer_with_vite+svelte.md +2 -2
- package/docs/de/intlayer_with_vite+vue.md +2 -2
- package/docs/de/vs_code_extension.md +1 -1
- package/docs/en/cli/init.md +1 -1
- package/docs/en/configuration.md +2 -20
- package/docs/en/intlayer_with_analog.md +1 -1
- package/docs/en/intlayer_with_angular.md +1 -1
- package/docs/en/intlayer_with_astro.md +1 -1
- package/docs/en/intlayer_with_lynx+react.md +1 -1
- package/docs/en/intlayer_with_react_native+expo.md +1 -1
- package/docs/en/intlayer_with_vite+preact.md +1 -1
- package/docs/en/intlayer_with_vite+solid.md +1 -1
- package/docs/en/intlayer_with_vite+svelte.md +1 -1
- package/docs/en/intlayer_with_vite+vue.md +1 -1
- package/docs/en/vs_code_extension.md +1 -1
- package/docs/en-GB/cli/init.md +1 -1
- package/docs/en-GB/configuration.md +2 -21
- package/docs/en-GB/intlayer_with_analog.md +1 -1
- package/docs/en-GB/intlayer_with_angular.md +1 -1
- package/docs/en-GB/intlayer_with_astro.md +1 -1
- package/docs/en-GB/intlayer_with_lynx+react.md +1 -1
- package/docs/en-GB/intlayer_with_react_native+expo.md +1 -1
- package/docs/en-GB/intlayer_with_vite+preact.md +1 -1
- package/docs/en-GB/intlayer_with_vite+react.md +1 -1
- package/docs/en-GB/intlayer_with_vite+solid.md +1 -1
- package/docs/en-GB/intlayer_with_vite+svelte.md +1 -1
- package/docs/en-GB/intlayer_with_vite+vue.md +2 -2
- package/docs/en-GB/vs_code_extension.md +1 -1
- package/docs/es/configuration.md +2 -21
- package/docs/es/intlayer_with_analog.md +2 -2
- package/docs/es/intlayer_with_angular.md +2 -2
- package/docs/es/intlayer_with_astro.md +2 -2
- package/docs/es/intlayer_with_lynx+react.md +2 -2
- package/docs/es/intlayer_with_react_native+expo.md +2 -2
- package/docs/es/intlayer_with_vite+preact.md +2 -2
- package/docs/es/intlayer_with_vite+solid.md +2 -2
- package/docs/es/intlayer_with_vite+svelte.md +2 -2
- package/docs/es/intlayer_with_vite+vue.md +4 -4
- package/docs/es/vs_code_extension.md +1 -1
- package/docs/fr/configuration.md +2 -21
- package/docs/fr/intlayer_with_analog.md +2 -2
- package/docs/fr/intlayer_with_angular.md +2 -2
- package/docs/fr/intlayer_with_astro.md +2 -2
- package/docs/fr/intlayer_with_lynx+react.md +2 -2
- package/docs/fr/intlayer_with_react_native+expo.md +2 -2
- package/docs/fr/intlayer_with_vite+preact.md +2 -2
- package/docs/fr/intlayer_with_vite+react.md +2 -2
- package/docs/fr/intlayer_with_vite+solid.md +2 -2
- package/docs/fr/intlayer_with_vite+svelte.md +2 -2
- package/docs/fr/intlayer_with_vite+vue.md +4 -4
- package/docs/fr/vs_code_extension.md +1 -1
- package/docs/hi/cli/init.md +1 -1
- package/docs/hi/configuration.md +2 -21
- package/docs/hi/intlayer_with_analog.md +1 -1
- package/docs/hi/intlayer_with_angular.md +2 -2
- package/docs/hi/intlayer_with_astro.md +2 -2
- package/docs/hi/intlayer_with_lynx+react.md +2 -2
- package/docs/hi/intlayer_with_react_native+expo.md +2 -2
- package/docs/hi/intlayer_with_vite+preact.md +2 -2
- package/docs/hi/intlayer_with_vite+solid.md +2 -2
- package/docs/hi/intlayer_with_vite+svelte.md +2 -2
- package/docs/hi/intlayer_with_vite+vue.md +2 -2
- package/docs/hi/vs_code_extension.md +1 -1
- package/docs/id/configuration.md +2 -20
- package/docs/id/intlayer_with_analog.md +2 -2
- package/docs/id/intlayer_with_angular.md +2 -2
- package/docs/id/intlayer_with_astro.md +2 -2
- package/docs/id/intlayer_with_lynx+react.md +2 -2
- package/docs/id/intlayer_with_react_native+expo.md +2 -2
- package/docs/id/intlayer_with_vite+preact.md +2 -2
- package/docs/id/intlayer_with_vite+react.md +2 -2
- package/docs/id/intlayer_with_vite+solid.md +2 -2
- package/docs/id/intlayer_with_vite+svelte.md +2 -2
- package/docs/id/intlayer_with_vite+vue.md +2 -2
- package/docs/id/vs_code_extension.md +1 -1
- package/docs/it/configuration.md +2 -22
- package/docs/it/intlayer_with_analog.md +2 -2
- package/docs/it/intlayer_with_angular.md +2 -2
- package/docs/it/intlayer_with_astro.md +2 -2
- package/docs/it/intlayer_with_lynx+react.md +2 -2
- package/docs/it/intlayer_with_react_native+expo.md +2 -2
- package/docs/it/intlayer_with_vite+preact.md +2 -2
- package/docs/it/intlayer_with_vite+react.md +2 -2
- package/docs/it/intlayer_with_vite+solid.md +2 -2
- package/docs/it/intlayer_with_vite+svelte.md +2 -2
- package/docs/it/intlayer_with_vite+vue.md +4 -4
- package/docs/it/vs_code_extension.md +1 -1
- package/docs/ja/cli/init.md +1 -1
- package/docs/ja/configuration.md +2 -21
- package/docs/ja/intlayer_with_analog.md +2 -2
- package/docs/ja/intlayer_with_angular.md +2 -2
- package/docs/ja/intlayer_with_astro.md +2 -2
- package/docs/ja/intlayer_with_lynx+react.md +2 -2
- package/docs/ja/intlayer_with_react_native+expo.md +2 -2
- package/docs/ja/intlayer_with_vite+solid.md +2 -2
- package/docs/ja/intlayer_with_vite+svelte.md +2 -2
- package/docs/ja/intlayer_with_vite+vue.md +2 -2
- package/docs/ja/vs_code_extension.md +1 -1
- package/docs/ko/configuration.md +2 -21
- package/docs/ko/intlayer_with_analog.md +2 -2
- package/docs/ko/intlayer_with_angular.md +2 -2
- package/docs/ko/intlayer_with_astro.md +2 -2
- package/docs/ko/intlayer_with_lynx+react.md +2 -2
- package/docs/ko/intlayer_with_react_native+expo.md +2 -2
- package/docs/ko/intlayer_with_vite+preact.md +2 -2
- package/docs/ko/intlayer_with_vite+solid.md +2 -2
- package/docs/ko/intlayer_with_vite+svelte.md +2 -2
- package/docs/ko/intlayer_with_vite+vue.md +2 -2
- package/docs/ko/vs_code_extension.md +1 -1
- package/docs/pl/configuration.md +2 -20
- package/docs/pl/intlayer_with_analog.md +2 -2
- package/docs/pl/intlayer_with_angular.md +2 -2
- package/docs/pl/intlayer_with_astro.md +2 -2
- package/docs/pl/intlayer_with_lynx+react.md +2 -2
- package/docs/pl/intlayer_with_react_native+expo.md +2 -2
- package/docs/pl/intlayer_with_vite+preact.md +1 -1
- package/docs/pl/intlayer_with_vite+react.md +2 -2
- package/docs/pl/intlayer_with_vite+solid.md +2 -2
- package/docs/pl/intlayer_with_vite+svelte.md +2 -2
- package/docs/pl/intlayer_with_vite+vue.md +4 -4
- package/docs/pl/vs_code_extension.md +1 -1
- package/docs/pt/configuration.md +2 -12
- package/docs/pt/intlayer_with_analog.md +2 -2
- package/docs/pt/intlayer_with_angular.md +2 -2
- package/docs/pt/intlayer_with_astro.md +2 -2
- package/docs/pt/intlayer_with_lynx+react.md +2 -2
- package/docs/pt/intlayer_with_react_native+expo.md +2 -2
- package/docs/pt/intlayer_with_vite+preact.md +1 -1
- package/docs/pt/intlayer_with_vite+solid.md +2 -2
- package/docs/pt/intlayer_with_vite+svelte.md +2 -2
- package/docs/pt/intlayer_with_vite+vue.md +2 -2
- package/docs/pt/vs_code_extension.md +1 -1
- package/docs/ru/configuration.md +2 -21
- package/docs/ru/intlayer_with_analog.md +2 -2
- package/docs/ru/intlayer_with_angular.md +2 -2
- package/docs/ru/intlayer_with_astro.md +2 -2
- package/docs/ru/intlayer_with_lynx+react.md +2 -2
- package/docs/ru/intlayer_with_react_native+expo.md +2 -2
- package/docs/ru/intlayer_with_vite+preact.md +2 -2
- package/docs/ru/intlayer_with_vite+solid.md +2 -2
- package/docs/ru/intlayer_with_vite+svelte.md +2 -2
- package/docs/ru/intlayer_with_vite+vue.md +2 -2
- package/docs/ru/vs_code_extension.md +1 -1
- package/docs/tr/configuration.md +2 -21
- package/docs/tr/intlayer_with_analog.md +2 -2
- package/docs/tr/intlayer_with_angular.md +2 -2
- package/docs/tr/intlayer_with_astro.md +2 -2
- package/docs/tr/intlayer_with_lynx+react.md +2 -2
- package/docs/tr/intlayer_with_nextjs_no_locale_path.md +6 -14
- package/docs/tr/intlayer_with_react_native+expo.md +2 -2
- package/docs/tr/intlayer_with_vite+preact.md +2 -2
- package/docs/tr/intlayer_with_vite+react.md +2 -2
- package/docs/tr/intlayer_with_vite+solid.md +2 -2
- package/docs/tr/intlayer_with_vite+svelte.md +2 -2
- package/docs/tr/intlayer_with_vite+vue.md +2 -2
- package/docs/tr/vs_code_extension.md +1 -1
- package/docs/uk/cli/init.md +1 -1
- package/docs/uk/configuration.md +2 -20
- package/docs/uk/intlayer_with_analog.md +2 -2
- package/docs/uk/intlayer_with_angular.md +2 -2
- package/docs/uk/intlayer_with_astro.md +2 -2
- package/docs/uk/intlayer_with_lynx+react.md +2 -2
- package/docs/uk/intlayer_with_nextjs_no_locale_path.md +4 -22
- package/docs/uk/intlayer_with_react_native+expo.md +2 -2
- package/docs/uk/intlayer_with_vite+preact.md +2 -2
- package/docs/uk/intlayer_with_vite+solid.md +2 -2
- package/docs/uk/intlayer_with_vite+svelte.md +2 -2
- package/docs/uk/intlayer_with_vite+vue.md +2 -2
- package/docs/uk/vs_code_extension.md +1 -1
- package/docs/vi/cli/init.md +1 -1
- package/docs/vi/configuration.md +2 -20
- package/docs/vi/intlayer_with_analog.md +2 -2
- package/docs/vi/intlayer_with_angular.md +2 -2
- package/docs/vi/intlayer_with_astro.md +2 -2
- package/docs/vi/intlayer_with_lynx+react.md +2 -2
- package/docs/vi/intlayer_with_react_native+expo.md +2 -2
- package/docs/vi/intlayer_with_vite+preact.md +2 -2
- package/docs/vi/intlayer_with_vite+react.md +2 -2
- package/docs/vi/intlayer_with_vite+solid.md +2 -2
- package/docs/vi/intlayer_with_vite+svelte.md +2 -2
- package/docs/vi/intlayer_with_vite+vue.md +2 -2
- package/docs/vi/vs_code_extension.md +1 -1
- package/docs/zh/cli/init.md +1 -1
- package/docs/zh/configuration.md +2 -21
- package/docs/zh/intlayer_with_analog.md +2 -2
- package/docs/zh/intlayer_with_angular.md +2 -2
- package/docs/zh/intlayer_with_astro.md +2 -2
- package/docs/zh/intlayer_with_lynx+react.md +2 -2
- package/docs/zh/intlayer_with_react_native+expo.md +2 -2
- package/docs/zh/intlayer_with_vite+preact.md +2 -2
- package/docs/zh/intlayer_with_vite+solid.md +2 -2
- package/docs/zh/intlayer_with_vite+svelte.md +2 -2
- package/docs/zh/intlayer_with_vite+vue.md +4 -4
- package/docs/zh/vs_code_extension.md +2 -2
- package/package.json +8 -8
- package/docs/update_docs.py +0 -65
|
@@ -1391,8 +1391,8 @@ Khuyến nghị bỏ qua các tệp được tạo bởi Intlayer. Điều này
|
|
|
1391
1391
|
|
|
1392
1392
|
Để làm điều này, bạn có thể thêm các chỉ dẫn sau vào tệp `.gitignore` của bạn:
|
|
1393
1393
|
|
|
1394
|
-
```
|
|
1395
|
-
#
|
|
1394
|
+
```bash
|
|
1395
|
+
# Bỏ qua các tệp được tạo bởi Intlayer
|
|
1396
1396
|
.intlayer
|
|
1397
1397
|
```
|
|
1398
1398
|
|
|
@@ -554,8 +554,8 @@ Khuyến nghị bỏ qua các file được tạo bởi Intlayer. Điều này g
|
|
|
554
554
|
|
|
555
555
|
Để làm điều này, bạn có thể thêm các hướng dẫn sau vào file `.gitignore` của bạn:
|
|
556
556
|
|
|
557
|
-
```
|
|
558
|
-
#
|
|
557
|
+
```bash
|
|
558
|
+
# Bỏ qua các file được tạo bởi Intlayer
|
|
559
559
|
.intlayer
|
|
560
560
|
```
|
|
561
561
|
|
|
@@ -472,8 +472,8 @@ Khuyến nghị nên bỏ qua các file được tạo ra bởi Intlayer. Điề
|
|
|
472
472
|
|
|
473
473
|
Để làm điều này, bạn có thể thêm các chỉ dẫn sau vào file `.gitignore` của bạn:
|
|
474
474
|
|
|
475
|
-
```
|
|
476
|
-
#
|
|
475
|
+
```bash
|
|
476
|
+
# Bỏ qua các file được tạo ra bởi Intlayer
|
|
477
477
|
.intlayer
|
|
478
478
|
```
|
|
479
479
|
|
|
@@ -1058,8 +1058,8 @@ Nên bỏ qua các tệp được tạo bởi Intlayer. Điều này giúp bạn
|
|
|
1058
1058
|
|
|
1059
1059
|
Để làm điều này, bạn có thể thêm các hướng dẫn sau vào tệp `.gitignore` của bạn:
|
|
1060
1060
|
|
|
1061
|
-
```
|
|
1062
|
-
#
|
|
1061
|
+
```bash
|
|
1062
|
+
# Bỏ qua các tệp được tạo bởi Intlayer
|
|
1063
1063
|
.intlayer
|
|
1064
1064
|
```
|
|
1065
1065
|
|
|
@@ -120,7 +120,7 @@ Phần mở rộng có thể tải các biến môi trường từ workspace c
|
|
|
120
120
|
|
|
121
121
|
#### Chọn môi trường đang hoạt động
|
|
122
122
|
|
|
123
|
-
- **Command Palette**: mở palette và chạy `Intlayer: Select Environment`, sau đó chọn môi trường (ví dụ: `development`, `staging`, `production`). Phần mở rộng sẽ cố gắng tải tệp đầu tiên có sẵn trong danh sách ưu tiên ở trên và hiển thị thông báo như “Loaded env from
|
|
123
|
+
- **Command Palette**: mở palette và chạy `Intlayer: Select Environment`, sau đó chọn môi trường (ví dụ: `development`, `staging`, `production`). Phần mở rộng sẽ cố gắng tải tệp đầu tiên có sẵn trong danh sách ưu tiên ở trên và hiển thị thông báo như “Loaded env from `.env.<env>.local`”.
|
|
124
124
|
- **Cài đặt**: vào `Settings → Extensions → Intlayer`, và thiết lập:
|
|
125
125
|
- **Environment**: tên môi trường được sử dụng để giải quyết các tệp `.env.<env>*`.
|
|
126
126
|
- (Tùy chọn) **Env File**: đường dẫn rõ ràng đến một tệp `.env`. Khi được cung cấp, nó sẽ ưu tiên hơn danh sách suy luận.
|
package/docs/zh/cli/init.md
CHANGED
|
@@ -71,7 +71,7 @@ npx intlayer init
|
|
|
71
71
|
Checking Intlayer configuration...
|
|
72
72
|
✓ Added .intlayer to .gitignore
|
|
73
73
|
✓ Updated tsconfig.json to include intlayer types
|
|
74
|
-
Created intlayer.config.ts
|
|
74
|
+
✓ Created intlayer.config.ts
|
|
75
75
|
✓ Injected import into vite.config.ts
|
|
76
76
|
✓ Intlayer init setup complete.
|
|
77
77
|
```
|
package/docs/zh/configuration.md
CHANGED
|
@@ -259,13 +259,13 @@ const config: IntlayerConfig = {
|
|
|
259
259
|
editor: {
|
|
260
260
|
/**
|
|
261
261
|
* Whether the visual editor is enabled.
|
|
262
|
-
* Default:
|
|
262
|
+
* Default: false
|
|
263
263
|
*/
|
|
264
264
|
enabled: true,
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* URL of your application for origin validation.
|
|
268
|
-
* Default: "
|
|
268
|
+
* Default: ""
|
|
269
269
|
*/
|
|
270
270
|
applicationURL: "http://localhost:3000",
|
|
271
271
|
|
|
@@ -1020,25 +1020,6 @@ Intlayer 支持多个 AI 提供商,以增强灵活性和选择。目前支持
|
|
|
1020
1020
|
- _注意_: 此选项依赖于 `@intlayer/babel` 和 `@intlayer/swc` 插件。
|
|
1021
1021
|
- _注意_: 确保所有键在 `useIntlayer` 调用中是静态声明的。例如 `useIntlayer('navbar')`。
|
|
1022
1022
|
|
|
1023
|
-
- **importMode**:
|
|
1024
|
-
- _注意_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
1025
|
-
- _类型_: `'static' | 'dynamic' | 'fetch'`
|
|
1026
|
-
- _默认值_: `'static'`
|
|
1027
|
-
- _描述_: 控制字典的导入方式。
|
|
1028
|
-
- _示例_: `'dynamic'`
|
|
1029
|
-
- _注意_: 可用模式:
|
|
1030
|
-
- "static":字典以静态方式导入。将 `useIntlayer` 替换为 `useDictionary`。
|
|
1031
|
-
- "dynamic":字典通过 Suspense 动态导入。将 `useIntlayer` 替换为 `useDictionaryDynamic`。
|
|
1032
|
-
- "live":字典通过实时同步 API 动态获取。将 `useIntlayer` 替换为 `useDictionaryFetch`。
|
|
1033
|
-
- _注意_:动态导入依赖 Suspense,可能会略微影响渲染性能。
|
|
1034
|
-
- _注意_:如果禁用,所有语言环境将一次性加载,即使未被使用。
|
|
1035
|
-
- _注意_:此选项依赖 `@intlayer/babel` 和 `@intlayer/swc` 插件。
|
|
1036
|
-
- _注意_:确保在 `useIntlayer` 调用中所有键都是静态声明的。例如 `useIntlayer('navbar')`。
|
|
1037
|
-
- _注意_:如果禁用 `optimize`,此选项将被忽略。
|
|
1038
|
-
- _注意_: 如果设置为 "live",只有包含远程内容且标记为 "live" 的字典会被转换为实时模式。其他字典将以 "dynamic" 模式动态导入,以优化请求次数和加载性能。
|
|
1039
|
-
- _注意_: 实时模式将使用实时同步 API 来获取字典。如果 API 调用失败,字典将以 "dynamic" 模式动态导入。
|
|
1040
|
-
- _注意_: 此选项不会影响 `getIntlayer`、`getDictionary`、`useDictionary`、`useDictionaryAsync` 和 `useDictionaryDynamic` 函数。
|
|
1041
|
-
|
|
1042
1023
|
- **outputFormat**:
|
|
1043
1024
|
- _类型_: `'esm' | 'cjs'`
|
|
1044
1025
|
- _默认值_: `'esm'`
|
|
@@ -1058,8 +1058,8 @@ Intlayer 使用模块增强来利用 TypeScript 的优势,使您的代码库
|
|
|
1058
1058
|
|
|
1059
1059
|
为此,您可以在 `.gitignore` 文件中添加以下指令:
|
|
1060
1060
|
|
|
1061
|
-
```
|
|
1062
|
-
#
|
|
1061
|
+
```bash
|
|
1062
|
+
# 忽略 Intlayer 生成的文件
|
|
1063
1063
|
.intlayer
|
|
1064
1064
|
```
|
|
1065
1065
|
|
|
@@ -1080,8 +1080,8 @@ Intlayer 使用模块增强来利用 TypeScript 的优势,使您的代码库
|
|
|
1080
1080
|
|
|
1081
1081
|
为此,您可以在 `.gitignore` 文件中添加以下指令:
|
|
1082
1082
|
|
|
1083
|
-
```
|
|
1084
|
-
#
|
|
1083
|
+
```bash
|
|
1084
|
+
# 忽略由 Intlayer 生成的文件
|
|
1085
1085
|
.intlayer
|
|
1086
1086
|
```
|
|
1087
1087
|
|
|
@@ -120,14 +120,14 @@ Intlayer 建议将您的 AI API 密钥,以及 Intlayer 客户端 ID 和密钥
|
|
|
120
120
|
|
|
121
121
|
#### 选择活动环境
|
|
122
122
|
|
|
123
|
-
- **命令面板**:打开命令面板并运行 `Intlayer: Select Environment`,然后选择环境(例如,`development`、`staging`、`production`)。扩展将尝试加载上述优先级列表中第一个可用的文件,并显示类似“已从
|
|
123
|
+
- **命令面板**:打开命令面板并运行 `Intlayer: Select Environment`,然后选择环境(例如,`development`、`staging`、`production`)。扩展将尝试加载上述优先级列表中第一个可用的文件,并显示类似“已从 `.env.<env>.local` 加载环境”的通知。
|
|
124
124
|
- **设置**:进入 `设置 → 扩展 → Intlayer`,并设置:
|
|
125
125
|
- **环境**:用于解析 `.env.<env>*` 文件的环境名称。
|
|
126
126
|
- (可选)**环境文件**:显式指定一个 `.env` 文件路径。提供后,该路径优先于推断的列表。
|
|
127
127
|
|
|
128
128
|
#### Monorepos 和自定义目录
|
|
129
129
|
|
|
130
|
-
- **命令面板**:打开命令面板并运行 `Intlayer: Select Environment`,然后选择环境(例如,`development`、`staging`、`production`)。扩展将尝试加载上述优先列表中的第一个可用文件,并显示类似“已从
|
|
130
|
+
- **命令面板**:打开命令面板并运行 `Intlayer: Select Environment`,然后选择环境(例如,`development`、`staging`、`production`)。扩展将尝试加载上述优先列表中的第一个可用文件,并显示类似“已从 `.env.<env>.local` 加载环境”的通知。
|
|
131
131
|
- **设置**:进入 `设置 → 扩展 → Intlayer`,并设置:
|
|
132
132
|
- **环境**:用于解析 `.env.<env>*` 文件的环境名称。
|
|
133
133
|
- (可选)**Env 文件**:显式指定一个 `.env` 文件路径。提供后,该路径优先于推断的列表。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/docs",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer documentation",
|
|
6
6
|
"keywords": [
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"watch": "webpack --config ./webpack.config.ts --watch"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@intlayer/config": "8.3.
|
|
76
|
-
"@intlayer/core": "8.3.
|
|
77
|
-
"@intlayer/types": "8.3.
|
|
75
|
+
"@intlayer/config": "8.3.3",
|
|
76
|
+
"@intlayer/core": "8.3.3",
|
|
77
|
+
"@intlayer/types": "8.3.3"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@intlayer/api": "8.3.
|
|
81
|
-
"@intlayer/cli": "8.3.
|
|
82
|
-
"@types/node": "25.
|
|
80
|
+
"@intlayer/api": "8.3.3",
|
|
81
|
+
"@intlayer/cli": "8.3.3",
|
|
82
|
+
"@types/node": "25.5.0",
|
|
83
83
|
"@utils/ts-config": "1.0.4",
|
|
84
84
|
"@utils/ts-config-types": "1.0.4",
|
|
85
85
|
"@utils/tsdown-config": "1.0.4",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"rimraf": "6.1.3",
|
|
88
88
|
"tsdown": "0.21.2",
|
|
89
89
|
"typescript": "5.9.3",
|
|
90
|
-
"vitest": "4.0
|
|
90
|
+
"vitest": "4.1.0"
|
|
91
91
|
},
|
|
92
92
|
"engines": {
|
|
93
93
|
"node": ">=14.18"
|
package/docs/update_docs.py
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import re
|
|
3
|
-
|
|
4
|
-
locales = [
|
|
5
|
-
"ar", "de", "en", "en-GB", "es", "fr", "hi", "id", "it", "ja", "ko", "pl", "pt", "ru", "tr", "uk", "vi", "zh"
|
|
6
|
-
]
|
|
7
|
-
|
|
8
|
-
translations = {
|
|
9
|
-
"ar": {"cli_title": "الإعداد عبر واجهة سطر أوامر Intlayer (موصى به)"},
|
|
10
|
-
"de": {"cli_title": "Einrichtung über die Intlayer CLI (empfohlen)"},
|
|
11
|
-
"en": {"cli_title": "Setup via Intlayer CLI (recommended)"},
|
|
12
|
-
"en-GB": {"cli_title": "Setup via Intlayer CLI (recommended)"},
|
|
13
|
-
"es": {"cli_title": "Configuración a través de la CLI de Intlayer (recomendado)"},
|
|
14
|
-
"fr": {"cli_title": "Configuration via la CLI Intlayer (recommandé)"},
|
|
15
|
-
"hi": {"cli_title": "Intlayer CLI के माध्यम से सेटअप (अनुशंसित)"},
|
|
16
|
-
"id": {"cli_title": "Setup melalui CLI Intlayer (disarankan)"},
|
|
17
|
-
"it": {"cli_title": "Configurazione tramite la CLI di Intlayer (consigliata)"},
|
|
18
|
-
"ja": {"cli_title": "Intlayer CLI経由のセットアップ(推奨)"},
|
|
19
|
-
"ko": {"cli_title": "Intlayer CLI를 통한 설정 (권장)"},
|
|
20
|
-
"pl": {"cli_title": "Konfiguracja przez Intlayer CLI (zalecane)"},
|
|
21
|
-
"pt": {"cli_title": "Configuração via CLI do Intlayer (recomendado)"},
|
|
22
|
-
"ru": {"cli_title": "Настройка через Intlayer CLI (рекомендуется)"},
|
|
23
|
-
"tr": {"cli_title": "Intlayer CLI aracılığıyla kurulum (önerilen)"},
|
|
24
|
-
"uk": {"cli_title": "Налаштування через Intlayer CLI (рекомендовано)"},
|
|
25
|
-
"vi": {"cli_title": "Thiết lập qua Intlayer CLI (khuyên dùng)"},
|
|
26
|
-
"zh": {"cli_title": "通过 Intlayer CLI 设置(推荐)"}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
base_dir = "/Users/aymericpineau/Documents/intlayer_/docs/docs"
|
|
30
|
-
|
|
31
|
-
vsc_title = "## Setup via Intlayer VS Code extension"
|
|
32
|
-
|
|
33
|
-
for lang in locales:
|
|
34
|
-
file_path = os.path.join(base_dir, lang, "mcp_server.md")
|
|
35
|
-
if not os.path.exists(file_path):
|
|
36
|
-
continue
|
|
37
|
-
|
|
38
|
-
with open(file_path, "r", encoding="utf-8") as f:
|
|
39
|
-
content = f.read()
|
|
40
|
-
|
|
41
|
-
# Update title as requested
|
|
42
|
-
# Standardize titles even if translated before, because user explicitly asked for English title specifically.
|
|
43
|
-
# Pattern to find the section and ensure its title is exactly as requested
|
|
44
|
-
content = re.sub(r"## (Using|Utilisation|Uso|Installation|Einrichtung|إعداد|सेटअप|Setup|でのセットアップ|에서 설정|Konfiguracja|Configuração|Настройка|Kurulum|Thiết lập|通过).*VS Code.*extension.*", "## Setup via Intlayer VS Code extension", content)
|
|
45
|
-
|
|
46
|
-
# Standardize CLI titles too if they exist
|
|
47
|
-
trans = translations.get(lang)
|
|
48
|
-
if trans:
|
|
49
|
-
cli_pattern = r"## (Setup via Intlayer CLI|Configuration via la CLI Intlayer|Configuración a través de la CLI de Intlayer|Einrichtung über die Intlayer CLI|الإعداد عبر واجهة سطر أوامر|Intlayer CLI के माध्यम से|Setup attraverso la CLI|Intlayer CLI経由のセットアップ|Intlayer CLI를 통한 설정|Konfiguracja przez Intlayer CLI|Configuração via CLI|Настройка через Intlayer CLI|Intlayer CLI aracılığıyla|Налаштування через Intlayer CLI|Thiết lập qua Intlayer CLI|通过 Intlayer CLI 设置).*"
|
|
50
|
-
content = re.sub(cli_pattern, f"## {trans['cli_title']}", content)
|
|
51
|
-
|
|
52
|
-
# General updates
|
|
53
|
-
content = re.sub(r"updatedAt: \d{4}-\d{2}-\d{2}", "updatedAt: 2026-03-03", content)
|
|
54
|
-
content = re.sub(r"docs/docs/" + re.escape(lang) + r"/intlayer_cli\.md", "docs/docs/" + lang + "/cli/index.md", content)
|
|
55
|
-
|
|
56
|
-
# Fix Claude Desktop JSON block extra brace issue for all
|
|
57
|
-
# Pattern to fix the double closure if it exists
|
|
58
|
-
# If the file has ...}\n}\n}\n```, change to ...}\n}\n}\n}\n``` if it was meant to be 4 deep?
|
|
59
|
-
# Actually, Claude Desktop config uses "mcpServers": { "intlayer": { ... } } so it needs 3 closing braces for the object + 1 for file?
|
|
60
|
-
# Usually: { "mcpServers": { "intlayer": { ... } } } - so 3 braces at the end.
|
|
61
|
-
|
|
62
|
-
with open(file_path, "w", encoding="utf-8") as f:
|
|
63
|
-
f.write(content)
|
|
64
|
-
|
|
65
|
-
print("Done")
|