auto-i18n-plugin-core 1.1.14 → 1.1.16
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
- package/readme-en.md +10 -2
- package/readme.md +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auto-i18n-plugin-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"description": "vite, webpack automatic translation plugin core code.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@babel/generator": "^7.26.2",
|
|
36
36
|
"@babel/preset-env": "^7.23.2",
|
|
37
37
|
"@babel/preset-typescript": "^7.23.2",
|
|
38
|
+
"@babel/runtime": "^7.23.2",
|
|
38
39
|
"@vitalets/google-translate-api": "^9.2.0",
|
|
39
40
|
"axios": "^1.6.8",
|
|
40
41
|
"crypto-js": "^4.2.0",
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
"tunnel": "0.0.6"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
46
|
+
"@babel/plugin-transform-runtime": "^7.23.2",
|
|
45
47
|
"@babel/types": "^7.23.0",
|
|
46
48
|
"@rollup/plugin-alias": "^5.1.0",
|
|
47
49
|
"@rollup/plugin-babel": "^6.0.4",
|
|
@@ -60,6 +62,9 @@
|
|
|
60
62
|
"rollup-plugin-terser": "^7.0.2",
|
|
61
63
|
"typescript": "^5.1.6"
|
|
62
64
|
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=14.18.0"
|
|
67
|
+
},
|
|
63
68
|
"volta": {
|
|
64
69
|
"extends": "../../package.json"
|
|
65
70
|
},
|
package/readme-en.md
CHANGED
|
@@ -382,7 +382,7 @@ import '../lang/index.js' // 📍 Must be imported on the first line of the entr
|
|
|
382
382
|
| translatorOption | object | ❌ | `{}` | Translator options (lower priority than `translator`) |
|
|
383
383
|
| rewriteConfig | boolean | ❌ | `true` | Whether to rewrite config file on each plugin run |
|
|
384
384
|
| deepScan | boolean | ❌ | `false` | Experimental: Whether to perform deep string scanning |
|
|
385
|
-
| commonTranslateKey | string | ❌ | `''` |
|
|
385
|
+
| commonTranslateKey | string | ❌ | `''` | Common translation key for sharing language settings across multiple projects with different namespaces. When set, language switching will prioritize reading the language from localStorage using commonTranslateKey, enabling unified language management across projects |
|
|
386
386
|
| insertFileExtensions | string[] | ❌ | `[]` | List of file extensions to insert translation code into |
|
|
387
387
|
| isClear | boolean | ❌ | `false` | Whether to clear content not in context (clear source language key-value pairs not in context), only supported in build mode |
|
|
388
388
|
| isClearSpace | boolean | ❌ | `false` | Whether to remove whitespace from both ends of source strings, whitespace is preserved by default |
|
|
@@ -515,7 +515,15 @@ Original authors: wenps, xu-code, Caleb-Xu, Winfans
|
|
|
515
515
|
|
|
516
516
|
## Changelog
|
|
517
517
|
|
|
518
|
-
### v1.1.
|
|
518
|
+
### v1.1.15 (Recommended Version)
|
|
519
|
+
|
|
520
|
+
- Added Node 14 compatibility
|
|
521
|
+
|
|
522
|
+
### v1.1.14 (Recommended Version)
|
|
523
|
+
|
|
524
|
+
- Fixed rewriteConfig exception issue
|
|
525
|
+
|
|
526
|
+
### v1.1.13 (Not Recommended Version)
|
|
519
527
|
|
|
520
528
|
- Added JSON split configuration
|
|
521
529
|
|
package/readme.md
CHANGED
|
@@ -385,7 +385,7 @@ import '../lang/index.js' // 📍 必须在入口文件中第一行引入,文
|
|
|
385
385
|
| translatorOption | object | ❌ | `{}` | 翻译器的配置项,优先级低于`translator` |
|
|
386
386
|
| rewriteConfig | boolean | ❌ | `true` | 插件每次运行时是否重写配置文件 |
|
|
387
387
|
| deepScan | boolean | ❌ | `false` | 实验性属性,表示是否进行深层扫描字符串 |
|
|
388
|
-
| commonTranslateKey | string | ❌ | `''` | 通用翻译key
|
|
388
|
+
| commonTranslateKey | string | ❌ | `''` | 通用翻译key,用于多个不同命名空间的项目共享同一个语言设置。当设置该值后,语言切换会优先读取localStorage中commonTranslateKey对应的语言,实现跨项目的统一语言管理 |
|
|
389
389
|
| insertFileExtensions | string[] | ❌ | `[]` | 要插入翻译代码的文件扩展名列表 |
|
|
390
390
|
| isClear | boolean | ❌ | `false` | 是否清除已经不在上下文中的内容(清除项目中不再使用到的源语言键值对),仅仅支持打包模式下使用 |
|
|
391
391
|
| isClearSpace | boolean | ❌ | `false` | 是否清除源字符串中左右两边的空格,默认会保留空格 |
|
|
@@ -520,7 +520,15 @@ const HelloWorld: React.FC<HelloWorldProps> = ({ name = 'World' }) => {
|
|
|
520
520
|
|
|
521
521
|
## 更新日志
|
|
522
522
|
|
|
523
|
-
### v1.1.
|
|
523
|
+
### v1.1.15 (推荐版本)
|
|
524
|
+
|
|
525
|
+
- 补充node14兼容
|
|
526
|
+
|
|
527
|
+
### v1.1.14 (推荐版本)
|
|
528
|
+
|
|
529
|
+
- 修复rewriteConfig异常问题
|
|
530
|
+
|
|
531
|
+
### v1.1.13 (不推荐版本)
|
|
524
532
|
|
|
525
533
|
- 新增json拆分配置
|
|
526
534
|
|