Skip to content

Commit 831bd88

Browse files
committed
Rename project from translator-gemini to translator-ai
Updated all references including: - Package name and repository URLs - Binary names (translator-ai, translator-ai-mcp) - Cache directory paths - Documentation and examples - Test cases and source code
1 parent 3e0b671 commit 831bd88

File tree

14 files changed

+181
-54
lines changed

14 files changed

+181
-54
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- No API costs - runs entirely on local hardware
1919

2020
- **Model Context Protocol (MCP)**: Added MCP server for Claude Desktop integration
21-
- New `translator-gemini-mcp` binary for MCP server
21+
- New `translator-ai-mcp` binary for MCP server
2222
- Supports both Gemini and Ollama providers via environment variable
2323
- Enables direct file translation within Claude conversations
2424

@@ -63,9 +63,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6363
### Added
6464
- GitHub Actions workflow for automated npm publishing
6565
- Cross-platform cache directory support
66-
- Windows: `%APPDATA%\translator-gemini\`
67-
- macOS: `~/Library/Caches/translator-gemini/`
68-
- Linux: `~/.cache/translator-gemini/`
66+
- Windows: `%APPDATA%\translator-ai\`
67+
- macOS: `~/Library/Caches/translator-ai/`
68+
- Linux: `~/.cache/translator-ai/`
6969

7070
### Fixed
7171
- Build issues with postbuild script

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# translator-gemini
1+
# translator-ai
22

33
[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-support-yellow?style=flat-square&logo=buy-me-a-coffee)](https://coff.ee/datanoisetv)
44

@@ -20,13 +20,13 @@ Fast and efficient JSON i18n translator powered by Google Gemini API with increm
2020
### Global Installation (Recommended)
2121

2222
```bash
23-
npm install -g translator-gemini
23+
npm install -g translator-ai
2424
```
2525

2626
### Local Installation
2727

2828
```bash
29-
npm install translator-gemini
29+
npm install translator-ai
3030
```
3131

3232
## Configuration
@@ -52,7 +52,7 @@ For completely local translation without API costs:
5252
```
5353
3. Use the `--provider ollama` flag:
5454
```bash
55-
translator-gemini source.json -l es -o spanish.json --provider ollama
55+
translator-ai source.json -l es -o spanish.json --provider ollama
5656
```
5757

5858
## Usage
@@ -187,9 +187,9 @@ Example: If 10 files share 50% of their strings, you save ~50% on API calls!
187187

188188
### Default Cache Locations
189189

190-
- **Windows**: `%APPDATA%\translator-gemini\translation-cache.json`
191-
- **macOS**: `~/Library/Caches/translator-gemini/translation-cache.json`
192-
- **Linux**: `~/.cache/translator-gemini/translation-cache.json`
190+
- **Windows**: `%APPDATA%\translator-ai\translation-cache.json`
191+
- **macOS**: `~/Library/Caches/translator-ai/translation-cache.json`
192+
- **Linux**: `~/.cache/translator-ai/translation-cache.json`
193193

