@i18n-agent/mcp-client 1.0.1 โ†’ 1.0.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,218 @@
1
+ # Contributing to i18n-agent MCP Client
2
+
3
+ Thank you for your interest in contributing to the i18n-agent MCP client! We welcome contributions from the community.
4
+
5
+ ## ๐Ÿš€ Quick Start
6
+
7
+ 1. **Fork the repository** on GitHub
8
+ 2. **Clone your fork** locally:
9
+ ```bash
10
+ git clone https://github.com/YOUR_USERNAME/mcp-client.git
11
+ cd mcp-client
12
+ ```
13
+ 3. **Create a feature branch**:
14
+ ```bash
15
+ git checkout -b feature/your-feature-name
16
+ ```
17
+
18
+ ## ๐Ÿ›  Development Setup
19
+
20
+ ### Prerequisites
21
+ - Node.js 16+
22
+ - npm or yarn
23
+ - Git
24
+
25
+ ### Local Development
26
+ ```bash
27
+ # Install dependencies (if any are added)
28
+ npm install
29
+
30
+ # Run tests
31
+ npm test
32
+
33
+ # Test the installer locally
34
+ node install.js
35
+
36
+ # Test MCP client syntax
37
+ node -c mcp-client.js
38
+ ```
39
+
40
+ ## ๐Ÿ“ Types of Contributions
41
+
42
+ ### ๐Ÿ› Bug Reports
43
+ - Use the [GitHub Issues](https://github.com/i18n-agent/mcp-client/issues) page
44
+ - Include steps to reproduce
45
+ - Mention your OS, IDE, and Node.js version
46
+ - Include error messages and logs
47
+
48
+ ### ๐Ÿ’ก Feature Requests
49
+ - Check existing issues first
50
+ - Describe the use case and expected behavior
51
+ - Consider backward compatibility
52
+
53
+ ### ๐Ÿ”ง Code Contributions
54
+
55
+ #### Areas for Contribution:
56
+ - **IDE Support**: Add support for new AI IDEs
57
+ - **Installation**: Improve cross-platform compatibility
58
+ - **Error Handling**: Better error messages and recovery
59
+ - **Documentation**: Improve README, add examples
60
+ - **Testing**: Add more test cases
61
+ - **Localization**: Translate installation messages
62
+
63
+ ## ๐Ÿงช Testing
64
+
65
+ Before submitting a PR, ensure:
66
+
67
+ ```bash
68
+ # Run the test suite
69
+ npm test
70
+
71
+ # Test installation process
72
+ node install.js
73
+
74
+ # Check for syntax errors
75
+ node -c mcp-client.js
76
+ node -c install.js
77
+ ```
78
+
79
+ ### Test Coverage Areas:
80
+ - โœ… Configuration generation
81
+ - โœ… IDE detection
82
+ - โœ… File validation
83
+ - โœ… Package.json validation
84
+ - โœ… MCP client syntax
85
+ - ๐Ÿ”ง Cross-platform testing needed
86
+ - ๐Ÿ”ง Error condition testing needed
87
+
88
+ ## ๐Ÿ“‹ Coding Standards
89
+
90
+ ### JavaScript Style
91
+ - Use ES6+ modules (`import`/`export`)
92
+ - Use modern JavaScript features
93
+ - Add JSDoc comments for functions
94
+ - Use descriptive variable names
95
+
96
+ ### Security
97
+ - **Never commit API keys** or secrets
98
+ - Use environment variables for configuration
99
+ - Validate user input
100
+ - Handle errors gracefully
101
+
102
+ ### Example Code Style:
103
+ ```javascript
104
+ /**
105
+ * Detect available AI IDEs on the system
106
+ * @returns {Promise<Array>} List of available IDEs with config paths
107
+ */
108
+ async function detectAvailableIDEs() {
109
+ const available = [];
110
+
111
+ for (const [key, config] of Object.entries(IDE_CONFIGS)) {
112
+ const configDir = path.dirname(config.configPath);
113
+ if (fs.existsSync(configDir)) {
114
+ available.push({ key, ...config });
115
+ }
116
+ }
117
+
118
+ return available;
119
+ }
120
+ ```
121
+
122
+ ## ๐Ÿšฆ Pull Request Process
123
+
124
+ 1. **Create a feature branch** from `main`
125
+ 2. **Make your changes** with clear, focused commits
126
+ 3. **Add tests** if applicable
127
+ 4. **Update documentation** if needed
128
+ 5. **Run tests** and ensure they pass
129
+ 6. **Create a Pull Request** with:
130
+ - Clear title and description
131
+ - Reference any related issues
132
+ - Include testing steps
133
+
134
+ ### PR Title Format:
135
+ - `feat: add support for WebStorm IDE`
136
+ - `fix: handle Windows path separators correctly`
137
+ - `docs: improve installation instructions`
138
+ - `test: add cross-platform installation tests`
139
+
140
+ ## ๐ŸŒŸ Adding IDE Support
141
+
142
+ To add support for a new AI IDE:
143
+
144
+ 1. **Add IDE config** to `IDE_CONFIGS` in `install.js`:
145
+ ```javascript
146
+ newIDE: {
147
+ name: 'New IDE Name',
148
+ configPath: path.join(os.homedir(), '.newIDE/mcp_config.json'),
149
+ displayPath: '~/.newIDE/mcp_config.json'
150
+ }
151
+ ```
152
+
153
+ 2. **Add configuration logic** if the IDE uses a different config format
154
+
155
+ 3. **Test on the target platform**
156
+
157
+ 4. **Update README** with IDE support information
158
+
159
+ ## ๐Ÿ› Debugging
160
+
161
+ ### Common Issues:
162
+ - **Permission errors**: Check file permissions for config directories
163
+ - **Path issues**: Ensure paths work on Windows/macOS/Linux
164
+ - **JSON parsing**: Validate config file structure
165
+ - **Node.js version**: Ensure compatibility with Node 16+
166
+
167
+ ### Debug Environment Variables:
168
+ ```bash
169
+ # Enable verbose logging (if implemented)
170
+ DEBUG=i18n-agent:* node install.js
171
+
172
+ # Test with different home directories
173
+ HOME=/tmp/test-home node install.js
174
+ ```
175
+
176
+ ## ๐Ÿ“š Documentation
177
+
178
+ ### README Updates
179
+ - Keep installation instructions current
180
+ - Add new IDE support to the table
181
+ - Update feature lists
182
+ - Include troubleshooting for new scenarios
183
+
184
+ ### Code Comments
185
+ - Document complex logic
186
+ - Explain IDE-specific quirks
187
+ - Add TODO comments for future improvements
188
+
189
+ ## ๐ŸŒ Internationalization
190
+
191
+ We welcome contributions to translate the installer messages:
192
+
193
+ 1. **Add language files** in `locales/` directory
194
+ 2. **Use i18n library** for message formatting
195
+ 3. **Test with different system locales**
196
+
197
+ ## โš–๏ธ License
198
+
199
+ By contributing, you agree that your contributions will be licensed under the MIT License.
200
+
201
+ ## ๐Ÿ†˜ Getting Help
202
+
203
+ - **GitHub Issues**: https://github.com/i18n-agent/mcp-client/issues
204
+ - **Discord**: [Join our community](https://discord.gg/i18nagent)
205
+ - **Email**: support@i18nagent.ai
206
+
207
+ ## ๐ŸŽ‰ Recognition
208
+
209
+ Contributors will be:
210
+ - Listed in the README
211
+ - Mentioned in release notes
212
+ - Invited to our contributors Discord channel
213
+
214
+ Thank you for helping make i18n-agent better for everyone! ๐ŸŒŸ
215
+
216
+ ---
217
+
218
+ Made with โค๏ธ by the i18n-agent community
package/README.md CHANGED
@@ -30,7 +30,7 @@ i18n-agent-install
30
30
 
31
31
  ## ๐Ÿ”‘ Setup API Key
32
32
 
33
- 1. **Get your API key** from [i18nagent.ai/dashboard](https://i18nagent.ai/dashboard)
33
+ 1. **Get your API key** from [app.i18nagent.ai](https://app.i18nagent.ai)
34
34
 
35
35
  2. **Set environment variable**:
36
36
  ```bash
@@ -77,36 +77,45 @@ List supported languages with quality ratings
77
77
 
78
78
  ## ๐ŸŒ Language Support
79
79
 
80
- ### Tier 1 - Production Ready (80-90% Quality)
80
+ ### Tier 1 - Excellent Quality
81
81
  - **en**: English
82
- - **es**: Spanish
83
82
  - **fr**: French
84
83
  - **de**: German
84
+ - **es**: Spanish
85
85
  - **it**: Italian
86
86
  - **pt**: Portuguese
87
- - **nl**: Dutch
88
-
89
- ### Tier 2 - Production Viable (50-75% Quality)
90
87
  - **ru**: Russian
91
- - **zh-CN**: Chinese (Simplified)
92
88
  - **ja**: Japanese
93
89
  - **ko**: Korean
90
+ - **zh-CN**: Chinese (Simplified)
91
+
92
+ ### Tier 2 - High Quality
93
+ - **nl**: Dutch
94
+ - **pl**: Polish
95
+ - **cs**: Czech
94
96
  - **ar**: Arabic
95
97
  - **he**: Hebrew
96
98
  - **hi**: Hindi
97
- - **pl**: Polish
98
- - **cs**: Czech
99
-
100
- ### Tier 3 - Basic Support (20-50% Quality)
101
99
  - **zh-TW**: Chinese (Traditional)
102
- - **th**: Thai
103
- - **vi**: Vietnamese
104
100
  - **sv**: Swedish
105
101
  - **da**: Danish
106
102
  - **no**: Norwegian
107
103
  - **fi**: Finnish
104
+
105
+ ### Tier 3 - Good Quality
108
106
  - **tr**: Turkish
109
107
  - **hu**: Hungarian
108
+ - **th**: Thai
109
+ - **vi**: Vietnamese
110
+ - **uk**: Ukrainian
111
+ - **bg**: Bulgarian
112
+ - **ro**: Romanian
113
+ - **hr**: Croatian
114
+ - **sk**: Slovak
115
+ - **sl**: Slovenian
116
+ - **et**: Estonian
117
+ - **lv**: Latvian
118
+ - **lt**: Lithuanian
110
119
 
111
120
  ## ๐Ÿ“ Supported File Formats
112
121
 
@@ -243,12 +252,12 @@ npm test
243
252
 
244
253
  MIT License - see [LICENSE](LICENSE) file for details.
245
254
 
246
- Copyright (c) 2024 FatCouple Oรœ
255
+ Copyright (c) 2025 FatCouple Oรœ
247
256
 
248
257
  ## ๐Ÿ”— Links
249
258
 
250
259
  - **Website**: [i18nagent.ai](https://i18nagent.ai)
251
- - **Dashboard**: [i18nagent.ai/dashboard](https://i18nagent.ai/dashboard)
260
+ - **Dashboard**: [app.i18nagent.ai](https://app.i18nagent.ai)
252
261
  - **Documentation**: [docs.i18nagent.ai](https://docs.i18nagent.ai)
253
262
  - **GitHub**: [github.com/i18n-agent/mcp-client](https://github.com/i18n-agent/mcp-client)
254
263
  - **Issues**: [github.com/i18n-agent/mcp-client/issues](https://github.com/i18n-agent/mcp-client/issues)
@@ -261,4 +270,4 @@ Copyright (c) 2024 FatCouple Oรœ
261
270
 
262
271
  ---
263
272
 
264
- Made with โค๏ธ by [FatCouple Oรœ](https://fatcouple.com)
273
+ Made with โค๏ธ by [FatCouple Oรœ](https://fireinbelly.com)
package/install.js CHANGED
@@ -179,7 +179,7 @@ For manual setup instructions, visit: https://docs.i18nagent.ai/setup
179
179
  โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
180
180
  You need to set your API key to use the translation service:
181
181
 
182
- 1. Get your API key from: https://i18nagent.ai/dashboard
182
+ 1. Get your API key from: https://app.i18nagent.ai
183
183
  2. Set it as an environment variable:
184
184
 
185
185
  export API_KEY=your-api-key-here
package/mcp-client.js CHANGED
@@ -36,7 +36,7 @@ const API_KEY = process.env.API_KEY;
36
36
  // Validate required environment variables
37
37
  if (!API_KEY) {
38
38
  console.error('โŒ Error: API_KEY environment variable is required');
39
- console.error('๐Ÿ’ก Get your API key from: https://i18nagent.ai/dashboard');
39
+ console.error('๐Ÿ’ก Get your API key from: https://app.i18nagent.ai');
40
40
  console.error('๐Ÿ’ก Set it with: export API_KEY=your-api-key-here');
41
41
  process.exit(1);
42
42
  }
@@ -273,38 +273,47 @@ async function handleTranslateText(args) {
273
273
  async function handleListLanguages(args) {
274
274
  const { includeQuality = true } = args;
275
275
 
276
- // Language support matrix based on GPT-OSS analysis
276
+ // Language support matrix based on translation quality
277
277
  const languages = {
278
- 'Tier 1 - Production Ready (Excellent Quality 80-90%)': {
278
+ 'Tier 1 - Excellent Quality': {
279
279
  'en': 'English',
280
- 'es': 'Spanish',
281
280
  'fr': 'French',
282
281
  'de': 'German',
282
+ 'es': 'Spanish',
283
283
  'it': 'Italian',
284
284
  'pt': 'Portuguese',
285
- 'nl': 'Dutch',
286
- },
287
- 'Tier 2 - Production Viable (Good Quality 50-75%)': {
288
285
  'ru': 'Russian',
289
- 'zh-CN': 'Chinese (Simplified)',
290
286
  'ja': 'Japanese',
291
287
  'ko': 'Korean',
288
+ 'zh-CN': 'Chinese (Simplified)',
289
+ },
290
+ 'Tier 2 - High Quality': {
291
+ 'nl': 'Dutch',
292
+ 'pl': 'Polish',
293
+ 'cs': 'Czech',
292
294
  'ar': 'Arabic',
293
295
  'he': 'Hebrew',
294
296
  'hi': 'Hindi',
295
- 'pl': 'Polish',
296
- 'cs': 'Czech',
297
- },
298
- 'Tier 3 - Basic Support (Use with Caution 20-50%)': {
299
297
  'zh-TW': 'Chinese (Traditional)',
300
- 'th': 'Thai',
301
- 'vi': 'Vietnamese',
302
298
  'sv': 'Swedish',
303
299
  'da': 'Danish',
304
300
  'no': 'Norwegian',
305
301
  'fi': 'Finnish',
302
+ },
303
+ 'Tier 3 - Good Quality': {
306
304
  'tr': 'Turkish',
307
305
  'hu': 'Hungarian',
306
+ 'th': 'Thai',
307
+ 'vi': 'Vietnamese',
308
+ 'uk': 'Ukrainian',
309
+ 'bg': 'Bulgarian',
310
+ 'ro': 'Romanian',
311
+ 'hr': 'Croatian',
312
+ 'sk': 'Slovak',
313
+ 'sl': 'Slovenian',
314
+ 'et': 'Estonian',
315
+ 'lv': 'Latvian',
316
+ 'lt': 'Lithuanian',
308
317
  },
309
318
  };
310
319
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i18n-agent/mcp-client",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "MCP client for i18n-agent translation service - supports Claude, Cursor, VS Code, and other AI IDEs",
5
5
  "main": "mcp-client.js",
6
6
  "bin": {
@@ -44,7 +44,8 @@
44
44
  "mcp-client.js",
45
45
  "install.js",
46
46
  "README.md",
47
- "LICENSE"
47
+ "LICENSE",
48
+ "CONTRIBUTING.md"
48
49
  ],
49
50
  "publishConfig": {
50
51
  "access": "public"