From 611ba72c9a7f595863c46c37ed1110b94e7afd35 Mon Sep 17 00:00:00 2001 From: Timofey Boyko Date: Wed, 29 Nov 2023 15:09:32 +0300 Subject: [PATCH] Client:OAuth2: update translation keys --- packages/client/public/locales/en/OAuth.json | 10 ++++-- .../ClientForm/components/BlockHeader.tsx | 2 +- .../ClientForm/components/ClientBlock.tsx | 9 ++--- .../ClientForm/components/ScopesBlock.tsx | 34 ++++++++----------- .../OAuth/sub-components/ClientForm/index.tsx | 4 +-- .../OAuth/sub-components/List/index.tsx | 3 +- .../OAuth/sub-components/PreviewDialog.tsx | 10 +++--- public/locales/en/Common.json | 2 +- 8 files changed, 38 insertions(+), 36 deletions(-) diff --git a/packages/client/public/locales/en/OAuth.json b/packages/client/public/locales/en/OAuth.json index 397bd345ee..1f61b2eb25 100644 --- a/packages/client/public/locales/en/OAuth.json +++ b/packages/client/public/locales/en/OAuth.json @@ -3,13 +3,15 @@ "AccessGranted": "Access granted", "AppIcon": "App icon", "AllowedOrigins": "Allowed origins", - "AllowedOriginsHelpButton": "Allowed origin help", + "AllowedOriginsHelpButton": "URLs added here are used to improve the OAuth redirect security.", "AppName": "App name", "Apps": "Applications", "AuthButton": "Auth button", + "AuthorizeLink": "Authorize link", "Client": "Client", "Creator": "Creator", - "ClientHelpButton": "Credentials for using OAth 2.0 as your Authentication type. Note: Any enterprise admin who knows the app's client ID will be able to retrieve information about the app including app name, authentication type, app scopes and redirect URI.", + "ClientHelpButton": "Credentials for using OAth 2.0 as your Authentication type.
Note: Any enterprise admin who knows the app's client ID will be able to retrieve information about the app including app name, authentication type, app scopes and redirect URI.", + "CodeVerifier": "Code verifier", "EditApp": "Edit application", "EnterDescription": "Enter description", "ErrorName": "Minimal name length:", @@ -21,7 +23,7 @@ "NewApp": "New application", "NoOAuthAppHeader": "No OAuth applications", "OAuth": "OAuth", - "OAuthAppDescription": "OAuth applications are used to access the ONLYOFFICE DocSpace API", + "OAuthAppDescription": "OAuth applications are used to access the ONLYOFFICE DocSpace API for authorization and further actions such as accessing files, etc.", "OAuthHeaderBlock": "OAuth urls", "ProfileDescription": "Here you can check the apps info to which you have granted the auth access, and revoke consent if needed.", "PrivacyPolicy": "Privacy policy", @@ -41,6 +43,8 @@ "Secret": "Secret", "SelectNewImage": "Select new image", "Scopes": "Scopes", + "ScopesHeader": "Access scopes", + "ScopesHelp": "Scopes are used to limit your app's access to all user-related data, and they'll let you specify exactly what kind of access you need.", "SignIn": "Sign in with DocSpace", "SupportAndLegalInfo": "Support & Legal info", "TermsOfService": "Terms of Service", diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/components/BlockHeader.tsx b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/components/BlockHeader.tsx index b8daed4313..43e0b42f8f 100644 --- a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/components/BlockHeader.tsx +++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/components/BlockHeader.tsx @@ -6,7 +6,7 @@ import { StyledHeaderRow } from "../ClientForm.styled"; interface BlockHeaderProps { header: string; - helpButtonText?: string; + helpButtonText?: string | React.ReactNode; className?: string; } diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/components/ClientBlock.tsx b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/components/ClientBlock.tsx index a5012bf602..e2a0eb0210 100644 --- a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/components/ClientBlock.tsx +++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/components/ClientBlock.tsx @@ -1,4 +1,6 @@ import React from "react"; +import { Trans } from "react-i18next"; + import { StyledBlock, StyledInputBlock } from "../ClientForm.styled"; import BlockHeader from "./BlockHeader"; @@ -30,12 +32,11 @@ const ClientBlock = ({ const onChange = (e: React.ChangeEvent) => {}; + const helpButtonText = ; + return ( - + - {scope.read?.name ? ( - - onAddCheckedScope( - key as ScopeGroup, - ScopeType.read, - scope.read?.name - ) - } - /> - ) : ( - <> - )} + + onAddCheckedScope( + key as ScopeGroup, + ScopeType.read, + scope.read?.name + ) + } + /> onAddCheckedScope( key as ScopeGroup, @@ -201,8 +197,8 @@ const ScopesBlock = ({ {/* @ts-ignore */} { - const { t } = useTranslation(["OAuth", "Common"]); + const { t } = useTranslation(["OAuth", "Common", "Webhooks"]); const [codeVerifier, setCodeVerifier] = React.useState(""); const [codeChallenge, setCodeChallenge] = React.useState(""); @@ -229,7 +229,7 @@ const PreviewDialog = ({ onClose={onClose} withFooterBorder > - Auth button + {t("AuthButton")} @@ -305,7 +305,7 @@ const PreviewDialog = ({ fontSize={"13px"} noSelect > - Authorize link + {t("AuthorizeLink")}