daodou-command 1.4.1 → 1.4.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.
@@ -0,0 +1,13 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(tree:*)",
5
+ "Bash(git add:*)",
6
+ "Bash(git commit:*)",
7
+ "Bash(npm whoami:*)",
8
+ "Bash(npm publish)"
9
+ ],
10
+ "deny": [],
11
+ "ask": []
12
+ }
13
+ }
@@ -13,45 +13,45 @@
13
13
  <component name="Git.Settings">
14
14
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
15
15
  </component>
16
- <component name="GitHubPullRequestSearchHistory"><![CDATA[{
17
- "lastFilter": {
18
- "state": "OPEN",
19
- "assignee": "h025"
16
+ <component name="GitHubPullRequestSearchHistory">{
17
+ &quot;lastFilter&quot;: {
18
+ &quot;state&quot;: &quot;OPEN&quot;,
19
+ &quot;assignee&quot;: &quot;h025&quot;
20
20
  }
21
- }]]></component>
22
- <component name="GithubPullRequestsUISettings"><![CDATA[{
23
- "selectedUrlAndAccountId": {
24
- "url": "https://github.com/h025/daodou-command.git",
25
- "accountId": "c8b4f74c-2e36-4aad-b608-940f73fc88db"
21
+ }</component>
22
+ <component name="GithubPullRequestsUISettings">{
23
+ &quot;selectedUrlAndAccountId&quot;: {
24
+ &quot;url&quot;: &quot;https://github.com/h025/daodou-command.git&quot;,
25
+ &quot;accountId&quot;: &quot;c8b4f74c-2e36-4aad-b608-940f73fc88db&quot;
26
26
  }
27
- }]]></component>
28
- <component name="ProjectColorInfo"><![CDATA[{
29
- "associatedIndex": 6
30
- }]]></component>
27
+ }</component>
28
+ <component name="ProjectColorInfo">{
29
+ &quot;associatedIndex&quot;: 6
30
+ }</component>
31
31
  <component name="ProjectId" id="33EP70DuHXVnueD9LcTKpn8t7Vr" />
32
32
  <component name="ProjectViewState">
33
33
  <option name="hideEmptyMiddlePackages" value="true" />
34
34
  <option name="showLibraryContents" value="true" />
35
35
  </component>
36
- <component name="PropertiesComponent"><![CDATA[{
37
- "keyToString": {
38
- "ModuleVcsDetector.initialDetectionPerformed": "true",
39
- "RunOnceActivity.ShowReadmeOnStart": "true",
40
- "RunOnceActivity.git.unshallow": "true",
41
- "git-widget-placeholder": "main",
42
- "last_opened_file_path": "/Users/summermr/daodou/daodou-command",
43
- "node.js.detected.package.eslint": "true",
44
- "node.js.detected.package.tslint": "true",
45
- "node.js.selected.package.eslint": "(autodetect)",
46
- "node.js.selected.package.tslint": "(autodetect)",
47
- "nodejs_package_manager_path": "npm",
48
- "vue.rearranger.settings.migration": "true"
36
+ <component name="PropertiesComponent">{
37
+ &quot;keyToString&quot;: {
38
+ &quot;ModuleVcsDetector.initialDetectionPerformed&quot;: &quot;true&quot;,
39
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
40
+ &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
41
+ &quot;git-widget-placeholder&quot;: &quot;main&quot;,
42
+ &quot;last_opened_file_path&quot;: &quot;/Users/summermr/daodou/daodou-command&quot;,
43
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
44
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
45
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
46
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
47
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
48
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
49
49
  }
50
- }]]></component>
50
+ }</component>
51
51
  <component name="SharedIndexes">
52
52
  <attachedChunks>
53
53
  <set>
54
- <option value="bundled-js-predefined-d6986cc7102b-9c94529fcfe0-JavaScript-WS-252.26199.162" />
54
+ <option value="bundled-js-predefined-d6986cc7102b-3aa1da707db6-JavaScript-WS-252.27397.92" />
55
55
  </set>
56
56
  </attachedChunks>
57
57
  </component>
@@ -62,7 +62,8 @@
62
62
  <option name="number" value="Default" />
63
63
  <option name="presentableId" value="Default" />
64
64
  <updated>1758879086844</updated>
65
- <workItem from="1758879088110" duration="1148000" />
65
+ <workItem from="1758879088110" duration="1336000" />
66
+ <workItem from="1763003382850" duration="1926000" />
66
67
  </task>
67
68
  <servers />
68
69
  </component>
package/CHANGELOG.md CHANGED
@@ -5,7 +5,27 @@
5
5
  格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),
6
6
  并且此项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
7
7
 
8
- ## [1.4.1]
8
+
9
+ ## [1.4.3] - 2025-11-13
10
+
11
+ ### 修复
12
+ - 修复语言代码映射问题,正确识别 `tw` 为繁体中文(台湾)
13
+ - 明确 `zh` 语言代码映射为简体中文
14
+ - 更新所有7个翻译引擎的语言代码映射规则:
15
+ - Microsoft Translator: `tw` -> `zh-Hant` (繁体中文)
16
+ - Google Translator: `tw` -> `zh-tw` (繁体中文)
17
+ - Baidu Translator: `tw` -> `cht` (繁体中文)
18
+ - Ali Translator: `tw` -> `zh` (中文)
19
+ - Youdao Translator: `tw` -> `zh-CHT` (繁体中文)
20
+ - DeepL Translator: `tw` -> `ZH` (中文)
21
+ - OpenAI Translator: `tw` -> `繁体中文`,`zh` -> `简体中文`
22
+
23
+ ## [1.4.2] - 2025-09-26
24
+
25
+ ### 修复
26
+ - 清理代理功能相关代码,移除已废弃的代理统计信息输出
27
+
28
+ ## [1.4.1] - 2025-09-26
9
29
 
10
30
  ### 修复
11
31
  - 移除翻译服务初始化时的冗余输出信息,提升用户体验
@@ -150,8 +150,6 @@ class LangCommand {
150
150
  console.log(chalk.yellow(` ⏭️ 跳过: ${skipCount} 个语言`));
151
151
  console.log(chalk.red(` ❌ 失败: ${failCount} 个语言`));
152
152
 
153
- // 显示代理统计信息
154
- this.translationService.showProxyStats();
155
153
 
156
154
  console.log(chalk.blue('\n📋 翻译结果汇总:'));
157
155
  console.log(chalk.gray(`原文: "${finalValue}"`));
@@ -184,25 +184,6 @@ class TranslationService {
184
184
  return status.sort((a, b) => a.priority - b.priority);
185
185
  }
186
186
 
187
- /**
188
- * 获取代理统计信息(已禁用)
189
- * @returns {object} 代理统计信息
190
- */
191
- getProxyStats() {
192
- return {
193
- totalProxies: 0,
194
- currentIndex: 0,
195
- hasProxies: false,
196
- message: '代理功能已禁用,直接使用微软翻译'
197
- };
198
- }
199
-
200
- /**
201
- * 重置代理列表(已禁用)
202
- */
203
- async resetProxies() {
204
- console.log(chalk.yellow('代理功能已禁用,直接使用微软翻译'));
205
- }
206
187
  }
207
188
 
208
189
  module.exports = TranslationService;
@@ -272,6 +272,7 @@ class AliTranslator extends BaseTranslator {
272
272
  'zh': 'zh',
273
273
  'zh-CN': 'zh',
274
274
  'zh-TW': 'zh',
275
+ 'tw': 'zh',
275
276
  'en': 'en',
276
277
  'ja': 'ja',
277
278
  'ko': 'ko',
@@ -155,6 +155,7 @@ class BaiduTranslator extends BaseTranslator {
155
155
  'zh': 'zh',
156
156
  'zh-CN': 'zh',
157
157
  'zh-TW': 'cht',
158
+ 'tw': 'cht',
158
159
  'en': 'en',
159
160
  'ja': 'jp',
160
161
  'ko': 'kor',
@@ -159,6 +159,7 @@ class DeeplTranslator extends BaseTranslator {
159
159
  'zh': 'ZH',
160
160
  'zh-CN': 'ZH',
161
161
  'zh-TW': 'ZH',
162
+ 'tw': 'ZH',
162
163
  'en': 'EN',
163
164
  'ja': 'JA',
164
165
  'ko': 'KO',
@@ -241,6 +241,7 @@ class GoogleTranslator extends BaseTranslator {
241
241
  'zh': 'zh-cn',
242
242
  'zh-CN': 'zh-cn',
243
243
  'zh-TW': 'zh-tw',
244
+ 'tw': 'zh-tw',
244
245
  'auto': 'auto'
245
246
  };
246
247
 
@@ -137,6 +137,7 @@ class MicrosoftTranslator extends BaseTranslator {
137
137
  'zh': LANG_CODES.CHINESE_SIMPLIFIED,
138
138
  'zh-CN': LANG_CODES.CHINESE_SIMPLIFIED,
139
139
  'zh-TW': LANG_CODES.CHINESE_TRADITIONAL,
140
+ 'tw': LANG_CODES.CHINESE_TRADITIONAL,
140
141
  'en': LANG_CODES.ENGLISH,
141
142
  'ja': LANG_CODES.JAPANESE,
142
143
  'ko': LANG_CODES.KOREAN,
@@ -263,9 +263,10 @@ ${htmlContent}`;
263
263
  */
264
264
  getLanguageName(langCode) {
265
265
  const langNames = {
266
- 'zh': '中文',
266
+ 'zh': '简体中文',
267
267
  'zh-CN': '简体中文',
268
268
  'zh-TW': '繁体中文',
269
+ 'tw': '繁体中文',
269
270
  'en': '英文',
270
271
  'ja': '日文',
271
272
  'ko': '韩文',
@@ -172,6 +172,7 @@ class YoudaoTranslator extends BaseTranslator {
172
172
  'zh': 'zh-CHS',
173
173
  'zh-CN': 'zh-CHS',
174
174
  'zh-TW': 'zh-CHT',
175
+ 'tw': 'zh-CHT',
175
176
  'en': 'en',
176
177
  'ja': 'ja',
177
178
  'ko': 'ko',
@@ -114,24 +114,6 @@ class TranslationService {
114
114
  return languageNames[langCode] || langCode.toUpperCase();
115
115
  }
116
116
 
117
- /**
118
- * 获取代理统计信息
119
- * @returns {Object} 统计信息
120
- */
121
- getProxyStats() {
122
- return this.translationService.getProxyStats();
123
- }
124
-
125
- /**
126
- * 显示代理统计信息
127
- */
128
- showProxyStats() {
129
- const stats = this.getProxyStats();
130
- console.log(chalk.blue('\n📊 代理服务器统计:'));
131
- console.log(chalk.gray(` 总代理数: ${stats.totalProxies}`));
132
- console.log(chalk.gray(` 当前索引: ${stats.currentIndex}`));
133
- console.log(chalk.gray(` 有代理: ${stats.hasProxies ? '是' : '否'}`));
134
- }
135
117
 
136
118
  /**
137
119
  * 获取引擎状态
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "daodou-command",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "刀豆命令行工具 - 自动化构建和部署",
5
5
  "main": "index.js",
6
6
  "bin": {