localship 0.0.0-stage โ 0.1.0
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/LICENSE +21 -0
- package/README.md +309 -2
- package/dist/chunk-OWT47JBL.js +5416 -0
- package/dist/cli.js +336 -0
- package/dist/server-GZNS57EQ.js +314 -0
- package/package.json +66 -4
- package/skills/localship/SKILL.md +67 -0
- package/skills/localship-extract/SKILL.md +114 -0
- package/skills/localship-review/SKILL.md +52 -0
- package/skills/localship-setup/SKILL.md +105 -0
- package/skills/localship-translate/SKILL.md +103 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jigar Fumakiya
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,310 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# ๐ Localship
|
|
4
|
+
|
|
5
|
+
**Translate your app with the AI you already use.**
|
|
6
|
+
|
|
7
|
+
Free and open source ยท No account, no server ยท Any AI model ยท Every translation checked
|
|
8
|
+
|
|
9
|
+
[](https://github.com/jigarfumakiya/localship/actions/workflows/ci.yml)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://modelcontextprotocol.io)
|
|
12
|
+
[](CONTRIBUTING.md)
|
|
13
|
+
|
|
14
|
+
[Highlights](#-highlights) ยท [See it in action](#-see-it-in-action) ยท [How it works](#-how-it-works) ยท [What you can ask](#-what-you-can-ask) ยท [Formats](#-formats) ยท [Install](#-install) ยท [Questions](#-questions) ยท [Roadmap](#%EF%B8%8F-roadmap) ยท [Reference](docs/reference.md)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
Ask your coding agent to translate your app. Localship gives it the context it needs, checks
|
|
21
|
+
every translation before it's written, and remembers what's done, so updates only redo what
|
|
22
|
+
changed. Think of it as a localization platform that runs inside your coding agent: no account,
|
|
23
|
+
no server, no monthly bill.
|
|
24
|
+
|
|
25
|
+
> [!NOTE]
|
|
26
|
+
> **Early days.** Localship is new. It's tested on real-world translation files and a real app,
|
|
27
|
+
> but expect rough edges, and please [open an issue](https://github.com/jigarfumakiya/localship/issues)
|
|
28
|
+
> when you hit one.
|
|
29
|
+
|
|
30
|
+
## โจ Highlights
|
|
31
|
+
|
|
32
|
+
- ๐ **Free and open source.** MIT-licensed. You pay only for your own AI usage, or nothing with a
|
|
33
|
+
local model.
|
|
34
|
+
- ๐ค **Works with the AI you already use.** Your coding agent's own model, or Claude, GPT, Gemini,
|
|
35
|
+
OpenRouter, or a local model through Ollama.
|
|
36
|
+
- ๐ก๏ธ **Catches broken translations.** Placeholders, plural forms, Android escaping and markup are
|
|
37
|
+
checked in code before anything is written. Failures go back to the AI with the reason.
|
|
38
|
+
- ๐ง **More context for the AI.** Each string comes with the code that uses it, its comment, your
|
|
39
|
+
glossary and voice notes, and earlier translations of the same text.
|
|
40
|
+
- ๐ **Stays in your repo.** No server, no account, no upload. Your files, written the way Android
|
|
41
|
+
Studio and Xcode write them.
|
|
42
|
+
- ๐ป **Runs anywhere.** Claude Code, Cursor, VS Code, Codex, Gemini CLI, Claude Desktop or the
|
|
43
|
+
terminal, on macOS, Linux and Windows.
|
|
44
|
+
|
|
45
|
+
### ๐ค Why use Localship?
|
|
46
|
+
|
|
47
|
+
Your AI can already translate a strings file if you ask. Here's what changes with Localship:
|
|
48
|
+
|
|
49
|
+
| | โ Asking an AI directly | โ
With Localship |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| Placeholders like `%1$s` | Sometimes dropped, and the app crashes on that screen | Checked before writing; sent back to fix |
|
|
52
|
+
| Plural forms | Arabic often gets 2 forms instead of 6 | The right forms for every language, from Unicode CLDR |
|
|
53
|
+
| Android escaping | An unescaped apostrophe breaks the build | Escaped for you |
|
|
54
|
+
| Consistent terms | "Budget" translated three ways | Glossary, voice notes and earlier translations |
|
|
55
|
+
| Changing copy | Everything is translated again | Only changed strings are redone, with the old and new text |
|
|
56
|
+
| Your translator's fixes | Overwritten | Kept unless you ask |
|
|
57
|
+
|
|
58
|
+
## ๐ฌ See it in action
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
You: Translate this app into Hindi and Arabic.
|
|
62
|
+
Agent: Found 18 strings (2 plurals, 3 with placeholders). I'll add a short brief and
|
|
63
|
+
glossary, and keep "Jotter Pro" as written. Say "start translating" to go.
|
|
64
|
+
|
|
65
|
+
You: Start translating.
|
|
66
|
+
Agent: 36 translations written as drafts, 0 errors. Arabic has all six plural forms.
|
|
67
|
+
|
|
68
|
+
You: Review the Arabic, then approve them.
|
|
69
|
+
Agent: Two small fixes made. All approved.
|
|
70
|
+
|
|
71
|
+
You: I reworded two buttons. Update the translations.
|
|
72
|
+
Agent: Updated the 2 changed strings. Your hand edit in Hindi was kept.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## ๐ How it works
|
|
76
|
+
|
|
77
|
+
```mermaid
|
|
78
|
+
flowchart LR
|
|
79
|
+
A[๐ Your repo] --> B[๐ Find strings]
|
|
80
|
+
B --> C[๐ง Batch + context<br/><sub>code usage ยท comments<br/>glossary ยท voice ยท memory</sub>]
|
|
81
|
+
C --> D[๐ค AI translates<br/><sub>your agent or any model</sub>]
|
|
82
|
+
D --> E{๐ก๏ธ Checks<br/><sub>placeholders ยท plurals<br/>escaping ยท markup</sub>}
|
|
83
|
+
E -- fails --> D
|
|
84
|
+
E -- passes --> F[๐ Drafts in your files]
|
|
85
|
+
F --> G[๐ Review] --> H[โ
Approved]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Setup adds one folder to your repo. Commit it: the brief, glossary and voice notes are yours to
|
|
89
|
+
edit, and the lockfile is how Localship knows what's new, what changed and what someone edited by
|
|
90
|
+
hand.
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
.localship/
|
|
94
|
+
โโโ config.yaml where your strings live, and which languages
|
|
95
|
+
โโโ brief.md what the app is and who it's for
|
|
96
|
+
โโโ glossary.yaml terms to keep as they are or translate one way
|
|
97
|
+
โโโ voice/ tone and formality per language
|
|
98
|
+
โโโ lock.json what was translated from which text
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## ๐ฌ What you can ask
|
|
102
|
+
|
|
103
|
+
Wherever your app is today, one sentence gets it started.
|
|
104
|
+
|
|
105
|
+
| Your app today | Just ask |
|
|
106
|
+
|---|---|
|
|
107
|
+
| ๐ Has strings, no translations yet | "Translate the app into French and German." |
|
|
108
|
+
| ๐ Already has some translations | "Set up localization." Existing translations are kept and checked |
|
|
109
|
+
| ๐งฑ Text is written straight into the code | "Make this app localizable." The agent moves it into `strings.xml` or a String Catalog |
|
|
110
|
+
| โ Adding a language later | "Add Japanese." |
|
|
111
|
+
| โ๏ธ You changed some copy | "Update the translations." Only changed strings are redone |
|
|
112
|
+
| ๐งน You deleted or renamed strings | "Clean up old translations." |
|
|
113
|
+
| ๐ Ready to check the result | "Review the Arabic translations." |
|
|
114
|
+
|
|
115
|
+
## ๐ฆ Formats
|
|
116
|
+
|
|
117
|
+
| Format | Status |
|
|
118
|
+
|---|---|
|
|
119
|
+
| Android `strings.xml` | โ
Supported |
|
|
120
|
+
| Apple String Catalog `.xcstrings` | โ
Supported |
|
|
121
|
+
| gettext `.po` / `.pot` | โ
Supported |
|
|
122
|
+
| Flutter ARB `.arb` | ๐๏ธ Planned |
|
|
123
|
+
| JSON (flat, nested, i18next, ICU) | ๐๏ธ Planned |
|
|
124
|
+
| Apple `.strings` / `.stringsdict` | ๐๏ธ Planned |
|
|
125
|
+
| XLIFF `.xliff` | ๐๏ธ Planned |
|
|
126
|
+
|
|
127
|
+
Android string arrays and plurals, String Catalog plural variations, and gettext plural forms are
|
|
128
|
+
all supported.
|
|
129
|
+
|
|
130
|
+
## ๐ Install
|
|
131
|
+
|
|
132
|
+
Needs [Node.js](https://nodejs.org) 22 or newer.
|
|
133
|
+
|
|
134
|
+
### โญ The easiest way
|
|
135
|
+
|
|
136
|
+
**Claude Code:** install the plugin, which includes the server and the skills.
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
/plugin marketplace add jigarfumakiya/localship
|
|
140
|
+
/plugin install localship@localship
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Codex, Cursor, Gemini CLI and other agents:** one command adds the Localship skills,
|
|
144
|
+
step-by-step playbooks your agent follows. The first time, it offers to install the Localship
|
|
145
|
+
command line it uses.
|
|
146
|
+
|
|
147
|
+
```sh
|
|
148
|
+
npx skills add jigarfumakiya/localship
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Then open your app and ask: *"Translate this app into Hindi and Arabic."*
|
|
152
|
+
|
|
153
|
+
### ๐ Other tools
|
|
154
|
+
|
|
155
|
+
Add Localship as an MCP server.
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{ "mcpServers": { "localship": { "command": "npx", "args": ["-y", "localship", "mcp"] } } }
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
| Tool | Where the config goes |
|
|
162
|
+
|---|---|
|
|
163
|
+
| Claude Code (without the plugin) | `claude mcp add localship -- npx -y localship mcp` |
|
|
164
|
+
| Cursor | `.cursor/mcp.json` in your project, or `~/.cursor/mcp.json` |
|
|
165
|
+
| VS Code | `.vscode/mcp.json`, with `"servers"` instead of `"mcpServers"` and `"type": "stdio"` added |
|
|
166
|
+
| Gemini CLI | `.gemini/settings.json` |
|
|
167
|
+
| Codex | `~/.codex/config.toml`: `[mcp_servers.localship]` with `command = "npx"` and `args = ["-y", "localship", "mcp"]` |
|
|
168
|
+
| Claude Desktop | `claude_desktop_config.json`, with `"-C", "/path/to/your/app"` added before `"mcp"` |
|
|
169
|
+
|
|
170
|
+
The first start takes a minute while it installs.
|
|
171
|
+
|
|
172
|
+
<details>
|
|
173
|
+
<summary><b>MCP tools</b></summary>
|
|
174
|
+
|
|
175
|
+
Your agent picks these itself; you just ask. ๐ marks tools that only read and never change a file.
|
|
176
|
+
|
|
177
|
+
| Tool | What it does |
|
|
178
|
+
|---|---|
|
|
179
|
+
| `localship_plan` ๐ | Looks at the project and returns one plan for a request: what it found, blockers, steps and defaults |
|
|
180
|
+
| `localship_start` | Sets up a confirmed plan: config, default voice notes and glossary, never overwriting yours |
|
|
181
|
+
| `localship_status` ๐ | Progress per language: missing, changed, drafts, approved |
|
|
182
|
+
| `localship_validate` ๐ | Checks placeholders, plural forms, escaping, markup and the glossary |
|
|
183
|
+
| `localship_detect` ๐ | Finds translation files in the repo |
|
|
184
|
+
| `localship_init` | Writes the config from what was detected |
|
|
185
|
+
| `localship_add_locales` | Adds languages to translate into |
|
|
186
|
+
| `localship_get_context` ๐ | Reads the brief, voice notes and glossary |
|
|
187
|
+
| `localship_update_context` | Writes the brief, voice notes or glossary |
|
|
188
|
+
| `localship_next_batch` ๐ | The next strings to translate, with their context |
|
|
189
|
+
| `localship_submit` | Checks translations and writes the good ones as drafts |
|
|
190
|
+
| `localship_approve` | Marks drafts reviewed or approved, when you say so |
|
|
191
|
+
| `localship_remove` | Clears translations so they're redone; keeps your edits unless you ask |
|
|
192
|
+
| `localship_prune` | Removes translations of deleted strings |
|
|
193
|
+
| `localship_translate` | Translates everything missing through a model API, for large apps |
|
|
194
|
+
|
|
195
|
+
</details>
|
|
196
|
+
|
|
197
|
+
## ๐ Security and privacy
|
|
198
|
+
|
|
199
|
+
- **Stays in your project.** Localship reads and writes only your translation files and the
|
|
200
|
+
`.localship/` folder. Changes to your code are made by your agent, where you can see them.
|
|
201
|
+
- **No Localship server.** No account, no telemetry. The only calls Localship makes go to a model
|
|
202
|
+
API you set up, with your own key. With your coding agent's model or a local Ollama, it sends
|
|
203
|
+
nothing over the internet.
|
|
204
|
+
- **Nothing is final until you say so.** Translations are written as drafts, and hand edits and
|
|
205
|
+
approved translations are never replaced unless you ask.
|
|
206
|
+
|
|
207
|
+
## โจ๏ธ From the command line
|
|
208
|
+
|
|
209
|
+
No agent needed: run Localship straight from your terminal with any model.
|
|
210
|
+
|
|
211
|
+
```sh
|
|
212
|
+
npm install -g localship
|
|
213
|
+
|
|
214
|
+
localship plan hindi arabic # what it takes, before changing anything
|
|
215
|
+
localship start hi,ar --model anthropic:claude-sonnet-5-5 # set up and translate in one go
|
|
216
|
+
localship status # progress per language
|
|
217
|
+
localship validate # exits 1 on errors
|
|
218
|
+
localship approve --locale hi # after review
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Every command, option and config key is in the [reference](docs/reference.md).
|
|
222
|
+
|
|
223
|
+
## โ Questions
|
|
224
|
+
|
|
225
|
+
<details>
|
|
226
|
+
<summary><b>The Localship tools don't show up. What do I check?</b></summary>
|
|
227
|
+
|
|
228
|
+
- Node.js 22 or newer: run `node --version`.
|
|
229
|
+
- The first start takes a minute while it installs; try again after that.
|
|
230
|
+
- Reconnect the server: `/mcp` in Claude Code, or restart your editor.
|
|
231
|
+
- Open your app's folder in your tool, so Localship starts in the right project.
|
|
232
|
+
</details>
|
|
233
|
+
|
|
234
|
+
<details>
|
|
235
|
+
<summary><b>Can I try it before using it on my app?</b></summary>
|
|
236
|
+
|
|
237
|
+
Yes. [examples/android-notes](examples/android-notes) is a small Android app with its Hindi and
|
|
238
|
+
Arabic translations. Open it with Localship installed and ask your agent to add another language.
|
|
239
|
+
</details>
|
|
240
|
+
|
|
241
|
+
<details>
|
|
242
|
+
<summary><b>Do I need an API key?</b></summary>
|
|
243
|
+
|
|
244
|
+
No. Inside a coding agent, Localship uses the agent's own model. An API key is only needed to
|
|
245
|
+
translate from the terminal or CI, and a local model through Ollama needs none at all.
|
|
246
|
+
</details>
|
|
247
|
+
|
|
248
|
+
<details>
|
|
249
|
+
<summary><b>Where do my strings go?</b></summary>
|
|
250
|
+
|
|
251
|
+
Only to the AI you choose. There's no Localship server.
|
|
252
|
+
</details>
|
|
253
|
+
|
|
254
|
+
<details>
|
|
255
|
+
<summary><b>Will it overwrite my translators' work?</b></summary>
|
|
256
|
+
|
|
257
|
+
No. Hand edits and anything approved are never replaced unless you explicitly ask.
|
|
258
|
+
</details>
|
|
259
|
+
|
|
260
|
+
<details>
|
|
261
|
+
<summary><b>I have an iOS and an Android app. Can they share translations?</b></summary>
|
|
262
|
+
|
|
263
|
+
Yes. One config can list both, and they share the same brief, glossary and voice notes. When the
|
|
264
|
+
same text appears in both apps, the earlier translation is offered to the AI, so "Sign in"
|
|
265
|
+
reads the same on both.
|
|
266
|
+
</details>
|
|
267
|
+
|
|
268
|
+
<details>
|
|
269
|
+
<summary><b>Which languages?</b></summary>
|
|
270
|
+
|
|
271
|
+
Any. Plural rules come from Unicode's CLDR data, so Arabic gets six plural forms, Russian three and
|
|
272
|
+
Japanese one, automatically.
|
|
273
|
+
</details>
|
|
274
|
+
|
|
275
|
+
<details>
|
|
276
|
+
<summary><b>How good are the translations?</b></summary>
|
|
277
|
+
|
|
278
|
+
As good as the model and the context you give it. The brief, voice and glossary make the biggest
|
|
279
|
+
difference. The checks catch mechanical errors, not wrong meaning, so review the drafts, ideally
|
|
280
|
+
with a native speaker.
|
|
281
|
+
</details>
|
|
282
|
+
|
|
283
|
+
<details>
|
|
284
|
+
<summary><b>Does it check right-to-left layout and cut-off text?</b></summary>
|
|
285
|
+
|
|
286
|
+
Not yet. Localship checks the translation files, not how your app draws them. Charts that don't
|
|
287
|
+
mirror, signs on the wrong side of amounts, or text stored in a database won't show up in the
|
|
288
|
+
files, so test right-to-left languages on a device before you ship. The agent skills list what
|
|
289
|
+
to look for.
|
|
290
|
+
</details>
|
|
291
|
+
|
|
292
|
+
## ๐ฃ๏ธ Roadmap
|
|
293
|
+
|
|
294
|
+
| | Feature | Status |
|
|
295
|
+
|---|---|---|
|
|
296
|
+
| ๐ฆ | Android, String Catalog and gettext formats | โ
Done |
|
|
297
|
+
| ๐ง | Translation with context, checks, review, approval and cleanup | โ
Done |
|
|
298
|
+
| ๐ค | MCP server, agent skills, Claude Code plugin | โ
Done |
|
|
299
|
+
| ๐งฉ | Flutter ARB and JSON (i18next, flat, nested) | ๐๏ธ Planned |
|
|
300
|
+
| โ
| GitHub Action that checks pull requests | ๐๏ธ Planned |
|
|
301
|
+
| ๐ | Tools that find hardcoded text in Kotlin and Swift | ๐๏ธ Planned |
|
|
302
|
+
| ๐ | AI reviewer, and a review page for human translators | ๐๏ธ Planned |
|
|
303
|
+
| ๐ช | App Store and Play Store listings | ๐๏ธ Planned |
|
|
304
|
+
| ๐ฑ | Screenshot checks for cut-off and right-to-left text | ๐๏ธ Planned |
|
|
305
|
+
|
|
306
|
+
Want something sooner? [Open an issue](https://github.com/jigarfumakiya/localship/issues) or ๐ an existing one.
|
|
307
|
+
|
|
308
|
+
## ๐ค Contributing
|
|
309
|
+
|
|
310
|
+
Found a bug or have an idea? [Open an issue](https://github.com/jigarfumakiya/localship/issues).
|