Skip to main content

xcstrings-tool

Audit and analyze Xcode String Catalogs (.xcstrings) for localization completeness.

PyPI Tests Python License

The Problem

You built your iOS app in English. Now you need Spanish, French, and 10 other languages. How do you track:

  • Which strings are missing translations?
  • Which translations need review?
  • Your overall completion percentage?

xcstrings-tool answers these questions.

Installation

pip install xcstrings-tool

Or with pipx (recommended for CLI tools):

pipx install xcstrings-tool

Quick Start

# Audit your localization status
xcstrings-tool audit Localizable.xcstrings --target es-MX

# Export missing translations to CSV
xcstrings-tool export Localizable.xcstrings --target fr

# Validate catalog structure
xcstrings-tool validate Localizable.xcstrings

# Show statistics
xcstrings-tool stats Localizable.xcstrings

Features

  • Comprehensive localization reports with progress tracking
  • Multiple output formats: console, JSON, CSV, Markdown
  • CI/CD integration with configurable thresholds
  • Fast and reliable (90%+ test coverage)
  • Python 3.9+ on macOS and Linux

Commands

audit

Analyze localization completeness for a target language.

xcstrings-tool audit Localizable.xcstrings --target es-MX

Options:

  • --target, -t: Target language code (default: es-MX)
  • --format, -f: Output format(s): console, json, csv, markdown (can specify multiple)
  • --output-dir, -o: Directory for output files
  • --verbose, -v: Show detailed entry lists
  • --threshold: Fail if completion below percentage (for CI)

Examples:

# Basic audit
xcstrings-tool audit Localizable.xcstrings

# Multiple formats
xcstrings-tool audit Localizable.xcstrings -f json -f csv -o reports/

# CI integration
xcstrings-tool audit Localizable.xcstrings --threshold 80

export

Export missing translations to CSV for translation vendors.

xcstrings-tool export Localizable.xcstrings --target fr

Options:

  • --target, -t: Target language code (required)
  • --output, -o: Output CSV file path

validate

Validate String Catalog JSON structure.

xcstrings-tool validate Localizable.xcstrings

stats

Show quick statistics about the catalog.

xcstrings-tool stats Localizable.xcstrings

CI/CD Integration

Use the --threshold flag to fail builds when localization falls below a target:

# GitHub Actions example
- name: Check localization
  run: |
    pip install xcstrings-tool
    xcstrings-tool audit Localizable.xcstrings --target es-MX --threshold 80

Exit codes:

  • 0: Success (or above threshold)
  • 1: Error or below threshold

Output Formats

Console

Beautiful terminal output with progress bars and tables.

JSON

{
  "summary": {
    "total_strings": 1231,
    "translated": 638,
    "missing_translation": 593,
    "completion_percentage": 51.8
  },
  "missing_translations": [...]
}

CSV

Import into Google Sheets, Excel, or translation management systems.

Markdown

Generate reports for documentation or GitHub issues.

Development

# Clone repo
git clone https://github.com/jaalbin24/xcstrings-tool.git
cd xcstrings-tool

# Install with Poetry
poetry install

# Run tests
poetry run pytest

# Run linting
poetry run ruff check .
poetry run mypy src/

# Install pre-commit hooks
poetry run pre-commit install

Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT License. See LICENSE for details.

Author

Morgan Olive

Metadata

Release files for xcstrings-tool 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xcstrings-tool 0.1.0
File Size Uploaded Provenance
xcstrings_tool-0.1.0.tar.gz 12.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xcstrings-tool 0.1.0
File Interpreter ABI Platform
xcstrings_tool-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.8 kB

Release files / xcstrings_tool-0.1.0.tar.gz

Download URL xcstrings_tool-0.1.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b335e10be1958a5cff3fc1d9fca826c660ff525c17a2e0368f9b1c5374bbfec7
BLAKE2b-256 checksum
How to use checksums
a0763926fd35822e1e0fb135b6f3b1c567b608573da15474e5e7cde7db8ca7e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.14 Linux/6.11.0-1018-azure

Release files / xcstrings_tool-0.1.0-py3-none-any.whl

Download URL xcstrings_tool-0.1.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3503003670faf9899e18c70bf5618abf60ea2d79a47968da41fe5f255d407164
BLAKE2b-256 checksum
How to use checksums
aebc87585ec940e0c35747a29eb2592aa521f47f7ecf18280d3647c3addfe6dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.14 Linux/6.11.0-1018-azure

Security for xcstrings-tool 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page