StringLane
v0.9.1Check, translate and fix app localization files: ARB, iOS strings, Android XML, i18next JSON.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
inspect_project Inspect the project’s localization state
Report this project’s locales, missing and stale strings, and every validation finding, as the stringlane engine sees them. Reads only; writes nothing. Takes no arguments. The project is fixed when the server starts.
read_translations Read existing translations
Look up what this project already says: one key across locales, or keys matching a search, decoded exactly as the stringlane engine reads them. Use this instead of opening a locale file: four of the five supported formats escape, prefix or nest their values, so the bytes on disk are not the string. Reads only; writes nothing. Takes no file paths. The project is fixed when the server starts.
| Parameter | Type | Description |
|---|---|---|
cursor | string | nextCursor from a previous result. Opaque: pass it back, do not parse it. |
key | string | An exact key, as prepare_translation_plan spells it. Omit to list. |
limit | integer | Maximum translations (not keys) per page. Default 200, maximum 2000. |
locales | array | Locale codes to read. Omit for every locale, base included. |
query | string | Case-insensitive substring matched against KEYS, not values. Cannot be used with key. |
read_key_usage Find where a key is used, or which keys are unused
Report where a translation key is called in this project’s source code, or list the keys nothing appears to call. Use this instead of grepping: it knows the call shapes of each supported framework, matches the spelling the runtime actually uses rather than the merged key, and refuses rather than guessing when it cannot read your code. "Not referenced" is what the scanner SAW, not a verdict. Read the caveat before deleting anything. Reads only; writes nothing.
| Parameter | Type | Description |
|---|---|---|
cursor | string | nextCursor from a previous result. Opaque: pass it back, do not parse it. |
key | string | A merged key, exactly as prepare_translation_plan spells it. Omit to list unused keys. |
limit | integer | Maximum unused keys per page. Default 200, maximum 2000. Ignored when key is given. |
prepare_translation_plan Prepare a translation plan
List exactly the strings that need translating, each with its base value, metadata, placeholders and plural categories, plus the project’s translation context. Returns a planId to pass to validate_translations and apply_translations. Reads only; writes nothing. Takes no file paths. The project is fixed when the server starts.
| Parameter | Type | Description |
|---|---|---|
after | integer | Number of items already received. Use with planId to continue. |
limit | integer | Items per page. Default 100, maximum 2000. |
planId | string | To fetch a further page of a plan you already have. Omit to make a new plan. |
targets | array | Locale codes to plan for. Omit for every locale except the base. |
validate_translations Validate candidate translations
Check candidate translations against a plan (placeholders, ICU structure, plural categories, length constraints) and report every problem. Writes nothing, anywhere. A clean result means these candidates would be accepted, but it is not permission to write: apply_translations re-runs every check itself and also verifies the project has not changed since the plan was made.
| Parameter | Type | Description |
|---|---|---|
candidates * | array | One entry per plan item you are answering. |
planId * | string | The planId from prepare_translation_plan, this session. |
apply_translations Apply translations to the project files
Write validated translations into the project’s locale files. It re-runs every check validate_translations runs, and additionally refuses if the project changed since the plan was made: a clean validate earlier grants nothing. With sourceStamps: true it also writes .stringlane/source-stamps.json and refuses when that file is missing, unreadable, malformed or not a plain file. Either every proposed change lands or none does. Your host asks the user before this runs, and git is where they review what it wrote.
| Parameter | Type | Description |
|---|---|---|
candidates * | array | One entry per plan item you are answering. |
planId * | string | The planId from prepare_translation_plan, this session. |
describe_keys Write key descriptions
Store a description for one or more keys, so every future translation is made against context instead of a guess. WRITES to your project. A description is stored where this format keeps one: the ARB @key block, an iOS or Android comment, or .stringlane/metadata.yaml. Describing a key that is already translated marks that translation stale, so describe before you translate.
| Parameter | Type | Description |
|---|---|---|
descriptions * | array | One entry per key you are describing. An unknown key refuses the whole set. |
add_locale Add a locale to the project
Create the file for a locale this project does not have yet, in the right place and the right format. WRITES to your project. Use this when prepare_translation_plan comes back empty because there is nothing to translate INTO. Never write a locale file yourself: the path, the format and the plural categories differ per project, and a hand-made file skips every check. This creates the FILE. It does not make the app OFFER the language. That lives in the app's own source (a supportedLocales list, Info.plist, a locale config, supportedLngs, a language picker) and each of those is optional per proje…
| Parameter | Type | Description |
|---|---|---|
locale * | string | BCP 47 code: "uk", "fr-CA", "zh-Hans". Not the base locale. |
set_project_context Set the project translation context
Store what this product IS, how it should sound, per-locale notes, and words that must never be translated. WRITES to stringlane.yaml. These shape every future translation in every locale, so they are worth getting right once. Omit a field to leave it alone; pass an empty value to remove it.
| Parameter | Type | Description |
|---|---|---|
brandingGuidelines | string | Voice, tone, address form, and anything never to translate. |
guardedWords | array | Words that must survive translation unchanged. No empty entries. |
localeContext | object | Locale code to notes. A locale the project does not have is refused. |
productContext | string | What the product is and who uses it. Empty string removes it. |
add_key Add new keys to the project
Add new translation keys and their source strings to the base locale. Use this when you have just written code referencing keys the project does not have yet. WRITES to your project. Send them ALL IN ONE CALL: one call is one atomic write, so a component never ends up half-keyed. Include a description for each key: you are holding the context nobody recovers later, and a key without one is reported by the very next prepare_translation_plan as still needing it. Never add a key by editing the locale file: key names are not equally legal across formats, a description belongs wherever THIS format…
| Parameter | Type | Description |
|---|---|---|
keys * | array | One entry per key. An invalid key refuses the whole set. |
pluralize_key Give an existing key its plural forms
In an i18next project, turn a key the project already has into plural forms in the base locale. Use this for a count_without_plural finding, where a string shows {{count}} but has no plural forms; add_key refuses a key that already exists. WRITES to your project, and there is no preview: the call writes. It replaces the key's current base text with the forms you send, so write every form the base language uses (the finding names them) and keep the placeholders. It writes the BASE file only, and the user reviews the forms in the diff. Send the key exactly as the finding reports it. If owedByLoc…
| Parameter | Type | Description |
|---|---|---|
forms * | object | The base text for each plural category, as the CLDR names them. Send exactly the categories the base language uses; the finding names them. |
key * | string | The merged key exactly as inspect_project or validate_translations report it. |