lib/pah/templates/locale.rb in pah-0.0.26 vs lib/pah/templates/locale.rb in pah-0.0.27

- old
+ new

@@ -2,31 +2,24 @@ module Templates class Locale < Pah::Template 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' - git_commit 'Add pt-BR locale files.' + git add: 'config/locales/*.yml config/initializers/locale.rb' - time_zone_config = <<TIME_ZONE + 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, after: "# config.time_zone = 'Central Time (US & Canada)'", verbose: false + inject_into_file 'config/application.rb', time_zone_config, before: ' # Settings in config/environments/* take precedence over those specified here.', verbose: false - locale_config = <<LOCALE - - config.i18n.enforce_available_locales = true - config.i18n.default_locale = :'pt-BR' - config.i18n.locale = :'pt-BR' -LOCALE - - inject_into_file 'config/application.rb', locale_config, after: '# config.i18n.default_locale = :de', verbose: false - git add: 'config/application.rb' - git_commit 'Add locale config.' + git_commit 'Add time_zone config.' end end end end