Skip to main content

Lint Mozilla localizations

Project description

Build tests

compare-locales

Lint Mozilla localizations

Finds

  • 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.

Configuration

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

Examples

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.

Source Distribution

compare_locales-9.0.5.tar.gz (59.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

compare_locales-9.0.5-py3-none-any.whl (76.3 kB view details)

Uploaded Python 3

File details

Details for the file compare_locales-9.0.5.tar.gz.

File metadata

  • Download URL: compare_locales-9.0.5.tar.gz
  • Upload date:
  • Size: 59.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for compare_locales-9.0.5.tar.gz
Algorithm Hash digest
SHA256 82f2177552666d0f7af1ccc2940a8d562f345ce3a2e64f1b67853d457ea8ae33
MD5 8ae0acab1c8b00e3b7d66a5386407c21
BLAKE2b-256 99d61437ec990438908eb8766cc4cb68a4e8e0a0fa3cec9a73861e7b383de706

See more details on using hashes here.

File details

Details for the file compare_locales-9.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for compare_locales-9.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 40eaa40fe9290996f5972fa83bc4f9f1e580a6e2ea06087e636e77378d8ed168
MD5 1515ae5b2ea14a640774e67a3101b458
BLAKE2b-256 ce22299da0a35e0acca9164db72cb811a7dd8827b86e9cb890cbee8807799268

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page