Skip to main content

Lint Mozilla localizations

Project description

Build Status

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

Uploaded Source

Built Distribution

compare_locales-7.2.2-py2.py3-none-any.whl (122.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: compare-locales-7.2.2.tar.gz
  • Upload date:
  • Size: 82.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for compare-locales-7.2.2.tar.gz
Algorithm Hash digest
SHA256 336531bb2f49f295649db9a2e90c191f5438a247f1d344ad6259e6ef272a2fcf
MD5 a1f2151e62395968dae3fe4bc753e7cb
BLAKE2b-256 d7ce7a2fa6468e0d13ad9d27bc65719428afae8cfd90aad7aa13691b43c189ec

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: compare_locales-7.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 122.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for compare_locales-7.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f0afc187d0eb4614fe1f9083c90388cfa11c416137b9340a1302f594fca71e29
MD5 a1322fb701dc0d43cd2190b569d9bed7
BLAKE2b-256 71e318b870b3ef24dec14a107cf8f9f7cec18366053a23520ce166d25ee186b5

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