Class: MnoEnterprise::Frontend::LocalesGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/mno_enterprise/frontend/locales_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ LocalesGenerator

Returns a new instance of LocalesGenerator.



8
9
10
# File 'lib/mno_enterprise/frontend/locales_generator.rb', line 8

def initialize(path)
  @path = path
end

Instance Method Details

#generate_jsonObject

Generate JSON locales



13
14
15
16
17
18
19
# File 'lib/mno_enterprise/frontend/locales_generator.rb', line 13

def generate_json
  translations_hash = get_translations

  translations_hash.each do |locale, translations|
    generate_locale(locale, translations)
  end
end