Module: I18nDocs

Defined in:
lib/generators/i18n_docs/locales_generator.rb,
lib/i18n_googledocs.rb,
lib/generators/i18n_docs/export_generator.rb,
lib/generators/i18n_docs/import_generator.rb,
lib/generators/i18n_docs/normalize_generator.rb,
lib/generators/i18n_docs/copy_master_generator.rb,
lib/generators/i18n_docs/missing_keys_generator.rb

Overview

for lang in de en it fr; do \

  mkdir -p config/locales/$lang; \
  touch config/locales/$lang/navigation.yml; \
  touch config/locales/$lang/forms.yml; \
done

Defined Under Namespace

Modules: Generators

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.debugObject

Returns the value of attribute debug.



17
18
19
# File 'lib/i18n_googledocs.rb', line 17

def debug
  @debug
end

Class Method Details

.add_locale_paths_for(locales) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/i18n_googledocs.rb', line 27

def add_locale_paths_for locales
    locales.each do |locale|
      path = Rails.root.join('config', 'locales', locale.to_s, '**/*.yml')
      puts "Adding locale path: #{path}" if debug?
      I18n.load_path += Dir[path]
    end
end

.debug!Object



23
24
25
# File 'lib/i18n_googledocs.rb', line 23

def debug!
	@debug = true
end

.debug?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/i18n_googledocs.rb', line 19

def debug?
	@debug
end