Two-way sync tool between Lark Sheets and iOS Localizable.strings.
uv is recommended for environment and dependency management:
uv syncThen run the CLI with uv run:
uv run lark-l10n --helpuv run lark-l10n pull --config path/to/config.yamluv run lark-l10n push --config path/to/config.yamluv run lark-l10n sort --config path/to/config.yamlReads each language's <table_name>.strings under ios.input_dir, sorts all keys alphabetically, and writes back in place. Unchanged files are skipped.
All three commands show a summary and offer Y (write), D (details), or N (cancel, the default). Details of up to 20 lines appear in the terminal; longer details are saved in a temporary .diff file, retained after exit. Viewing details returns to the prompt. No changes means no confirmation is needed.
Use --yes (or -y) to write immediately without prompting, including in scripts:
uv run lark-l10n push --config path/to/config.yaml --yesEnter, EOF, or Ctrl+C at the prompt cancels. The former --dry-run option has been removed; use D then N to review without writing.
The columns config must exactly match the header row of your Lark Sheet.
Given a sheet with this header:
| ios_key | en | zh_CN | es | pt | tr | ar |
|---|
Use:
columns:
key_column: "ios_key" # must match the key column header exactly
languages:
- "en"
- "zh_CN" # must match language column headers exactly
- "es"
- "pt"
- "tr"
- "ar"If your sheet uses a different format (e.g. zh-CN instead of zh_CN), match it in both languages and mapping:
columns:
key_column: "key"
languages:
- "en"
- "zh-CN"
mapping:
zh-CN: # must match the value in languages
- "zh-Hans.lproj"Extra columns in the sheet (e.g. notes) don't need to be declared — they are ignored. On push, only the declared languages columns are written; all other columns are left untouched.