string-catalog
A CLI tool for translating Xcode string catalogs.
Apps using this tool:
- ByePhotos: Find similar photos and compress large videos to free up space on your iPhone and iCloud.
- ParkClock: Parking Timer & Reminder.
- OptiClean: Removes unwanted objects from photos using AI, run model fully on device.
Installation
Install this tool using pip:
pip install string-catalog
Usage
For help, run:
string-catalog --help
Translate a single xcstrings file or all xcstrings files in a directory
export OPENROUTER_API_KEY=sk-or-v1-xxxxx
string-catalog xcstrings translate /path_or_dir/to/xcstrings_file \
--model anthropic/claude-3.5-sonnet \
--lang ru \
--lang zh-Hant
Translate a single xcstrings file and all supported languages using deepseek-v3 API
string-catalog xcstrings translate /path_or_dir/to/xcstrings_file \
--base-url https://api.deepseek.com \
--api-key sk-xxxx --model deepseek-chat --lang all
- All API call results are cached in the
.translation_cache/directory and will be used first for subsequent calls.
The translation results have a default state of needs_review. If you need to update them to translated (for example, after reviewing all translations in Xcode and wanting to avoid manually clicking "Mark as Reviewed" for each one), you can use the following command:
string-catalog xcstrings update-state /path_or_dir/to/xcstrings_file \
--old needs_review \
--new translated
App Store Connect Automation
Generate What's New JSON file from xcstrings file:
string-catalog xcstrings generate-whats-new /path_to/WhatsNewLocalizable.xcstrings \
--key v1.1_feature1 \
--key v1.1_feature2
Here is the generated JSON file:
{
"it": "Nuova funzione 1: Titolo\nNuova funzione 2: Titolo",
"pt": "Nova funcionalidade 1: Título\nNova funcionalidade 2: Título",
"ja": "新機能1: タイトル\n新機能2: タイトル",
"zh-Hans": "新功能1: 标题\n新功能2: 标题"
}
Creating ISSUER_ID, KEY_ID, and KEY_FILE for App Store Connect API, then update Whats New using the following command:
export ASC_ISSUER_ID=xxxx
export ASC_KEY_ID=xxxx
export ASC_KEY_FILE=xxxx.p8
string-catalog appstore update-whats-new \
--bundle-id com.xxx.xxx \
--version 1.0.0 \
--json-path whats_new.json \
--platform IOS
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
uv run string-catalog --help
Test:
uv run pytest
Acknowledgments
This project is inspired by swift-translate.
Metadata
Release files for string-catalog 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| string_catalog-0.6.0.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| string_catalog-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.0 kB
Release files / string_catalog-0.6.0.tar.gz
| Download URL | string_catalog-0.6.0.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c98ae6af93d11ee89e7efea28f10b727866b0e4b7c933b06a4dc8b2bc82f7804
|
|
BLAKE2b-256 checksum How to use checksums |
896a59282dcd2e766b4e43d540bdbdd9a34c29349bb2377487d1f6ff99f570d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.
Transparency logRelease files / string_catalog-0.6.0-py3-none-any.whl
| Download URL | string_catalog-0.6.0-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a42b0836782068025891198829300a9cd51e2939a909db89e703f0ced018dea
|
|
BLAKE2b-256 checksum How to use checksums |
9fd7634e5cd423d22b20335d2dba2bc5d0e794f98e906df9c7e8c399f6eed9fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.
Transparency log