From e0b781fca66a74acc4326741148a8127073857dc Mon Sep 17 00:00:00 2001 From: wvengen Date: Fri, 1 Feb 2013 17:56:34 +0100 Subject: [PATCH] split locales into directory, and load from there --- app/views/home/_start_nav.haml | 4 ++-- config/application.rb | 4 ++-- config/locales/{de.yml => de/de.defaults.yml} | 0 config/locales/{en.yml => en/en.defaults.yml} | 2 ++ config/locales/{ => en}/simple_form.en.yml | 0 5 files changed, 6 insertions(+), 4 deletions(-) rename config/locales/{de.yml => de/de.defaults.yml} (100%) rename config/locales/{en.yml => en/en.defaults.yml} (99%) rename config/locales/{ => en}/simple_form.en.yml (100%) diff --git a/app/views/home/_start_nav.haml b/app/views/home/_start_nav.haml index 2b246a51..99b15aae 100644 --- a/app/views/home/_start_nav.haml +++ b/app/views/home/_start_nav.haml @@ -1,5 +1,5 @@ .well.well-small - %h3 Direkt zu ... + %h3= t('home.start_nav.title') %ul.nav.nav-list %li.nav-header Foodcoop %li= link_to "Mitglieder", foodcoop_users_path @@ -31,4 +31,4 @@ - if @current_user.role_admin? %li.nav-header Administration %li= link_to "Neue Bestellgruppe", new_admin_ordergroup_path - %li= link_to "Neues Mitglied", new_admin_user_path \ No newline at end of file + %li= link_to "Neues Mitglied", new_admin_user_path diff --git a/config/application.rb b/config/application.rb index dc78763e..fcabac5d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -29,8 +29,8 @@ module Foodsoft # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + # The default locale is :en and all translations from config/locales//*.rb.yml are auto loaded. + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] config.i18n.default_locale = :de # Configure the default encoding used in templates for Ruby 1.9. diff --git a/config/locales/de.yml b/config/locales/de/de.defaults.yml similarity index 100% rename from config/locales/de.yml rename to config/locales/de/de.defaults.yml diff --git a/config/locales/en.yml b/config/locales/en/en.defaults.yml similarity index 99% rename from config/locales/en.yml rename to config/locales/en/en.defaults.yml index 0b5fd992..f9f830ef 100644 --- a/config/locales/en.yml +++ b/config/locales/en/en.defaults.yml @@ -8,6 +8,8 @@ en: home: index: title: Homepage + start_nav: + title: Directly to ... group_orders: messages: diff --git a/config/locales/simple_form.en.yml b/config/locales/en/simple_form.en.yml similarity index 100% rename from config/locales/simple_form.en.yml rename to config/locales/en/simple_form.en.yml