skillfed

compare-locales

Lint Mozilla localizations

compare-locales v9.0.5 81.7K downloads/30d#14,206 on PyPI5
Copyleft license MPL-2.0 Active released

What it is and what it does

compare-locales is a command-line linter and merge tool for Mozilla localization workflows. It validates localization files against a reference (typically English) to detect missing strings, obsolete entries, and runtime errors without false positives, while also warning on potential issues. The package includes two main tools: compare-locales for validating locales across a project, and moz-l10n-lint for checking local work and detecting string conflicts.

The tool is configured via an l10n.toml project file and works with Mozilla's localization structure. It can merge localizations by padding them with missing English strings and replacing error-prone entities with English fallbacks, making it essential for maintaining consistency across multiple language variants in large projects.

Use it for:

  • Validate all locales in a Mozilla project against a reference configuration to catch missing or obsolete strings before release.
  • Lint local localization work before committing to detect errors and conflicts in string definitions.
  • Merge localizations with English fallbacks to ensure no untranslated strings break the application at runtime.
  • Check for conflicts between locally-defined strings and those already exposed to the l10n community.
  • Integrate into CI/CD pipelines to enforce localization quality standards across monolithic and gecko-based projects.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Lints Mozilla localization files to find missing, obsolete, and erroneous strings; also merges localizations with English fallbacks and checks for conflicts in string definitions.

Yes, if you maintain Mozilla localizations or similar multi-language projects. The tool is actively maintained, has no known vulnerabilities, and low install friction. The copyleft license is standard for Mozilla tooling; verify it aligns with your project's licensing model before use.

Install

compare-locales on PyPI

pip

pip install compare-locales

uv

uv add compare-locales

poetry

poetry add compare-locales

Installing compare-locales

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained as of May 2026, with recent commits and production-stable status.

License in practice

Mozilla Public License 2.0 (copyleft) requires that modifications and derivative works remain under MPL-2.0; suitable for internal tooling and open-source projects but check your licensing requirements if distributing modified versions.

Quickstart

pip install compare-locales

compare-locales l10n.toml .
moz-l10n-lint l10n.toml

Requires an l10n.toml configuration file in your project; see moz-l10n-config documentation for format details.

Verify before relying

  • Whether fluent.syntax, six, and toml are bundled or require separate installation in your environment.
  • Performance characteristics when linting large localization projects with many locales.

Package facts

License MPL-2.0 (copyleft)
Python support supports the current Python release (<4,>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 3 — fluent.syntax, six, toml
Maintenance actively maintained — 76 days since the last release
Last repo commit
First released
Downloads 81,727/month — #14,206 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: compare_locales-9.0.5-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: LocalizationTopic :: Software Development :: Testing

Tags

localization lintingl10n validationmozilla locales checkertranslation string errorsl10n merge toollocalization quality assurance
l10n-toolingmozilla-ecosystemci-cd-ready

More Python Modules packages