| 1 |
Metadata-Version: 2.1 |
| 2 |
Name: compare-locales |
| 3 |
Version: 9.0.1 |
| 4 |
Summary: Lint Mozilla localizations |
| 5 |
Home-page: https://github.com/mozilla/compare-locales |
| 6 |
Author: Axel Hecht |
| 7 |
Author-email: [email protected] |
| 8 |
License: MPL 2.0 |
| 9 |
Platform: any |
| 10 |
Classifier: Development Status :: 5 - Production/Stable |
| 11 |
Classifier: Intended Audience :: Developers |
| 12 |
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) |
| 13 |
Classifier: Operating System :: OS Independent |
| 14 |
Classifier: Programming Language :: Python |
| 15 |
Classifier: Programming Language :: Python :: 3 |
| 16 |
Classifier: Programming Language :: Python :: 3.7 |
| 17 |
Classifier: Programming Language :: Python :: 3.8 |
| 18 |
Classifier: Programming Language :: Python :: 3.9 |
| 19 |
Classifier: Topic :: Software Development :: Libraries :: Python Modules |
| 20 |
Classifier: Topic :: Software Development :: Localization |
| 21 |
Classifier: Topic :: Software Development :: Testing |
| 22 |
Requires-Python: >=3.7, <4 |
| 23 |
Description-Content-Type: text/markdown |
| 24 |
License-File: LICENSE.md |
| 25 |
Requires-Dist: fluent.syntax (<0.20,>=0.18.0) |
| 26 |
Requires-Dist: six |
| 27 |
Requires-Dist: toml |
| 28 |
|
| 29 |
 |
| 30 |
# compare-locales |
| 31 |
Lint Mozilla localizations |
| 32 |
|
| 33 |
Finds |
| 34 |
* missing strings |
| 35 |
* obsolete strings |
| 36 |
* errors on runtime errors without false positives |
| 37 |
* warns on possible runtime errors |
| 38 |
|
| 39 |
It also includes `l10n-merge` functionality, which pads localizations with |
| 40 |
missing English strings, and replaces entities with errors with English. |
| 41 |
|
| 42 |
If you want to check your original code for errors like duplicated messages, |
| 43 |
use `moz-l10n-lint`, which is also part of this package. You can also use |
| 44 |
this to check for conflicts between your strings and those already exposed |
| 45 |
to l10n. |
| 46 |
|
| 47 |
# Configuration |
| 48 |
|
| 49 |
You configure `compare-locales` (and `moz-l10n-lint`) through a |
| 50 |
[project configuration](https://moz-l10n-config.readthedocs.io/en/latest/fileformat.html) |
| 51 |
file, `l10n.toml`. |
| 52 |
|
| 53 |
# Examples |
| 54 |
|
| 55 |
To check all locales in a project use |
| 56 |
|
| 57 |
```bash |
| 58 |
compare-locales l10n.toml . |
| 59 |
``` |
| 60 |
|
| 61 |
To check Firefox against a local check-out of l10n-central, use |
| 62 |
|
| 63 |
```bash |
| 64 |
compare-locales browser/locales/l10n.toml ../l10n-central |
| 65 |
``` |
| 66 |
|
| 67 |
If you just want to check particular locales, specify them as additional |
| 68 |
commandline parameters. |
| 69 |
|
| 70 |
To lint your local work, use |
| 71 |
|
| 72 |
```bash |
| 73 |
moz-l10n-lint l10n.toml |
| 74 |
``` |
| 75 |
|
| 76 |
To check for conflicts against already existing strings: |
| 77 |
|
| 78 |
```bash |
| 79 |
moz-l10n-lint --reference-project ../android-l10n/mozilla-mobile/fenix l10n.toml |
| 80 |
moz-l10n-lint --l10n-reference ../gecko-strings browser/locales/l10n.toml |
| 81 |
``` |
| 82 |
|
| 83 |
to check for a monolithic project like Fenix or a gecko project like Firefox, |
| 84 |
resp. |