Class: RailsTranslationManager::LocaleChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_translation_manager/locale_checker.rb

Constant Summary collapse

CHECKER_CLASSES =
[MissingEnglishLocales,
MissingForeignLocales,
IncompatiblePlurals].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(locale_path) ⇒ LocaleChecker

Returns a new instance of LocaleChecker.



11
12
13
# File 'lib/rails_translation_manager/locale_checker.rb', line 11

def initialize(locale_path)
  @locale_path = locale_path
end

Instance Attribute Details

#locale_pathObject (readonly)

Returns the value of attribute locale_path.



5
6
7
# File 'lib/rails_translation_manager/locale_checker.rb', line 5

def locale_path
  @locale_path
end

Instance Method Details

#validate_localesObject



15
16
17
18
19
20
# File 'lib/rails_translation_manager/locale_checker.rb', line 15

def validate_locales
  output_result
rescue AllLocales::NoLocaleFilesFound => e
  puts e
  false
end