Class: RailsTranslationManager::LocaleChecker

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

Constant Summary collapse

CHECKER_CLASSES =
[IncompatiblePlurals,
MissingDeclaredLocales,
MissingEnglishLocales,
MissingForeignLocales,
UndeclaredLocaleFiles].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(locale_path, skip_validation = []) ⇒ LocaleChecker

Returns a new instance of LocaleChecker.



13
14
15
16
# File 'lib/rails_translation_manager/locale_checker.rb', line 13

def initialize(locale_path, skip_validation = [])
  @locale_path = locale_path
  @skip_validation = skip_validation
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



18
19
20
21
22
23
# File 'lib/rails_translation_manager/locale_checker.rb', line 18

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