194194
The cache file stores translations indexed by:
195195
- Source file path
@@ -248,11 +248,11 @@ Add to your Claude Desktop configuration:
248248
```json
249249
{
250250
"mcpServers": {
251-
"translator-gemini": {
251+
"translator-ai": {
252252
"command": "npx",
253253
"args": [
254254
"-y",
255-
"translator-gemini-mcp"
255+
"translator-ai-mcp"
256256
],
257257
"env": {
258258
"GEMINI_API_KEY": "your-gemini-api-key-here"
@@ -271,7 +271,7 @@ Once configured, you can ask Claude to translate files:
271271
```
272272
Human: Can you translate my English locale file to Spanish?
273273
274-
Claude: I'll translate your English locale file to Spanish using translator-gemini.
274+
Claude: I'll translate your English locale file to Spanish using translator-ai.
275275
276276
<use_tool name="translate_json">
277277
{
@@ -1063,8 +1063,8 @@ If you frequently work with YAML files, consider creating a wrapper script that
10631063
### Building from source
10641064

10651065
```bash
1066-
git clone https://github.com/DatanoiseTV/translator-gemini.git
1067-
cd translator-gemini
1066+
git clone https://github.com/DatanoiseTV/translator-ai.git
1067+
cd translator-ai
10681068
npm install
10691069
npm run build
10701070
```
@@ -1085,7 +1085,7 @@ Contributions are welcome! Please feel free to submit a Pull Request.
10851085

10861086
## Support
10871087

1088-
For issues, questions, or suggestions, please open an issue on [GitHub](https://github.com/DatanoiseTV/translator-gemini/issues).
1088+
For issues, questions, or suggestions, please open an issue on [GitHub](https://github.com/DatanoiseTV/translator-ai/issues).
10891089

10901090
If you find this tool useful, consider supporting the development:
10911091

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "translator-gemini",
2+
"name": "translator-ai",
33
"version": "1.0.5",
4-
"description": "Fast JSON i18n translator with Google Gemini API, incremental caching, multi-file deduplication, and MCP support for Claude Desktop",
4+
"description": "Fast JSON i18n translator with AI support (Google Gemini & Ollama), incremental caching, multi-file deduplication, and MCP support",
55
"main": "dist/index.js",
66
"bin": {
7-
"translator-gemini": "dist/index.js",
8-
"translator-gemini-mcp": "dist/mcp-server.js"
7+
"translator-ai": "dist/index.js",
8+
"translator-ai-mcp": "dist/mcp-server.js"
99
},
1010
"scripts": {
1111
"start": "ts-node src/index.ts",
@@ -33,12 +33,12 @@
3333
"license": "SEE LICENSE IN LICENSE",
3434
"repository": {
3535
"type": "git",
36-
"url": "git+https://github.com/DatanoiseTV/translator-gemini.git"
36+
"url": "git+https://github.com/DatanoiseTV/translator-ai.git"
3737
},
3838
"bugs": {
39-
"url": "https://github.com/DatanoiseTV/translator-gemini/issues"
39+
"url": "https://github.com/DatanoiseTV/translator-ai/issues"
4040
},
41-
"homepage": "https://github.com/DatanoiseTV/translator-gemini#readme",
41+
"homepage": "https://github.com/DatanoiseTV/translator-ai#readme",
4242
"engines": {
4343
"node": ">=14.0.0"
4444
},

src/helpers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export function getCacheDirectory(): string {
1313
const homeDir = os.homedir();
1414

1515
if (platform === 'win32') {
16-
return path.join(process.env.APPDATA || path.join(homeDir, 'AppData', 'Roaming'), 'translator-gemini');
16+
return path.join(process.env.APPDATA || path.join(homeDir, 'AppData', 'Roaming'), 'translator-ai');
1717
} else if (platform === 'darwin') {
18-
return path.join(homeDir, 'Library', 'Caches', 'translator-gemini');
18+
return path.join(homeDir, 'Library', 'Caches', 'translator-ai');
1919
} else {
20-
return path.join(process.env.XDG_CACHE_HOME || path.join(homeDir, '.cache'), 'translator-gemini');
20+
return path.join(process.env.XDG_CACHE_HOME || path.join(homeDir, '.cache'), 'translator-ai');
2121
}
2222
}
2323

src/mcp-server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const execAsync = promisify(exec);
1414

1515
const server = new Server(
1616
{
17-
name: "translator-gemini",
17+
name: "translator-ai",
1818
version: "1.0.5",
1919
},
2020
{
@@ -38,7 +38,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
3838
try {
3939
// Build the command
4040
const provider = process.env.TRANSLATOR_PROVIDER || 'gemini';
41-
const cmd = `translator-gemini "${inputFile}" -l ${targetLanguage} -o "${outputFile}" --provider ${provider}`;
41+
const cmd = `translator-ai "${inputFile}" -l ${targetLanguage} -o "${outputFile}" --provider ${provider}`;
4242

4343
// Execute the command
4444
const { stdout, stderr } = await execAsync(cmd, {
@@ -79,7 +79,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
7979
// Build the command
8080
const statsFlag = showStats ? "--stats" : "";
8181
const provider = process.env.TRANSLATOR_PROVIDER || 'gemini';
82-
const cmd = `translator-gemini ${pattern} -l ${targetLanguage} -o "${outputPattern}" ${statsFlag} --provider ${provider}`;
82+
const cmd = `translator-ai ${pattern} -l ${targetLanguage} -o "${outputPattern}" ${statsFlag} --provider ${provider}`;
8383

8484
// Execute the command
8585
const { stdout, stderr } = await execAsync(cmd, {
@@ -183,7 +183,7 @@ async function main() {
183183
await server.connect(transport);
184184

185185
// Log to stderr so it doesn't interfere with MCP communication
186-
console.error("translator-gemini MCP server running");
186+
console.error("translator-ai MCP server running");
187187
}
188188

189189
main().catch((error) => {

test.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"app": {
3+
"title": "Moja aplikacja",
4+
"description": "Witamy w naszej niesamowitej aplikacji"
5+
},
6+
"navigation": {
7+
"home": "Strona główna",
8+
"about": "O nas",
9+
"contact": "Kontakt",
10+
"services": "Usługi",
11+
"portfolio": "Portfolio"
12+
},
13+
"buttons": {
14+
"submit": "Prześlij",
15+
"cancel": "Anuluj",
16+
"save": "Zapisz",
17+
"delete": "Usuń",
18+
"confirm": "Potwierdź",
19+
"actions": {
20+
"edit": "Edytuj",
21+
"view": "Wyświetl",
22+
"download": "Pobierz"
23+
}
24+
},
25+
"messages": {
26+
"success": "Operacja zakończona pomyślnie!",
27+
"error": "Wystąpił błąd. Spróbuj ponownie.",
28+
"warning": "Przed kontynuowaniem sprawdź swoje dane.",
29+
"info": "To jest informacja.",
30+
"validation": {
31+
"required": "To pole jest wymagane",
32+
"email": "Wprowadź poprawny adres e-mail",
33+
"minLength": "Minimalna długość to {{min}} znaków",
34+
"maxLength": "Maksymalna długość to {{max}} znaków"
35+
}
36+
},
37+
"user": {
38+
"profile": {
39+
"title": "Profil użytkownika",
40+
"firstName": "Imię",
41+
"lastName": "Nazwisko",
42+
"email": "Adres e-mail",
43+
"phone": "Numer telefonu",
44+
"address": {
45+
"street": "Adres",
46+
"city": "Miasto",
47+
"state": "Województwo",
48+
"zipCode": "Kod pocztowy",
49+
"country": "Kraj"
50+
}
51+
},
52+
"settings": {
53+
"title": "Ustawienia",
54+
"language": "Język",
55+
"theme": "Motyw",
56+
"notifications": "Powiadomienia",
57+
"privacy": "Prywatność"
58+
}
59+
},
60+
"products": {
61+
"title": "Nasze produkty",
62+
"categories": [
63+
"Elektronika",
64+
"Odzież",
65+
"Książki",
66+
"Dom i ogród"
67+
],
68+
"filters": {
69+
"price": "Przedział cenowy",
70+
"brand": "Marka",
71+
"rating": "Ocena klienta",
72+
"availability": "Tylko w magazynie"
73+
},
74+
"sorting": {
75+
"relevance": "Najbardziej trafne",
76+
"priceAsc": "Cena: od najniższej do najwyższej",
77+
"priceDesc": "Cena: od najwyższej do najniższej",
78+
"newest": "Najnowsze najpierw"
79+
}
80+
},
81+
"footer": {
82+
"copyright": "© 2024 Moja aplikacja. Wszelkie prawa zastrzeżone.",
83+
"links": {
84+
"terms": "Warunki korzystania z usługi",
85+
"privacy": "Polityka prywatności",
86+
"cookies": "Polityka plików cookie"
87+
},
88+
"social": {
89+
"followUs": "Śledź nas w mediach społecznościowych",
90+
"platforms": [
91+
"Facebook",
92+
"Twitter",
93+
"Instagram",
94+
"LinkedIn"
95+
]
96+
}
97+
}
98+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"/path/to/file.json": {
3+
"es": {
4+
"a1b2c3d4e5f6": "Hola",
5+
"f6e5d4c3b2a1": "Adiós"
6+
}
7+
}
8+
}

tests/fixtures/file1.es.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"greeting": "Hola",
3+
"shared": "Este texto aparece en múltiples archivos",
4+
"unique1": "Esto es exclusivo del archivo 1"
5+
}

tests/fixtures/file2.es.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"farewell": "Adiós",
3+
"shared": "Este texto aparece en múltiples archivos",
4+
"unique2": "Esto es exclusivo del archivo 2"
5+
}

0 commit comments

Comments
 (0)