workgroups i18n

This commit is contained in:
wvengen 2013-02-13 01:32:48 +01:00
parent 02f04be6e8
commit c693f697ff
4 changed files with 15 additions and 5 deletions

View file

@ -14,7 +14,7 @@ class Foodcoop::WorkgroupsController < ApplicationController
def update def update
@workgroup = Workgroup.find(params[:id]) @workgroup = Workgroup.find(params[:id])
if @workgroup.update_attributes(params[:workgroup]) 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 else
render :action => 'edit' render :action => 'edit'
end end

View file

@ -1,4 +1,4 @@
- title "Edit Workgroup" - title t('.title')
- form_for @workgroup do |f| - form_for @workgroup do |f|
= f.error_messages = f.error_messages
%p %p
@ -81,4 +81,4 @@
= f.label :contact_address = f.label :contact_address
%br/ %br/
= f.text_field :contact_address = f.text_field :contact_address
%p= f.submit "Submit" %p= f.submit t('ui.edit')

View file

@ -1,4 +1,4 @@
- title "Workgroups" - title t('.title')
%table %table
%tr %tr
%th Type %th Type
@ -43,4 +43,4 @@
%td= h workgroup.contact_person %td= h workgroup.contact_person
%td= h workgroup.contact_phone %td= h workgroup.contact_phone
%td= h workgroup.contact_address %td= h workgroup.contact_address
%td= link_to "Edit", edit_workgroup_path(workgroup) %td= link_to t('ui.edit'), edit_workgroup_path(workgroup)

View file

@ -0,0 +1,10 @@
de:
workgroups:
edit:
title: 'Arbeitsgruppe bearbeiten'
index:
title: 'Arbeitsgruppen'
# used by controller
update:
notice: 'Arbeitsgruppe wurde aktualisiert'