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-8.2.0.tar.gz (90.0 kB view details)

Uploaded Source

Built Distribution

compare_locales-8.2.0-py2.py3-none-any.whl (128.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file compare-locales-8.2.0.tar.gz.

File metadata

  • Download URL: compare-locales-8.2.0.tar.gz
  • Upload date:
  • Size: 90.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.11

File hashes

Hashes for compare-locales-8.2.0.tar.gz
Algorithm Hash digest
SHA256 59b2bba3b8b0b07fd637d5b2bb6b357cbb7caf9f0b7b33b9a1b44cb03db7376c
MD5 254889c392b055190f9c870d9a1f5947
BLAKE2b-256 f9202f85ae1604183d815dad4c07d99b936ef536288a25ef65fae62e10875cf1

See more details on using hashes here.

Provenance

File details

Details for the file compare_locales-8.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: compare_locales-8.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 128.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.11

File hashes

Hashes for compare_locales-8.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a447d9702cc9d5c891a4ce7f52267357f98748f413bf8252636952ce53617915
MD5 47326ea413ef62e8d44a4f113edacfda
BLAKE2b-256 f87e4b4aa78b611c26c92ba42084af06ad09e209f9264d4744af35170ef86b88

See more details on using hashes here.

Provenance

Supported by

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