Command reference
Locale Lens
Locale Lens reviews Apple localization files without changing the project.
Enable localeLens and run these actions with ed invoke.
ed invoke localeLens localeLens.review --json '{"path":"/tmp/sample-project","sourceLocale":"en"}'ed invoke localeLens localeLens.checklist --json '{"path":"/tmp/sample-project","sourceLocale":"en"}'Both actions accept a JSON object with an absolute project folder path and an
optional non-empty sourceLocale, defaulting to en. Surrounding whitespace in
both values is trimmed. Any other payload, a relative path or an unknown action
is rejected with a message that names this contract. Use Base for a Base.lproj
source. A locale folder that holds only storyboards, images or other resources
without .strings or .stringsdict files is not reported as a missing locale. Each
.xcstrings catalog uses its own declared sourceLanguage. Paths through
/tmp, /var or other symbolic links resolve to their physical folder first.
The page also expands a leading ~ in the folder field and asks for an
absolute folder before it starts a review.
localeLens.review returns files, skippedSymbolicLinks and totalFindings. Each file has
file, sourceLocale, locales, keyCount, and issues. Each issue has file,
locale, key, kind, detail, and optional line and comment fields.
Paths in findings are relative to the selected folder. Files are grouped by the
path remaining after the locale folder is removed, so separate resource roots
stay separate. Missing sibling files are checked against the source keys.
localeLens.checklist returns a JSON object with a checklist string containing
a Markdown task list grouped by file. The action returns text and writes no
files. Save it outside the reviewed project. The page's Export checklist action
replaces a file you confirmed in the save panel, writes atomically, and rejects
destinations inside the project, including paths that reach it through a
symbolic link or a /private alias, and destinations that are themselves
symbolic links.
Findings include missing translations, extra keys, duplicate keys in .strings,
empty or untranslated values, malformed entries, placeholder mismatches and
missing variations. Catalog entries marked shouldTranslate: false are skipped.
Source-locale catalog values in the new or needs_review state still count as
the baseline. Target values in those states are still checked for placeholders
and variations, and are reported as needing review; empty ones are reported as
empty translations. Malformed files produce diagnostics without speculative
missing-key findings. Translator comments are retained as notes, never parsed
as translation entries. Valid explicit argument reordering is accepted;
argument positions, conversion types, length modifiers, dynamic width and
precision are checked. Write %% for a literal percent.
Plural rules require other, permit locale-specific categories, and compare
category placeholders with the source category or its other fallback.
Catalogs support plural and device variations, including nested variations.
Catalog substitutions are diagnosed as unsupported. This is structural plural
validation, not a language-specific CLDR completeness check.
The scan skips symbolic links, .git, .build, .swiftpm, node_modules,
Pods, Carthage, vendor, dist, build and DerivedData folders, and the
contents of .app, .appex, .bundle, .framework and .xcframework bundles.
UTF-8 and BOM-marked UTF-16 strings with LF, CRLF or CR line endings, XML or
binary property list strings files, XML or binary strings dictionaries, and
version 1.0 JSON catalogs are supported. Old-style escapes such as \a, \b,
\f, \v, octal and short \U sequences are accepted.
Each file is limited to 2 MiB and a review reads at most 128 MiB. A review stops
with an error above 100,000 directory entries, 3,000 localization files or the
read limit; choose a smaller resource folder after a limit error. Findings above
5,000 are counted but not listed: totalFindings holds the full count, and the
page and checklist say how many are shown. A result larger than 8 MiB is
rejected. At most four reviews run at once; another request is rejected until
one finishes. Missing permissions and read failures are reported. The scan is
cancellable through the normal invocation timeout and the page's Cancel button.
The UI groups findings in a list per file, with key, locale, finding, detail, line and translator note. Review runs only when requested: revealing the window again or revisiting the page does not repeat a finished review. Export retains the project associated with the displayed report even if the input folder changes. Closing one Locale Lens window leaves the others working.