Lint Mozilla localizations
Project description
[![Build Status](https://travis-ci.org/Pike/compare-locales.svg?branch=master)](https://travis-ci.org/Pike/compare-locales) # 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](https://moz-l10n-config.readthedocs.io/en/latest/fileformat.html) file, l10n.toml.
# Examples
To check all locales in a project use
`bash compare-locales l10n.toml . `
To check Firefox against a local check-out of l10n-central, use
`bash 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
`bash moz-l10n-lint l10n.toml `
To check for conflicts against already existing strings:
`bash 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-8.1.0.tar.gz
.
File metadata
- Download URL: compare-locales-8.1.0.tar.gz
- Upload date:
- Size: 85.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d374ff959d5de2cfd5b94caf6b0fa61445f1d8ede5af384002cb3542aacad3a |
|
MD5 | cec662a475366baca27f8d3edfcf3793 |
|
BLAKE2b-256 | 537325bb3b3e1a0e697a675faf1ab4ef4b745be0451b8550a3857cb7f6df42f7 |
Provenance
File details
Details for the file compare_locales-8.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: compare_locales-8.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 130.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 286270797ce64f7a2f25e734bb437870661409884a4f0971c0bb94fdad6c1f35 |
|
MD5 | 7a944f385053fc08fb73179da2fad23a |
|
BLAKE2b-256 | 1d4a0a99f6172a3b5563b61ab7d8fab39f2c9aa9b40c8fed199bba0534af506a |