From c693f697fffb7d727a84dbf4bff1b464573563dd Mon Sep 17 00:00:00 2001 From: wvengen Date: Wed, 13 Feb 2013 01:32:48 +0100 Subject: [PATCH] workgroups i18n --- app/controllers/foodcoop/workgroups_controller.rb | 2 +- app/views/workgroups/edit.html.haml | 4 ++-- app/views/workgroups/index.html.haml | 4 ++-- config/locales/de/de.workgroups.yml | 10 ++++++++++ 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 config/locales/de/de.workgroups.yml diff --git a/app/controllers/foodcoop/workgroups_controller.rb b/app/controllers/foodcoop/workgroups_controller.rb index 947bc9ed..cad728e4 100644 --- a/app/controllers/foodcoop/workgroups_controller.rb +++ b/app/controllers/foodcoop/workgroups_controller.rb @@ -14,7 +14,7 @@ class Foodcoop::WorkgroupsController < ApplicationController def update @workgroup = Workgroup.find(params[:id]) if @workgroup.update_attributes(params[:workgroup]) - redirect_to foodcoop_workgroups_url, :notice => "Arbeitsgruppe wurde aktualisiert" + redirect_to foodcoop_workgroups_url, :notice => I18n.t('workgroups.update.notice') else render :action => 'edit' end diff --git a/app/views/workgroups/edit.html.haml b/app/views/workgroups/edit.html.haml index bdb2655c..9346430a 100644 --- a/app/views/workgroups/edit.html.haml +++ b/app/views/workgroups/edit.html.haml @@ -1,4 +1,4 @@ -- title "Edit Workgroup" +- title t('.title') - form_for @workgroup do |f| = f.error_messages %p @@ -81,4 +81,4 @@ = f.label :contact_address %br/ = f.text_field :contact_address - %p= f.submit "Submit" + %p= f.submit t('ui.edit') diff --git a/app/views/workgroups/index.html.haml b/app/views/workgroups/index.html.haml index 67c3793f..ab1ca879 100644 --- a/app/views/workgroups/index.html.haml +++ b/app/views/workgroups/index.html.haml @@ -1,4 +1,4 @@ -- title "Workgroups" +- title t('.title') %table %tr %th Type @@ -43,4 +43,4 @@ %td= h workgroup.contact_person %td= h workgroup.contact_phone %td= h workgroup.contact_address - %td= link_to "Edit", edit_workgroup_path(workgroup) + %td= link_to t('ui.edit'), edit_workgroup_path(workgroup) diff --git a/config/locales/de/de.workgroups.yml b/config/locales/de/de.workgroups.yml new file mode 100644 index 00000000..7ed65253 --- /dev/null +++ b/config/locales/de/de.workgroups.yml @@ -0,0 +1,10 @@ +de: + workgroups: + edit: + title: 'Arbeitsgruppe bearbeiten' + index: + title: 'Arbeitsgruppen' + + # used by controller + update: + notice: 'Arbeitsgruppe wurde aktualisiert'