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.2.tar.gz (58.2 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.2-py3-none-any.whl (75.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: compare-locales-9.0.2.tar.gz
  • Upload date:
  • Size: 58.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for compare-locales-9.0.2.tar.gz
Algorithm Hash digest
SHA256 588780f837942926760847f43b223056e6cf97f0b3029f51d41d6b9edc0269eb
MD5 123cc252fe89c87051aff02adf4e7215
BLAKE2b-256 5fa338aceb6dc0f05c1a2d2b6ef44fe977911f93e753751acfa59713fce61efd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for compare_locales-9.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec46e2333718ba81a8c23f120e1b2380bd944f58bd69dac15de40e619e8904b
MD5 ad5979ca503d41b3a40c0231c4c58811
BLAKE2b-256 6c253ad4256f7a66edcd5280c3f45c923b9dd8d81d60436d63d7b4781ca82e4d

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