Code Monkey home page Code Monkey logo

compare-locales's Introduction

Build Status

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.

compare-locales's People

Contributors

bhearsum avatar ccooper avatar flodolo avatar jotes avatar pike avatar stasm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gphemsley milossh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.