rsbuild-auto-i18n-plugin 1.1.11 → 1.1.12

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.12",
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.12"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@babel/types": "^7.23.0",