All Projects → aderyabin → Localer

aderyabin / Localer

Licence: mit
Automatic detecting missing I18n translations tool.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Localer

li18nt
🌎 Lint your i18n translation files. Detect conflicting properties, duplicates and make it more readable and easier to maintain by formatting it!
Stars: ✭ 29 (-86.76%)
Mutual labels:  i18n, cli-app
i18n lazy scope
Use lazy lookup with custom i18n scopes.
Stars: ✭ 11 (-94.98%)
Mutual labels:  i18n, gem
Localeapp
Send and retrieve your ruby i18n localizations to the Locale translation service
Stars: ✭ 225 (+2.74%)
Mutual labels:  i18n, gem
academic
Jekyll theme with a focus on simplicity, typography and flexibility
Stars: ✭ 71 (-67.58%)
Mutual labels:  i18n, gem
Tldr
Golang command line client for tldr https://github.com/tldr-pages/tldr
Stars: ✭ 210 (-4.11%)
Mutual labels:  cli-app
Squid
A Ruby library to plot charts in PDF files
Stars: ✭ 205 (-6.39%)
Mutual labels:  gem
Heyui
🎉UI Toolkit for Web, Vue2.0 http://www.heyui.top
Stars: ✭ 2,373 (+983.56%)
Mutual labels:  i18n
Arctic admin
Responsive Theme for ActiveAdmin
Stars: ✭ 201 (-8.22%)
Mutual labels:  gem
Graphql Rest Proxy
Turn your REST API into GraphQL - A Proxy Server that pipes request from GraphQL to REST with GraphQL DSL, performant nested children, mutations, input types, and more.
Stars: ✭ 218 (-0.46%)
Mutual labels:  cli-app
Serge
Continuous localization platform
Stars: ✭ 212 (-3.2%)
Mutual labels:  i18n
Postalcodevalidator
A validator for postal codes with support for 200+ regions
Stars: ✭ 211 (-3.65%)
Mutual labels:  i18n
Glotpress Wp
🌍 🌎 🌏 GlotPress is a WordPress plugin to let you set up your own collaborative, web-based software translation tool.
Stars: ✭ 205 (-6.39%)
Mutual labels:  i18n
Tempura
Pure Clojure/Script i18n translations library
Stars: ✭ 211 (-3.65%)
Mutual labels:  i18n
Sclack
The best CLI client for Slack, because everything is terrible!
Stars: ✭ 2,363 (+979%)
Mutual labels:  cli-app
Geek Life
The Todo List / Task Manager for Geeks in command line
Stars: ✭ 212 (-3.2%)
Mutual labels:  cli-app
Do Not Disturb Cli
Control the macOS `Do Not Disturb` feature from the command-line
Stars: ✭ 205 (-6.39%)
Mutual labels:  cli-app
Nuxt Juejin Project
仿掘金web网站,使用服务端渲染。主要技术:nuxt + koa + vuex + axios + element-ui 。
Stars: ✭ 209 (-4.57%)
Mutual labels:  i18n
Jekyll Toc
Jekyll plugin which generates a table of contents.
Stars: ✭ 211 (-3.65%)
Mutual labels:  gem
Vue Blog
🎉 基于vue全家桶 + element-ui 构建的一个后台管理集成解决方案
Stars: ✭ 208 (-5.02%)
Mutual labels:  i18n
Gemsurance
Gem vulnerability checker using rubysec/ruby-advisory-db
Stars: ✭ 207 (-5.48%)
Mutual labels:  gem

Gem Version Build Status

Localer is a tool that automatically detects missing I18n translations.

The goal is to preserve the integrity of translations. Localer parses and merges all application locales’ keys. At the next step, it searches for missing translations among the calculated keys.

Installation

Add this line to your application's Gemfile:

gem 'localer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install localer

Usage

At the root directory of a Rails app, run:

$ localer check .

or for specific Rails path:

$ localer check /path/to/rails/application

CI integration

Localer is easy to integrate into your favorite CI workflow:

# .travis.yml

# other configuration options
script:
  - bundle exec bundle-audit
  - bundle exec rubocop
  - bundle exec rspec
  - bundle exec localer

or

# Rakefile

# other requirements
require 'localer/rake_task'
Localer::RakeTask.new()

task(:default).clear
task default: [:rubocop, :spec, :localer]

Support

Localer supports

  • Ruby: 2.4, 2.5, 2.6, 2.7
  • Rails: 5.0, 5.1, 5.2, 6.0

Configuration

The behavior of Localer can be controlled via the .localer.yml configuration file. It makes it possible to disable locales and keys. The file can be placed in your project directory.

Disable specific locale

By default, Localer enables all locales, but you can disable it:

Locale:
  EN:
    Enabled: false

Exclude keys globally

By default, Localer enables all keys, but you can disable keys started with specified string or by regex:

Exclude:
  - /population\z/
  - .countries.france

Exclude keys for specific locale

Locale:
  EN:
    Exclude:
      - /population\z/
      - .countries.france

Using Rake

Localer ships with a rake task. To use Localer's rake task you simply need to require the task file and define a task with it. Below is a rake task that will run localer:

require 'rubygems'
require 'localer'
require 'localer/rake_task'

Localer::RakeTask.new(:localer)

When you now run:

$ rake -T

you should see

rake localer  # Run Localer

Development

After checking out the repo, run bundle exec appraisal install to install dependencies for each appraisal. Then, run bundle exec appraisal rake to run the tests.

Built With

  • Thor - Used for building command-line interfaces.
  • Appraisal - Used for testing against different versions of dependencies
  • Cucumber + Aruba - Used for testing command-line commands

Acknowledge

Special thanks to Roman Shamin for the logo.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/aderyabin/localer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Localer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].