agentleFS
everpcpceverpcpc/KMReader/.agents/skills/localization/SKILL.md

localization

Skill118 starsChanged 7 days agoMITView on GitHub

Use when updating KMReader translations in Localizable.xcstrings after code changes. Covers build/localize refresh, missing key discovery, context lookup, and deterministic updates through misc/translate.py.

20 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 3 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run a full make build once to refresh extracted strings data.

    line 25
  2. Very specific:

    Only skip the build step when it is already confirmed that the current code changes have been through a full make build.

    line 29
  3. Very specific:

    If output is No missing translations found., no translation update is needed.

    line 43
  4. Very specific:

    Always write all target languages in one command to avoid partial updates.

    line 61
  5. Very specific:

    Run ./misc/translate.py update commands sequentially.

    line 62
  6. Very specific:

    Do not run multiple update commands in parallel against the same KMReader/Localizable.xcstrings file, because each invocation rewrites the …

    line 63
  7. Very specific:

    If Localizable.xcstrings becomes invalid JSON at any point, restore it to a known-good state first, rerun make localize, and then repeat …

    line 80
  8. Distinctive:

    Keep tone consistent with product domains (Reader, Series, Read List, Offline Sync).

    line 85
  9. Very specific:

    Do not modify entries where shouldTranslate == false.

    line 86
  10. Distinctive:

    Do not rewrite unrelated keys.

    line 87
  11. Distinctive:

    If missing items remain, continue until the list is empty.

    line 95

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

KMReader Localization

Maintain and complete KMReader translations in KMReader/Localizable.xcstrings.

When To Use

  • The user asks to fill missing translations.
  • New localized strings were introduced and need all supported languages.
  • The user mentions misc/translate.py, make localize, or missing localization entries.

Standard Workflow

Hard requirement:

  • make localize must be preceded by a full make build for the current code state.
  • Without that build, extracted localized strings data may be stale, and Localizable.xcstrings will not be updated correctly.

Default order:

  1. Run a full make build once to refresh extracted strings data.
  2. Sync extracted strings data into Localizable.xcstrings.
  3. Fill missing translations.

Only skip the build step when it is already confirmed that the current code changes have been through a full make build. If that is not explicitly confirmed, run make build before make localize.

make build
make localize

Missing Translation Check

./misc/translate.py list
  • This lists keys with missing languages.
  • If output is No missing translations found., no translation update is needed.

Per-Key Process

  1. Understand key meaning and UI context.
  2. Locate usage in code when needed to avoid semantic drift.
  3. Prepare all target languages first, then write once.
rg -n "String\\(localized: \"<KEY>\"\\)|\"<KEY>\"" KMReader Shared KMReaderWidgets

Current supported target languages:

  • de, en, es, fr, it, ja, ko, ru, zh-Hans, zh-Hant

Deterministic Update Command

Always write all target languages in one command to avoid partial updates. Run ./misc/translate.py update commands sequentially. Do not run multiple update commands in parallel against the same KMReader/Localizable.xcstrings file, because each invocation rewrites the file and concurrent writes can corrupt the JSON. Parallelism is only safe for read-only steps such as rg or ./misc/translate.py list.

./misc/translate.py update "<KEY>" \
  --de "<German>" \
  --en "<English>" \
  --es "<Spanish>" \
  --fr "<French>" \
  --it "<Italian>" \
  --ja "<Japanese>" \
  --ko "<Korean>" \
  --ru "<Russian>" \
  --zh-hans "<Simplified Chinese>" \
  --zh-hant "<Traditional Chinese>"

If Localizable.xcstrings becomes invalid JSON at any point, restore it to a known-good state first, rerun make localize, and then repeat the missing-key updates sequentially.

Quality Rules

  • Preserve placeholders and format markers exactly: %@, %d, %lld, %f, %1$@, \\n.
  • Keep tone consistent with product domains (Reader, Series, Read List, Offline Sync).
  • Do not modify entries where shouldTranslate == false.
  • Do not rewrite unrelated keys; only update requested or missing ones.

Final Verification

./misc/translate.py list

If missing items remain, continue until the list is empty.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.