From b5f089f2b7100dffb1a346e95022f88e6ff06415 Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Mon, 28 Jan 2019 18:07:08 +0000 Subject: Added rubocop-i18n to lint untrasnslated strings --- .rubocop.yml | 6 ++++++ Gemfile | 1 + Gemfile.lock | 3 +++ 3 files changed, 10 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index bcff67ded8c..48147c2654c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,6 +6,7 @@ inherit_from: .rubocop_todo.yml require: - ./rubocop/rubocop - rubocop-rspec + - rubocop-i18n AllCops: TargetRailsVersion: 5.0 @@ -22,6 +23,11 @@ AllCops: - 'plugins/**/*' CacheRootDirectory: tmp +GetText: + Enabled: true +RailsI18n: + Enabled: false + # This cop checks whether some constant value isn't a # mutable literal (e.g. array or hash). Style/MutableConstant: diff --git a/Gemfile b/Gemfile index b3eeb3ec0ec..f4e402723e6 100644 --- a/Gemfile +++ b/Gemfile @@ -283,6 +283,7 @@ gem 'rails-i18n', '~> 5.1' gem 'gettext_i18n_rails', '~> 1.8.0' gem 'gettext_i18n_rails_js', '~> 1.3' gem 'gettext', '~> 3.2.2', require: false, group: :development +gem 'rubocop-i18n', '~> 2.0' gem 'batch-loader', '~> 1.2.2' diff --git a/Gemfile.lock b/Gemfile.lock index 419a6831924..b76c00df7a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -769,6 +769,8 @@ GEM unicode-display_width (~> 1.0, >= 1.0.1) rubocop-gitlab-security (0.1.1) rubocop (>= 0.51) + rubocop-i18n (2.0.0) + rubocop (~> 0.51) rubocop-rspec (1.22.2) rubocop (>= 0.52.1) ruby-enum (0.7.2) @@ -1132,6 +1134,7 @@ DEPENDENCIES rspec_junit_formatter rspec_profiling (~> 0.0.5) rubocop (~> 0.54.0) + rubocop-i18n (~> 2.0) rubocop-rspec (~> 1.22.1) ruby-fogbugz (~> 0.2.1) ruby-prof (~> 0.17.0) -- cgit v1.2.3