본문으로 건너뛰기
cccskills
무료GitHub에 공개

localization

Inspect and edit Xcode String Catalogs (.xcstrings) via bundled l10n.sh and find_unused_keys.sh scripts, and apply Apple localization conventions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md4.7 KB
  • references/best-practices.md5.5 KB
  • scripts/find_unused_keys.sh3.9 KB
  • scripts/l10n.sh13.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Localization

The scripts work on any Xcode String Catalog (.xcstrings). They auto-discover the catalog by searching the project for .xcstrings files (preferring Localizable.xcstrings when several exist) and can be pointed at a specific one with the L10N_FILE env var. Run l10n.sh file to see which catalog is targeted.

String catalogs are usually too large to open with the Read/Edit tools — use the scripts instead. They operate on the catalog with jq, write changes back atomically, and re-serialize to Xcode's exact on-disk format (Xcode writes "key" : value with spaces around the colon; without normalization every edit would produce a huge spurious git diff).

Both scripts resolve the project root from their own location, so they can be run from any working directory.

l10n.sh

.claude/skills/localization/scripts/l10n.sh <command> [args]

CommandPurpose
filePrint the resolved catalog path
keysList all translatable keys
search <pattern>Search keys (case-insensitive)
search-values <pattern>Search translation values; prints key⇥lang⇥value
get <key>Show all translations for a key (raw JSON)
comment <key> [text]Show or set the translator comment for a key
set <key> <lang> <value>Set a single translation
set-plural <key> <lang> <cat> <value>Set a plural variant (zero|one|two|few|many|other)
batch-set <file.tsv>Bulk set from a TSV file (key⇥lang⇥value), single pass
missing <lang>Keys missing or pending (state ≠ translated) for <lang>
stats [lang]Per-language translated counts, plus pending/stale totals
staleKeys Xcode marked extractionState: "stale" (removed from code)
rename <old> <new>Rename a key, preserving translations
delete <key> [lang]Delete a key, or just one language's translation
normalizeRe-serialize the file to Xcode's exact .xcstrings format

Notes

  • Adding a new string: set the source-language value first (e.g. set "New key" en "New key"), then other languages, then a translator comment (comment <key> <text>). Keys are created on first set.
  • Bulk translations: prefer batch-set over many set calls — it applies all rows in one pass. Build a TSV with one key⇥lang⇥value row per cell; \n and \t escapes in values become real newlines/tabs.
  • Plurals: a localization holds either a flat value or variations, never both — set refuses keys that use variations; use set-plural, which also converts a flat value to plural form. Fill every category the language requires (English: one/other; Russian: one/few/many/other; …).
  • Languages: use the BCP-47 codes as they appear in the catalog (en, de, fr, …). Run stats to see which languages exist.
  • set, set-plural, and batch-set mark each unit state: "translated".
  • Renaming keys: Xcode re-extracts strings from code on every build, so also update the source references or the old key comes back.

find_unused_keys.sh

.claude/skills/localization/scripts/find_unused_keys.sh

Lists catalog keys not referenced anywhere in the project sources (Swift, ObjC, storyboards/xibs). Matching accounts for format specifiers (%@, %lld, …), Swift string-escape forms, and interpolation; placeholder-only keys it cannot verify are listed separately. Matching is textual, so keys built dynamically at runtime are invisible to it — verify each hit, then remove confirmed-unused keys with l10n.sh delete <key>. Cross-check with l10n.sh stale for keys Xcode itself no longer extracts.

Best practices

Full guidance distilled from Apple's docs lives in references/best-practices.md — consult it when writing or reviewing localizable Swift code. The short version:

  • SwiftUI literals in Text/Label/etc. are auto-localizable; elsewhere use String(localized:), and pass strings around as LocalizedStringResource, not String. In frameworks/packages, pass bundle: #bundle.
  • Give every string a translator comment describing where it appears and what its placeholders are.
  • Never concatenate sentence fragments or branch on plural count in code — use one key with interpolation, and plural variations for counts.
  • Never hand-format user-visible dates, numbers, currencies, measurements, or lists — use Foundation's formatted(…) styles, which localize per locale.
  • Mark brand names and symbols shouldTranslate: false instead of deleting them; keep unreviewed machine translations in needs_review state.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Authoritative App Intents best practices from Apple: execution model, entities, queries, parameters, enums, dependencies, and donations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CamilleScholtz/swmpc2392026년 10월 6일 업데이트

New App Intents APIs and behaviors for iOS 27 and macOS 27: SnippetIntent, LongRunningIntent, execution modes, and interactive snippets.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CamilleScholtz/swmpc2392026년 10월 6일 업데이트

apple-hig

무료

Apple Human Interface Guidelines as structured design values — system colors (incl. increased-contrast variants), the full Dynamic Type ramp, Liquid Glass rules and budgets, layout and hit-target metrics, SF Symbols, and HIG-to-SwiftUI component mappings. Use when styling or reviewing any Apple-platform UI: picking a color, size, spacing, corner radius, or hit target; writing .glassEffect / material code; choosing an SF Symbol; or answering 'what does the HIG say about X'.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CamilleScholtz/swmpc2392026년 10월 6일 업데이트

Run an offline ASO audit on canonical App Store metadata under `./Store` and surface keyword gaps using Astro MCP. Use after pulling metadata with `asc metadata pull`.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CamilleScholtz/swmpc2392026년 10월 6일 업데이트

Track build processing, find latest builds, and clean up old builds with asc. Use when managing build retention or waiting on processing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CamilleScholtz/swmpc2392026년 10월 6일 업데이트

Guidance for using asc cli in this repo (flags, output formats, pagination, auth, and discovery). Use when asked to run or design asc commands or interact with App Store Connect via the CLI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CamilleScholtz/swmpc2392026년 10월 6일 업데이트

CamilleScholtz의 스킬 모두 보기

이 스킬의 문제 신고