i18n-sync-mcp-server 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -63,7 +63,9 @@ npx i18n-sync-mcp-server
63
63
 
64
64
  将本地映射和多语言翻译同步到远程语言包服务。
65
65
 
66
- **重要**:上传时至少需要包含英文翻译(en-US)。
66
+ **重要**:
67
+ 1. 上传时至少需要包含英文翻译(en-US)
68
+ 2. 上传成功后,需要前往 **Hwork 开放平台 - 多语言翻译**,点击【同步】按钮,将翻译同步到语言包后才能在应用中生效
67
69
 
68
70
  **参数:**
69
71
 
@@ -80,8 +82,8 @@ npx i18n-sync-mcp-server
80
82
  ```javascript
81
83
  {
82
84
  "mappings": [
83
- { "text": "新增", "key": "ML_chain_app_3APV9EU0HUVC9OX" },
84
- { "text": "编辑", "key": "ML_chain_app_3APODM6S81RFP9W" }
85
+ { "text": "新增", "key": "ML_chain_app_order_001" },
86
+ { "text": "编辑", "key": "ML_chain_app_order_002" }
85
87
  ]
86
88
  }
87
89
  ```
@@ -90,8 +92,8 @@ npx i18n-sync-mcp-server
90
92
  ```typescript
91
93
  // zh-CN.ts
92
94
  export default {
93
- 'ML_chain_app_3APV9EU0HUVC9OX': '新增',
94
- 'ML_chain_app_3APODM6S81RFP9W': '编辑',
95
+ 'ML_chain_app_order_001': '新增',
96
+ 'ML_chain_app_order_002': '编辑',
95
97
  } as Record<string, string>
96
98
  ```
97
99
 
@@ -102,7 +104,7 @@ export default {
102
104
  "mappings": [
103
105
  {
104
106
  "text": "新增",
105
- "key": "ML_chain_app_3APV9EU0HUVC9OX",
107
+ "key": "ML_chain_app_order_001",
106
108
  "translations": {
107
109
  "en-US": "Add",
108
110
  "th-TH": "เพิ่ม",
@@ -111,7 +113,7 @@ export default {
111
113
  },
112
114
  {
113
115
  "text": "编辑",
114
- "key": "ML_chain_app_3APODM6S81RFP9W",
116
+ "key": "ML_chain_app_order_002",
115
117
  "translations": {
116
118
  "en-US": "Edit",
117
119
  "th-TH": "แก้ไข",
@@ -8,8 +8,6 @@
8
8
 
9
9
  const http = require('http');
10
10
  const https = require('https');
11
- const fs = require('fs');
12
- const path = require('path');
13
11
 
14
12
  // ============= 配置区域(通过环境变量配置) =============
15
13
  const CONFIG = {
@@ -148,7 +146,7 @@ class MCPServer {
148
146
  text: JSON.stringify({
149
147
  success: false,
150
148
  message: '请配置 I18N_API_KEY 环境变量',
151
- hint: '在项目根目录的 .env 文件或系统环境变量中设置'
149
+ hint: ' MCP 配置文件(~/.kiro/settings/mcp.json 或 .kiro/settings/mcp.json)的 env 字段中设置'
152
150
  }, null, 2)
153
151
  }]
154
152
  };
@@ -161,7 +159,7 @@ class MCPServer {
161
159
  text: JSON.stringify({
162
160
  success: false,
163
161
  message: '请配置 I18N_APP_CODE 环境变量',
164
- hint: '这是 applicationCode,用于标识所属子产品'
162
+ hint: ' MCP 配置文件的 env 字段中设置,这是 applicationCode,用于标识所属子产品'
165
163
  }, null, 2)
166
164
  }]
167
165
  };
@@ -174,7 +172,7 @@ class MCPServer {
174
172
  text: JSON.stringify({
175
173
  success: false,
176
174
  message: '请配置 I18N_KEY_PREFIX 环境变量',
177
- hint: '这是编码前缀,如 ML_chain_app_,远程会自动拼接'
175
+ hint: ' MCP 配置文件的 env 字段中设置,这是编码前缀,如 ML_chain_app_,远程会自动拼接'
178
176
  }, null, 2)
179
177
  }]
180
178
  };
@@ -287,7 +285,8 @@ class MCPServer {
287
285
  errors: data.excelParseResultVOList || [],
288
286
  keyPrefix: CONFIG.keyPrefix,
289
287
  mappings: resultMappings,
290
- curlCommand: curlCommand
288
+ curlCommand: curlCommand,
289
+ nextStep: '⚠️ 重要提示:请前往 Hwork 开放平台 - 多语言翻译,点击【同步】按钮,将翻译同步到语言包后才能在应用中生效。'
291
290
  }, null, 2)
292
291
  }]
293
292
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18n-sync-mcp-server",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server for syncing i18n mappings to remote service",
5
5
  "main": "i18n-sync-server.cjs",
6
6
  "bin": {