feat(invite): i18n create/destroy
This commit is contained in:
parent
284ecf864b
commit
11eb0a9c56
3 changed files with 13 additions and 3 deletions
|
@ -15,7 +15,7 @@ class InvitesController < ApplicationController
|
|||
|
||||
if invite.valid?
|
||||
# The notification is sent through an after commit hook in order to avoir concurrency issues
|
||||
flash.notice = "Une invitation a été envoyée à #{invite.email}."
|
||||
flash.notice = t('views.invites.create.success', email: invite.email)
|
||||
else
|
||||
flash.alert = invite.errors.full_messages
|
||||
end
|
||||
|
@ -49,9 +49,9 @@ class InvitesController < ApplicationController
|
|||
if invite.present?
|
||||
@dossier = invite.dossier
|
||||
invite.destroy!
|
||||
flash.notice = "L’autorisation de #{invite.email} vient d’être révoquée."
|
||||
flash.notice = t('views.invites.destroy.success', email: invite.email)
|
||||
else
|
||||
flash.alert = "Vous ne pouvez pas révoquer cette autorisation"
|
||||
flash.alert = t('views.invites.destroy.error')
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
|
|
|
@ -311,6 +311,11 @@ en:
|
|||
resent: 'Resend the confirmation email'
|
||||
faq: 'Also, you can check our'
|
||||
invites:
|
||||
create:
|
||||
success: "One invitation has been sent to %{email}."
|
||||
destroy:
|
||||
success: "The permission given to %{email} had been revoked."
|
||||
error: "You can't revoke this invitation"
|
||||
dropdown:
|
||||
invite_to_edit: Invite someone to edit this file
|
||||
view_invited_people: "View invited people"
|
||||
|
|
|
@ -307,6 +307,11 @@ fr:
|
|||
resent: 'Renvoyer un email de confirmation'
|
||||
faq: 'Vous pouvez également consulter notre'
|
||||
invites:
|
||||
create:
|
||||
success: "Une invitation a été envoyée à %{email}."
|
||||
destroy:
|
||||
success: "L’autorisation de %{email} vient d’être révoquée."
|
||||
error: "Vous ne pouvez pas révoquer cette autorisation"
|
||||
dropdown:
|
||||
invite_to_edit: Inviter une personne à modifier ce dossier
|
||||
view_invited_people: "Voir les personnes invitées"
|
||||
|
|
Loading…
Reference in a new issue