From ce5c74223dee13d0256b59175081a24d6c0c4be9 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Fri, 12 Apr 2024 10:52:50 +0800 Subject: [PATCH] refactor(console,phrases): update organization template phrases --- packages/console/src/components/PermissionsTable/index.tsx | 2 +- .../src/pages/OrganizationRoleDetails/Permissions/index.tsx | 2 +- .../integration-tests/src/tests/console/rbac/user-rbac.test.ts | 2 +- .../de/translation/admin-console/organization-role-details.ts | 2 +- .../src/locales/de/translation/admin-console/permissions.ts | 1 - .../en/translation/admin-console/organization-role-details.ts | 2 +- .../src/locales/en/translation/admin-console/permissions.ts | 1 - .../es/translation/admin-console/organization-role-details.ts | 2 +- .../src/locales/es/translation/admin-console/permissions.ts | 1 - .../src/locales/fr/translation/admin-console/permissions.ts | 1 - .../src/locales/it/translation/admin-console/permissions.ts | 1 - .../src/locales/ja/translation/admin-console/permissions.ts | 1 - .../src/locales/ko/translation/admin-console/permissions.ts | 1 - .../translation/admin-console/organization-role-details.ts | 2 +- .../src/locales/pl-pl/translation/admin-console/permissions.ts | 1 - .../translation/admin-console/organization-role-details.ts | 2 +- .../src/locales/pt-br/translation/admin-console/permissions.ts | 1 - .../translation/admin-console/organization-role-details.ts | 2 +- .../src/locales/pt-pt/translation/admin-console/permissions.ts | 1 - .../ru/translation/admin-console/organization-role-details.ts | 2 +- .../src/locales/ru/translation/admin-console/permissions.ts | 1 - .../translation/admin-console/organization-role-details.ts | 2 +- .../src/locales/tr-tr/translation/admin-console/permissions.ts | 1 - .../src/locales/zh-cn/translation/admin-console/permissions.ts | 1 - .../src/locales/zh-hk/translation/admin-console/permissions.ts | 1 - .../src/locales/zh-tw/translation/admin-console/permissions.ts | 1 - 26 files changed, 11 insertions(+), 26 deletions(-) diff --git a/packages/console/src/components/PermissionsTable/index.tsx b/packages/console/src/components/PermissionsTable/index.tsx index dcc25ec6260..89c2f574159 100644 --- a/packages/console/src/components/PermissionsTable/index.tsx +++ b/packages/console/src/components/PermissionsTable/index.tsx @@ -101,7 +101,7 @@ function PermissionsTable({ const handleEdit = async (scope: ScopeResponse, editedData: EditScopeData) => { const patchApiEndpoint = `api/resources/${scope.resourceId}/scopes/${scope.id}`; await api.patch(patchApiEndpoint, { json: editedData }); - toast.success(t('permissions.updated')); + toast.success(t('general.saved')); onPermissionUpdated(); }; diff --git a/packages/console/src/pages/OrganizationRoleDetails/Permissions/index.tsx b/packages/console/src/pages/OrganizationRoleDetails/Permissions/index.tsx index 620be9c14d1..6b799c26553 100644 --- a/packages/console/src/pages/OrganizationRoleDetails/Permissions/index.tsx +++ b/packages/console/src/pages/OrganizationRoleDetails/Permissions/index.tsx @@ -74,7 +74,7 @@ function Permissions({ organizationRoleId }: Props) { ? `api/resources/${scope.resourceId}/scopes/${scope.id}` : `api/organization-scopes/${scope.id}`; await api.patch(patchApiEndpoint, { json: editedData }); - toast.success(t('permissions.updated')); + toast.success(t('general.saved')); mutate(); }; diff --git a/packages/integration-tests/src/tests/console/rbac/user-rbac.test.ts b/packages/integration-tests/src/tests/console/rbac/user-rbac.test.ts index fe13364a3c4..648b7a729a8 100644 --- a/packages/integration-tests/src/tests/console/rbac/user-rbac.test.ts +++ b/packages/integration-tests/src/tests/console/rbac/user-rbac.test.ts @@ -113,7 +113,7 @@ describe('User RBAC', () => { const newDescription = `New: ${permissionDescription}`; await expect(page).toFillForm('.ReactModalPortal form', { description: newDescription }); await expect(page).toClick('.ReactModalPortal button[type=submit]'); - await waitForToast(page, { text: 'Permission updated.', type: 'success' }); + await waitForToast(page, { text: 'Saved', type: 'success' }); await expect(page).toMatchElement('table tbody tr td div', { text: newDescription, }); diff --git a/packages/phrases/src/locales/de/translation/admin-console/organization-role-details.ts b/packages/phrases/src/locales/de/translation/admin-console/organization-role-details.ts index 5d9d9f20f79..71b51d09594 100644 --- a/packages/phrases/src/locales/de/translation/admin-console/organization-role-details.ts +++ b/packages/phrases/src/locales/de/translation/admin-console/organization-role-details.ts @@ -1,6 +1,6 @@ const organization_role_details = { page_title: 'Organisationsrollendetails', - back_to_org_roles: 'Zurück zu den Org-Rollen', + back_to_org_roles: 'Zurück zu den Organisationsrollen', org_role: 'Org-Rolle', delete_confirm: 'Dadurch werden die mit dieser Rolle verbundenen Berechtigungen von den betroffenen Benutzern entfernt und die Beziehungen zwischen Organisationsrollen, Mitgliedern in der Organisation und Organisationsberechtigungen gelöscht.', diff --git a/packages/phrases/src/locales/de/translation/admin-console/permissions.ts b/packages/phrases/src/locales/de/translation/admin-console/permissions.ts index 255205e258a..f5ca2aa36ad 100644 --- a/packages/phrases/src/locales/de/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/de/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Bearbeitungsberechtigung', delete: 'Löschberechtigung', remove: 'Entfernungsberechtigung', - updated: 'Berechtigung aktualisiert.', edit_title: 'API-Berechtigung bearbeiten', }; diff --git a/packages/phrases/src/locales/en/translation/admin-console/organization-role-details.ts b/packages/phrases/src/locales/en/translation/admin-console/organization-role-details.ts index 1cf0815bcf3..e17220c183a 100644 --- a/packages/phrases/src/locales/en/translation/admin-console/organization-role-details.ts +++ b/packages/phrases/src/locales/en/translation/admin-console/organization-role-details.ts @@ -1,6 +1,6 @@ const organization_role_details = { page_title: 'Organization role details', - back_to_org_roles: 'Back to org roles', + back_to_org_roles: 'Back to organization roles', org_role: 'Organization role', delete_confirm: 'Doing so will remove the permissions associated with this role from the affected users and delete the relations among organization roles, members in the organization, and organization permissions.', diff --git a/packages/phrases/src/locales/en/translation/admin-console/permissions.ts b/packages/phrases/src/locales/en/translation/admin-console/permissions.ts index 0345c1ef529..b12a2c336ea 100644 --- a/packages/phrases/src/locales/en/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/en/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Edit permission', delete: 'Delete permission', remove: 'Remove permission', - updated: 'Permission updated.', edit_title: 'Edit API permission', }; diff --git a/packages/phrases/src/locales/es/translation/admin-console/organization-role-details.ts b/packages/phrases/src/locales/es/translation/admin-console/organization-role-details.ts index 945e8407703..c50df444cd6 100644 --- a/packages/phrases/src/locales/es/translation/admin-console/organization-role-details.ts +++ b/packages/phrases/src/locales/es/translation/admin-console/organization-role-details.ts @@ -1,6 +1,6 @@ const organization_role_details = { page_title: 'Detalles del rol de la organización', - back_to_org_roles: 'Volver a roles de la organización', + back_to_org_roles: 'Volver a los roles de la organización', org_role: 'Rol de la organización', delete_confirm: 'Al hacerlo, se eliminarán los permisos asociados con este rol de los usuarios afectados y se borrarán las relaciones entre roles de organización, miembros en la organización y permisos de organización.', diff --git a/packages/phrases/src/locales/es/translation/admin-console/permissions.ts b/packages/phrases/src/locales/es/translation/admin-console/permissions.ts index b5a34bf646c..deb4bfbd026 100644 --- a/packages/phrases/src/locales/es/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/es/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Permiso de edición', delete: 'Permiso de eliminación', remove: 'Permiso de remover', - updated: 'Permiso actualizado.', edit_title: 'Editar permiso de API', }; diff --git a/packages/phrases/src/locales/fr/translation/admin-console/permissions.ts b/packages/phrases/src/locales/fr/translation/admin-console/permissions.ts index ac05b25339c..bdb9e98f3eb 100644 --- a/packages/phrases/src/locales/fr/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/fr/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Permission de modifier', delete: 'Permission de supprimer', remove: 'Permission de retirer', - updated: 'Permission mise à jour.', edit_title: 'Modifier l’autorisation de l’API', }; diff --git a/packages/phrases/src/locales/it/translation/admin-console/permissions.ts b/packages/phrases/src/locales/it/translation/admin-console/permissions.ts index aa969d3a8f8..e3fba9dd87e 100644 --- a/packages/phrases/src/locales/it/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/it/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Permesso di modifica', delete: 'Permesso di cancellazione', remove: 'Permesso di rimozione', - updated: 'Permesso aggiornato.', edit_title: 'Modifica permesso API', }; diff --git a/packages/phrases/src/locales/ja/translation/admin-console/permissions.ts b/packages/phrases/src/locales/ja/translation/admin-console/permissions.ts index 80887267196..bdf9624226a 100644 --- a/packages/phrases/src/locales/ja/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/ja/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: '編集権限', delete: '削除権限', remove: '除去権限', - updated: '許可が更新されました。', edit_title: 'APIの権限を編集', }; diff --git a/packages/phrases/src/locales/ko/translation/admin-console/permissions.ts b/packages/phrases/src/locales/ko/translation/admin-console/permissions.ts index 2c5be98c610..86b73884d66 100644 --- a/packages/phrases/src/locales/ko/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/ko/translation/admin-console/permissions.ts @@ -9,7 +9,6 @@ const permissions = { edit: '편집 권한', delete: '삭제 권한', remove: '제거 권한', - updated: '권한이 업데이트되었습니다.', edit_title: 'API 권한 편집', }; diff --git a/packages/phrases/src/locales/pl-pl/translation/admin-console/organization-role-details.ts b/packages/phrases/src/locales/pl-pl/translation/admin-console/organization-role-details.ts index a3c95baec35..4fb8bc4311d 100644 --- a/packages/phrases/src/locales/pl-pl/translation/admin-console/organization-role-details.ts +++ b/packages/phrases/src/locales/pl-pl/translation/admin-console/organization-role-details.ts @@ -1,6 +1,6 @@ const organization_role_details = { page_title: 'Szczegóły roli organizacji', - back_to_org_roles: 'Powrót do ról organizacji', + back_to_org_roles: 'Powrót do ról organizacyjnych', org_role: 'Rola organizacji', delete_confirm: 'W wyniku tego zostaną usunięte uprawnienia związane z tą rolą od dotkniętych użytkowników i zostaną usunięte związki między rolami organizacyjnymi, członkami organizacji a uprawnieniami organizacji.', diff --git a/packages/phrases/src/locales/pl-pl/translation/admin-console/permissions.ts b/packages/phrases/src/locales/pl-pl/translation/admin-console/permissions.ts index 8f168197b6a..b11bd8db247 100644 --- a/packages/phrases/src/locales/pl-pl/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/pl-pl/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Uprawnienia do edycji', delete: 'Uprawnienia do usunięcia', remove: 'Uprawnienia do usunięcia', - updated: 'Uprawnienia zaktualizowane.', edit_title: 'Edytuj uprawnienia API', }; diff --git a/packages/phrases/src/locales/pt-br/translation/admin-console/organization-role-details.ts b/packages/phrases/src/locales/pt-br/translation/admin-console/organization-role-details.ts index d34a8923db0..27a6670b972 100644 --- a/packages/phrases/src/locales/pt-br/translation/admin-console/organization-role-details.ts +++ b/packages/phrases/src/locales/pt-br/translation/admin-console/organization-role-details.ts @@ -1,6 +1,6 @@ const organization_role_details = { page_title: 'Detalhes da função da organização', - back_to_org_roles: 'Voltar para funções da org', + back_to_org_roles: 'Voltar para os papéis da organização', org_role: 'Função da organização', delete_confirm: 'Ao fazer isso, os privilégios associados a esta função serão removidos dos usuários afetados e as relações entre funções da organização, membros na organização e permissões da organização serão excluídas.', diff --git a/packages/phrases/src/locales/pt-br/translation/admin-console/permissions.ts b/packages/phrases/src/locales/pt-br/translation/admin-console/permissions.ts index 68c646d49bd..0285873f6fd 100644 --- a/packages/phrases/src/locales/pt-br/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/pt-br/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Permissão de edição', delete: 'Permissão de exclusão', remove: 'Permissão de remoção', - updated: 'Permissão atualizada.', edit_title: 'Editar permissão de API', }; diff --git a/packages/phrases/src/locales/pt-pt/translation/admin-console/organization-role-details.ts b/packages/phrases/src/locales/pt-pt/translation/admin-console/organization-role-details.ts index 6498e0341fc..9eed555407b 100644 --- a/packages/phrases/src/locales/pt-pt/translation/admin-console/organization-role-details.ts +++ b/packages/phrases/src/locales/pt-pt/translation/admin-console/organization-role-details.ts @@ -1,6 +1,6 @@ const organization_role_details = { page_title: 'Detalhes da função da organização', - back_to_org_roles: 'Voltar para funções da org', + back_to_org_roles: 'Voltar aos papéis da organização', org_role: 'Função da organização', delete_confirm: 'Ao fazê-lo, serão removidas as permissões associadas a esta função dos utilizadores afetados e serão eliminadas as relações entre funções da organização, membros na organização e permissões da organização.', diff --git a/packages/phrases/src/locales/pt-pt/translation/admin-console/permissions.ts b/packages/phrases/src/locales/pt-pt/translation/admin-console/permissions.ts index fd41da9d23a..38dcb993c42 100644 --- a/packages/phrases/src/locales/pt-pt/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/pt-pt/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Permissão de edição', delete: 'Permissão de eliminação', remove: 'Permissão para remover', - updated: 'Permissão atualizada.', edit_title: 'Editar permissão da API', }; diff --git a/packages/phrases/src/locales/ru/translation/admin-console/organization-role-details.ts b/packages/phrases/src/locales/ru/translation/admin-console/organization-role-details.ts index 35c1aa99f83..a8bb053fc91 100644 --- a/packages/phrases/src/locales/ru/translation/admin-console/organization-role-details.ts +++ b/packages/phrases/src/locales/ru/translation/admin-console/organization-role-details.ts @@ -1,6 +1,6 @@ const organization_role_details = { page_title: 'Детали роли организации', - back_to_org_roles: 'Вернуться к ролям организации', + back_to_org_roles: 'Вернуться к ролям в организации', org_role: 'Роль организации', delete_confirm: 'При этом будут удалены разрешения, связанные с этой ролью, у затронутых пользователей, и будут удалены связи между ролями организации, членами организации и правами организации.', diff --git a/packages/phrases/src/locales/ru/translation/admin-console/permissions.ts b/packages/phrases/src/locales/ru/translation/admin-console/permissions.ts index a25457a053d..73807cea8af 100644 --- a/packages/phrases/src/locales/ru/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/ru/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Разрешение на редактирование', delete: 'Разрешение на удаление', remove: 'Разрешение на удаление', - updated: 'Разрешение обновлено.', edit_title: 'Редактировать разрешение API', }; diff --git a/packages/phrases/src/locales/tr-tr/translation/admin-console/organization-role-details.ts b/packages/phrases/src/locales/tr-tr/translation/admin-console/organization-role-details.ts index 0f79dcb3350..bd4a24c0219 100644 --- a/packages/phrases/src/locales/tr-tr/translation/admin-console/organization-role-details.ts +++ b/packages/phrases/src/locales/tr-tr/translation/admin-console/organization-role-details.ts @@ -1,6 +1,6 @@ const organization_role_details = { page_title: 'Kuruluş rolü ayrıntıları', - back_to_org_roles: 'Kuruluş rollerine geri dön', + back_to_org_roles: 'Organizasyon rollerine geri dön', org_role: 'Kuruluş rolü', delete_confirm: 'Bunu yapmak, etkilenen kullanıcılardan bu role ilişkilendirilen izinleri kaldıracak ve organizasyon rolleri, organizasyon üyeleri ve organizasyon izinleri arasındaki ilişkileri silecektir.', diff --git a/packages/phrases/src/locales/tr-tr/translation/admin-console/permissions.ts b/packages/phrases/src/locales/tr-tr/translation/admin-console/permissions.ts index 94b6bf98ce6..45b2d45c9a0 100644 --- a/packages/phrases/src/locales/tr-tr/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/tr-tr/translation/admin-console/permissions.ts @@ -10,7 +10,6 @@ const permissions = { edit: 'Düzenleme izni', delete: 'Silme izni', remove: 'Kaldırma izni', - updated: 'İzin güncellendi.', edit_title: 'API iznini düzenle', }; diff --git a/packages/phrases/src/locales/zh-cn/translation/admin-console/permissions.ts b/packages/phrases/src/locales/zh-cn/translation/admin-console/permissions.ts index 33e885bb5b2..13d0ab35674 100644 --- a/packages/phrases/src/locales/zh-cn/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/zh-cn/translation/admin-console/permissions.ts @@ -9,7 +9,6 @@ const permissions = { edit: '编辑权限', delete: '删除权限', remove: '移除权限', - updated: '权限已更新。', edit_title: '编辑 API 权限', }; diff --git a/packages/phrases/src/locales/zh-hk/translation/admin-console/permissions.ts b/packages/phrases/src/locales/zh-hk/translation/admin-console/permissions.ts index ffaa4c7be97..c5bbc361327 100644 --- a/packages/phrases/src/locales/zh-hk/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/zh-hk/translation/admin-console/permissions.ts @@ -9,7 +9,6 @@ const permissions = { edit: '編輯權限', delete: '刪除權限', remove: '移除權限', - updated: '權限已更新。', edit_title: '編輯 API 權限', }; diff --git a/packages/phrases/src/locales/zh-tw/translation/admin-console/permissions.ts b/packages/phrases/src/locales/zh-tw/translation/admin-console/permissions.ts index ffaa4c7be97..c5bbc361327 100644 --- a/packages/phrases/src/locales/zh-tw/translation/admin-console/permissions.ts +++ b/packages/phrases/src/locales/zh-tw/translation/admin-console/permissions.ts @@ -9,7 +9,6 @@ const permissions = { edit: '編輯權限', delete: '刪除權限', remove: '移除權限', - updated: '權限已更新。', edit_title: '編輯 API 權限', };