diff options
Diffstat (limited to 'app/controllers/invites_controller.rb')
-rw-r--r-- | app/controllers/invites_controller.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb index 94bb108c5f5..a214b439b22 100644 --- a/app/controllers/invites_controller.rb +++ b/app/controllers/invites_controller.rb @@ -1,3 +1,4 @@ +#encoding: utf-8 class InvitesController < ApplicationController before_action :member skip_before_action :authenticate_user!, only: :decline @@ -12,9 +13,9 @@ class InvitesController < ApplicationController if member.accept_invite!(current_user) label, path = source_info(member.source) - redirect_to path, notice: "You have been granted #{member.human_access} access to #{label}." + redirect_to path, notice: "已接受作为 #{member.human_access} 访问 #{label} 的邀请。" else - redirect_back_or_default(options: { alert: "The invitation could not be accepted." }) + redirect_back_or_default(options: { alert: "此邀请无法被接受。" }) end end @@ -29,9 +30,9 @@ class InvitesController < ApplicationController new_user_session_path end - redirect_to path, notice: "You have declined the invitation to join #{label}." + redirect_to path, notice: "已拒绝加入 #{label} 的邀请。" else - redirect_back_or_default(options: { alert: "The invitation could not be declined." }) + redirect_back_or_default(options: { alert: "此邀请无法被拒绝。" }) end end @@ -53,9 +54,9 @@ class InvitesController < ApplicationController def authenticate_user! return if current_user - notice = "To accept this invitation, sign in" - notice << " or create an account" if current_application_settings.signup_enabled? - notice << "." + notice = "要接受此邀请,请登入" + notice << "或者创建账号" if current_application_settings.signup_enabled? + notice << "。" store_location_for :user, request.fullpath redirect_to new_user_session_path, notice: notice @@ -65,14 +66,14 @@ class InvitesController < ApplicationController case source when Project project = member.source - label = "project #{project.name_with_namespace}" + label = "项目 #{project.name_with_namespace}" path = namespace_project_path(project.namespace, project) when Group group = member.source - label = "group #{group.name}" + label = "群组 #{group.name}" path = group_path(group) else - label = "who knows what" + label = "谁知道" path = dashboard_projects_path end |