finish article_categories controllers i18n + translation
This commit is contained in:
parent
8c8778459e
commit
4aa40b387a
5 changed files with 19 additions and 11 deletions
|
@ -5,17 +5,17 @@ class ArticleCategoriesController < ApplicationController
|
||||||
before_filter :authenticate_article_meta
|
before_filter :authenticate_article_meta
|
||||||
|
|
||||||
def create
|
def create
|
||||||
create!(:notice => "Die Kategorie wurde gespeichert") { article_categories_path }
|
create!(:notice => I18n.t('controllers.create.notice')) { article_categories_path }
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
update!(:notice => "Die Kategorie wurde aktualisiert") { article_categories_path }
|
update!(:notice => I18n.t('controllers.update.notice')) { article_categories_path }
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
destroy!
|
destroy!
|
||||||
rescue => error
|
rescue => error
|
||||||
redirect_to article_categories_path, alert: t('controller.article_categories.destroy.error', message: error.message)
|
redirect_to article_categories_path, alert: I18n.t('controllers.destroy.error', message: error.message)
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -10,3 +10,11 @@ de:
|
||||||
confirm_delete: 'Bist Du sicher?'
|
confirm_delete: 'Bist Du sicher?'
|
||||||
new:
|
new:
|
||||||
title: 'Neue Kategorie anlegen'
|
title: 'Neue Kategorie anlegen'
|
||||||
|
|
||||||
|
# used by controller
|
||||||
|
create:
|
||||||
|
notice: 'Die Kategorie wurde gespeichert'
|
||||||
|
update:
|
||||||
|
notice: 'Die Kategorie wurde aktualisiert'
|
||||||
|
destroy:
|
||||||
|
error: 'Kategorie konnte nicht gelöscht werden: %{message}'
|
||||||
|
|
|
@ -18,10 +18,6 @@ de:
|
||||||
next: "›"
|
next: "›"
|
||||||
truncate: "..."
|
truncate: "..."
|
||||||
|
|
||||||
controller:
|
|
||||||
article_categories:
|
|
||||||
destroy:
|
|
||||||
error: 'Kategorie konnte nicht gelöscht werden: %{message}'
|
|
||||||
date:
|
date:
|
||||||
abbr_day_names:
|
abbr_day_names:
|
||||||
- So
|
- So
|
||||||
|
|
|
@ -10,3 +10,11 @@ en:
|
||||||
confirm_delete: 'Are you sure?'
|
confirm_delete: 'Are you sure?'
|
||||||
new:
|
new:
|
||||||
title: 'Add new category'
|
title: 'Add new category'
|
||||||
|
|
||||||
|
# used by controller
|
||||||
|
create:
|
||||||
|
notice: 'Category was stored'
|
||||||
|
update:
|
||||||
|
notice: 'Category was updated'
|
||||||
|
destroy:
|
||||||
|
error: 'Category could not be deleted: %{message}'
|
||||||
|
|
|
@ -18,10 +18,6 @@ en:
|
||||||
next: "›"
|
next: "›"
|
||||||
truncate: "..."
|
truncate: "..."
|
||||||
|
|
||||||
controller:
|
|
||||||
article_categories:
|
|
||||||
destroy:
|
|
||||||
error: 'Category could not be deleted: %{message}'
|
|
||||||
date:
|
date:
|
||||||
abbr_day_names:
|
abbr_day_names:
|
||||||
- Su
|
- Su
|
||||||
|
|
Loading…
Reference in a new issue