Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Lint Mozilla localizations

Project description

Build Status


Lint Mozilla localizations


  • missing strings
  • obsolete strings
  • errors on runtime errors without false positives
  • warns on possible runtime errors

It also includes l10n-merge functionality, which pads localizations with missing English strings, and replaces entities with errors with English.

If you want to check your original code for errors like duplicated messages, use moz-l10n-lint, which is also part of this package. You can also use this to check for conflicts between your strings and those already exposed to l10n.


You configure compare-locales (and moz-l10n-lint) through a project configuration file, l10n.toml.


To check all locales in a project use

compare-locales l10n.toml .

To check Firefox against a local check-out of l10n-central, use

compare-locales browser/locales/l10n.toml ../l10n-central

If you just want to check particular locales, specify them as additional commandline parameters.

To lint your local work, use

moz-l10n-lint l10n.toml

To check for conflicts against already existing strings:

moz-l10n-lint --reference-project ../android-l10n/mozilla-mobile/fenix l10n.toml
moz-l10n-lint --l10n-reference ../gecko-strings browser/locales/l10n.toml

to check for a monolithic project like Fenix or a gecko project like Firefox, resp.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for compare-locales, version 7.4.0
Filename, size File type Python version Upload date Hashes
Filename, size compare_locales-7.4.0-py2.py3-none-any.whl (127.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size compare-locales-7.4.0.tar.gz (86.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page