Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 2.08 KB

README.md

File metadata and controls

48 lines (36 loc) · 2.08 KB

forthebadge

MIT Licence Known Vulnerabilities Maintainability

Some helper tools to validate and compare language files for the if me project.

In order to get started, install your dependencies with bundler.

bundle install

Most tools require a path to your local ifme checkout. I've set ../ifme as the default, provide --path if you need a different path.

Suggest language

Contains a little tool to check if me translation files for better style suggestions based on LanguageTool.org

Needs a LanguageTool.org instance running locally. (See http://wiki.languagetool.org/http-server)

ruby suggestlang.rb --help
Usage: suggestlang.rb [options]
Make sure a languagetool.org instance is running.
See: http://wiki.languagetool.org/http-server

    -l, --language LANGUAGE          Language code (default: en)
    -p, --path PATH                  Path to if me checkout (default: ../ifme)
    -t, --tool URI                   Url to languagetool.org instance (default: http://localhost:8081/v2)

Compare languages

Contains a little tool that shows which keys don't exist in the comparelanguage.

ruby comparelang.rb --help
Usage: comparelang.rb [options]
Compares two languages for missing keys

    -s, --sourcelanguage LANGUAGE    Language code (default: en)
    -c, --comparelanguage LANGUAGE   Language code (default: sv)
    -p, --path PATH                  Path to if me checkout (default: ../ifme)

Best used with en (default) as a source language. Example below compares 'en' locale on the left hand side and 'nl' on the right hand site.

ruby comparelang.rb -c nl