Skip to content

Commit dae5dd9

Browse files
committed
adds translation string for error when leaving a conversation
1 parent 2a6bfc6 commit dae5dd9

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

app/models/better_together/conversation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def to_s
1919
def at_least_one_participant
2020
return unless participants.empty?
2121

22-
errors.add(:conversation_participants, 'You cannot remove the last participant from a conversation')
22+
errors.add(:conversation_participants, t('pundit.errors.leave_conversation'))
2323
end
2424
end
2525
end

config/locales/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,7 @@ en:
15021502
destroy: You are not authorized to delete this %{resource}.
15031503
edit: You are not authorized to edit this %{resource}.
15041504
index: You are not authorized to view the list of %{resource}.
1505+
leave_conversation: You are the final conversation participant and cannot leave
15051506
new: You are not authorized to create a new %{resource}.
15061507
show: You are not authorized to view this %{resource}.
15071508
update: You are not authorized to update this %{resource}.

config/locales/es.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,7 @@ es:
14901490
destroy: No está autorizado para eliminar este %{resource}.
14911491
edit: No está autorizado para editar este %{resource}.
14921492
index: No está autorizado para ver la lista de %{resource}.
1493+
leave_conversation: You are the final conversation participant and cannot leave
14931494
new: No está autorizado para crear un nuevo %{resource}.
14941495
show: No está autorizado para ver este %{resource}.
14951496
update: No está autorizado para actualizar este %{resource}.

config/locales/fr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,7 @@ fr:
15121512
destroy: Vous n'êtes pas autorisé à supprimer ce %{resource}.
15131513
edit: Vous n'êtes pas autorisé à modifier ce %{resource}.
15141514
index: Vous n'êtes pas autorisé à consulter la liste des %{resource}.
1515+
leave_conversation: You are the final conversation participant and cannot leave
15151516
new: Vous n'êtes pas autorisé à créer un nouveau %{resource}.
15161517
show: Vous n'êtes pas autorisé à consulter ce %{resource}.
15171518
update: Vous n'êtes pas autorisé à mettre à jour ce %{resource}.

0 commit comments

Comments
 (0)