rsbuild-auto-i18n-plugin 1.1.11 → 1.1.13

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 CHANGED
@@ -114,6 +114,7 @@ function rsbuildPluginsAutoI18n(optionInfo) {
114
114
  });
115
115
  // 构建结束后:批量翻译并统一输出
116
116
  api.onAfterBuild(async () => {
117
+ console.info('构建阶段批量翻译');
117
118
  await autoI18nPluginCore.translateUtils.runAutoTranslateBatch();
118
119
  });
119
120
  // 构建完全结束:清理并按需写入主文件(避免空写入)
@@ -122,7 +123,6 @@ function rsbuildPluginsAutoI18n(optionInfo) {
122
123
  if (autoI18nPluginCore.translateUtils.hasTranslationChanges) {
123
124
  await autoI18nPluginCore.fileUtils.buildSetLangConfigToIndexFile();
124
125
  }
125
- // 不在此处重复打印“翻译完成”,已由 runAutoTranslateBatch 统一输出
126
126
  });
127
127
  // 开发服务器关闭时也需要清理并按需写入
128
128
  api.onCloseDevServer(async () => {
@@ -130,6 +130,7 @@ function rsbuildPluginsAutoI18n(optionInfo) {
130
130
  if (autoI18nPluginCore.translateUtils.hasTranslationChanges) {
131
131
  await autoI18nPluginCore.fileUtils.buildSetLangConfigToIndexFile();
132
132
  }
133
+ console.info('开发服务器关闭,翻译完成✔');
133
134
  });
134
135
  }
135
136
  };
package/dist/index.mjs CHANGED
@@ -92,6 +92,7 @@ function rsbuildPluginsAutoI18n(optionInfo) {
92
92
  });
93
93
  // 构建结束后:批量翻译并统一输出
94
94
  api.onAfterBuild(async () => {
95
+ console.info('构建阶段批量翻译');
95
96
  await translateUtils.runAutoTranslateBatch();
96
97
  });
97
98
  // 构建完全结束:清理并按需写入主文件(避免空写入)
@@ -100,7 +101,6 @@ function rsbuildPluginsAutoI18n(optionInfo) {
100
101
  if (translateUtils.hasTranslationChanges) {
101
102
  await fileUtils.buildSetLangConfigToIndexFile();
102
103
  }
103
- // 不在此处重复打印“翻译完成”,已由 runAutoTranslateBatch 统一输出
104
104
  });
105
105
  // 开发服务器关闭时也需要清理并按需写入
106
106
  api.onCloseDevServer(async () => {
@@ -108,6 +108,7 @@ function rsbuildPluginsAutoI18n(optionInfo) {
108
108
  if (translateUtils.hasTranslationChanges) {
109
109
  await fileUtils.buildSetLangConfigToIndexFile();
110
110
  }
111
+ console.info('开发服务器关闭,翻译完成✔');
111
112
  });
112
113
  }
113
114
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsbuild-auto-i18n-plugin",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "description": "Rsbuild automatic translation plugin compatible with Rspack",
5
5
  "keywords": [
6
6
  "i18n",
@@ -34,7 +34,7 @@
34
34
  "@babel/core": "^7.23.2",
35
35
  "@babel/preset-env": "^7.23.2",
36
36
  "@babel/preset-typescript": "^7.23.2",
37
- "auto-i18n-plugin-core": "1.1.11"
37
+ "auto-i18n-plugin-core": "1.1.13"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@babel/types": "^7.23.0",
package/readme-en.md CHANGED
@@ -55,7 +55,7 @@ npm install vite-auto-i18n-plugin --save-dev
55
55
  yarn add vite-auto-i18n-plugin --dev
56
56
  ```
57
57
 
58
- #### **🛠️ Webpack Project:**
58
+ #### **🛠️ Webpack Project (Compatible with Webpack 4/5):**
59
59
 
60
60
  ```bash
61
61
  npm install webpack-auto-i18n-plugin --save-dev
@@ -506,12 +506,22 @@ Since v1.0.5, simply import the generated `index.js` in your entry file - no nee
506
506
 
507
507
  Original authors: wenps, xu-code, Caleb-Xu, Winfans
508
508
 
509
+ ## Changelog
510
+
511
+ ### v1.1.12 (Recommended Version)
512
+
513
+ - Optimized console output format
514
+
515
+ ### v1.1.11 (Recommended Version)
516
+
517
+ - Optimized console output format, reduced redundant printing
518
+ - Added translation progress bar display
519
+ - Support for Webpack 4
520
+
509
521
  ### v1.1.10 (Recommended Version)
510
522
 
511
523
  - Added rsbuild plugin
512
524
 
513
- ## Changelog
514
-
515
525
  ### v1.1.9 (Recommended Version)
516
526
 
517
527
  - Fixed issue where deepScan string splitting wasn't handling line breaks and other special characters
package/readme.md CHANGED
@@ -57,7 +57,7 @@ npm install vite-auto-i18n-plugin --save-dev
57
57
  yarn add vite-auto-i18n-plugin --dev
58
58
  ```
59
59
 
60
- #### **🛠️ Webpack 项目:**
60
+ #### **🛠️ Webpack 项目 (兼容 Webpack 4/5):**
61
61
 
62
62
  ```bash
63
63
  npm install webpack-auto-i18n-plugin --save-dev
@@ -513,6 +513,16 @@ const HelloWorld: React.FC<HelloWorldProps> = ({ name = 'World' }) => {
513
513
 
514
514
  ## 更新日志
515
515
 
516
+ ### v1.1.12 (推荐版本)
517
+
518
+ - 优化控制台输出格式
519
+
520
+ ### v1.1.11 (推荐版本)
521
+
522
+ - 优化控制台输出格式,减少冗余打印
523
+ - 新增翻译进度条显示
524
+ - 支持 Webpack 4
525
+
516
526
  ### v1.1.10 (推荐版本)
517
527
 
518
528
  - 新增 rsbuild 插件