Class: I18nUno::Arbiter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeArbiter

Returns a new instance of Arbiter.



7
8
9
10
11
12
# File 'lib/i18n_uno/arbiter.rb', line 7

def initialize
  @translators = []
  @trees  = {}

  setup_configurations
end

Instance Attribute Details

#source_of_truth_treeObject (readonly)

Returns the value of attribute source_of_truth_tree.



5
6
7
# File 'lib/i18n_uno/arbiter.rb', line 5

def source_of_truth_tree
  @source_of_truth_tree
end

#target_localesObject (readonly)

Returns the value of attribute target_locales.



5
6
7
# File 'lib/i18n_uno/arbiter.rb', line 5

def target_locales
  @target_locales
end

#translatorsObject (readonly)

Returns the value of attribute translators.



5
6
7
# File 'lib/i18n_uno/arbiter.rb', line 5

def translators
  @translators
end

#treesObject (readonly)

Returns the value of attribute trees.



5
6
7
# File 'lib/i18n_uno/arbiter.rb', line 5

def trees
  @trees
end

Instance Method Details

#translateObject



14
15
16
17
18
19
20
21
# File 'lib/i18n_uno/arbiter.rb', line 14

def translate
  print_translations_info

  target_locales.each do |target_locale|
    collect_locale_changes(target_locale)
    process_changes(target_locale)
  end
end