Class: Pah::Templates::Locale
- Inherits:
-
Pah::Template
- Object
- Rails::Generators::Base
- Pah::Template
- Pah::Templates::Locale
- Defined in:
- lib/pah/templates/locale.rb
Instance Method Summary collapse
Methods inherited from Pah::Template
#ask_unless_test, #copy_static_file, #git_commit, #static_files, #will_you_like_to?
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pah/templates/locale.rb', line 4 def call copy_static_file 'config/locales/pt-BR.yml' copy_static_file 'config/locales/app.pt-BR.yml' copy_static_file 'config/initializers/locale.rb' git add: 'config/locales/*.yml config/initializers/locale.rb' git_commit 'Add pt-BR locale configuration.' time_zone_config = <<TIME_ZONE config.time_zone = ENV.fetch('TZ', 'Brasilia') TIME_ZONE inject_into_file 'config/application.rb', time_zone_config, before: ' # Settings in config/environments/* take precedence over those specified here.', verbose: false git add: 'config/application.rb' git_commit 'Add time_zone config.' end |