Class: I18nTyml::TranslationManager

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ TranslationManager

Returns a new instance of TranslationManager.



8
9
10
11
12
# File 'lib/i18n_tyml.rb', line 8

def initialize(options)
  @dest_path = options[:path]
  @remove_default = options[:remove_default]
  @existed_translations = Hash.new
end

Instance Method Details

#search_missing(lang = nil) ⇒ Object



14
15
16
17
18
19
# File 'lib/i18n_tyml.rb', line 14

def search_missing(lang=nil)
  collect_translations

  languages = lang ? [lang] : existed_trans.keys
  get_missing(collect_trans_in_erb(), languages )
end