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

Uploaded Source

Built Distribution

compare_locales-9.0.3-py3-none-any.whl (75.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: compare_locales-9.0.3.tar.gz
  • Upload date:
  • Size: 58.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.6

File hashes

Hashes for compare_locales-9.0.3.tar.gz
Algorithm Hash digest
SHA256 b823b15d112dad4683dbc49ae89993afe90e721c34e2a352774d7982327a1962
MD5 f7729b245c3135e109efecde10098848
BLAKE2b-256 6bb5ad98aa78b0eb2f65a318277ebcbd333617926988956c30e40dc4f38019c0

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for compare_locales-9.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9be0f94a56df0c342880f09fd7394a4ffac447462ba51dc043e8b31502c32190
MD5 7f4396534dd6f3040a5086b0b49eb639
BLAKE2b-256 acc9eebb41974b3e6c2d99a57cea7d4ddb875e4c91420dbf135700a30be47e0a

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