Lint Mozilla localizations
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file compare_locales-9.0.4.tar.gz
.
File metadata
- Download URL: compare_locales-9.0.4.tar.gz
- Upload date:
- Size: 58.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d0d384aefa0bc96f5fd8521c08c8bb89b16a37316701323a77960accabd551 |
|
MD5 | 332eeca71170d55ee5705dbc39bbf8cb |
|
BLAKE2b-256 | e056b0307642caae7fe5276b529852ba3c5436d4f61b97319874d0a5393365a9 |
File details
Details for the file compare_locales-9.0.4-py3-none-any.whl
.
File metadata
- Download URL: compare_locales-9.0.4-py3-none-any.whl
- Upload date:
- Size: 75.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 933d2b6e20f460d3ac2d3176295684505a42085b25e6c31944fcafbaf52f1cc0 |
|
MD5 | 8f3ea1ea83b169668a458a577c4ae2cf |
|
BLAKE2b-256 | 39517e5b671298d1486e2041898e050d8a7c2aa2df1dea8c61b7be578994e69a |