From 3fe43fc549e8df13e4085a4ba30eee89c33a4503 Mon Sep 17 00:00:00 2001 From: sniper-py <38058090+sniper-py@users.noreply.github.com> Date: Thu, 16 Apr 2020 11:08:18 +0800 Subject: [PATCH] add trans in participant (#4533) --- seahub/api2/endpoints/file_participants.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seahub/api2/endpoints/file_participants.py b/seahub/api2/endpoints/file_participants.py index fcdc953855..3ead570cad 100644 --- a/seahub/api2/endpoints/file_participants.py +++ b/seahub/api2/endpoints/file_participants.py @@ -110,14 +110,14 @@ class FileParticipantsView(APIView): # permission check if not seafile_api.check_permission_by_path(repo_id, '/', user.username): - error_dic = {'email': email, 'error_msg': 'Permission denied.', 'error_code': 403} + error_dic = {'email': email, 'error_msg': _('Permission denied.'), 'error_code': 403} failed.append(error_dic) continue # main try: if participants_queryset.filter(uuid=uuid, username=email).count() > 0: - error_dic = {'email': email, 'error_msg': 'Participant already exists.', 'error_code': 409} + error_dic = {'email': email, 'error_msg': _('Participant already exists.'), 'error_code': 409} failed.append(error_dic) continue @@ -126,7 +126,7 @@ class FileParticipantsView(APIView): success.append(participant) except Exception as e: logger.error(e) - error_dic = {'email': email, 'error_msg': 'Internal Server Error.', 'error_code': 500} + error_dic = {'email': email, 'error_msg': _('Internal Server Error.'), 'error_code': 500} failed.append(error_dic) continue