add missing i18n

This commit is contained in:
wvengen 2013-10-02 17:13:49 +02:00
parent 1d8fefcfb7
commit a8ace3bc79
3 changed files with 13 additions and 3 deletions

View file

@ -26,7 +26,7 @@ class ApplicationController < ActionController::Base
def deny_access
session[:return_to] = request.original_url
redirect_to login_url, :alert => 'Access denied!'
redirect_to login_url, :alert => I18n.t('application.controller.error_denied')
end
private
@ -37,7 +37,7 @@ class ApplicationController < ActionController::Base
# No user at all: redirect to login page.
session[:user_id] = nil
session[:return_to] = request.original_url
redirect_to login_url, :alert => 'Authentication required!'
redirect_to login_url, :alert => I18n.t('application.controller.error_authn')
else
# We have an authenticated user, now check role...
# Roles gets the user through his memberships.
@ -83,7 +83,7 @@ class ApplicationController < ActionController::Base
def authenticate_membership_or_admin
@group = Group.find(params[:id])
unless @group.member?(@current_user) or @current_user.role_admin?
redirect_to root_path, alert: "Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!"
redirect_to root_path, alert: I18n.t('application.controller.error_members_only')
end
end

View file

@ -212,6 +212,11 @@ de:
workgroups:
members: Mitglieder
name: Name
application:
controller:
error_denied:
error_authn:
error_members_only: 'Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!'
article_categories:
create:
notice: Die Kategorie wurde gespeichert

View file

@ -212,6 +212,11 @@ en:
workgroups:
members: members
name: name
application:
controller:
error_denied: 'Access denied!'
error_authn: 'Authentication required!'
error_members_only: 'This action is only available to members of the group!'
article_categories:
create:
notice: Category was stored