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 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
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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
+ [![CI](https://github.com/jigarfumakiya/localship/actions/workflows/ci.yml/badge.svg)](https://github.com/jigarfumakiya/localship/actions/workflows/ci.yml)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
11
+ [![MCP](https://img.shields.io/badge/MCP-server-8A2BE2)](https://modelcontextprotocol.io)
12
+ [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](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).