From fa06522c14e083c5acc6717d711727d06caeae54 Mon Sep 17 00:00:00 2001 From: Shubham Agrawal Date: Mon, 4 Aug 2025 00:41:22 +0530 Subject: [PATCH] Merge delegate.notAllowedMessage translation --- src/components/DelegateNoAccessModalProvider.tsx | 15 +++++++-------- src/languages/de.ts | 5 ++--- src/languages/en.ts | 5 ++--- src/languages/es.ts | 5 ++--- src/languages/fr.ts | 5 ++--- src/languages/it.ts | 5 ++--- src/languages/ja.ts | 5 ++--- src/languages/nl.ts | 5 ++--- src/languages/pl.ts | 5 ++--- src/languages/pt-BR.ts | 5 ++--- src/languages/zh-hans.ts | 5 ++--- 11 files changed, 27 insertions(+), 38 deletions(-) diff --git a/src/components/DelegateNoAccessModalProvider.tsx b/src/components/DelegateNoAccessModalProvider.tsx index 202edbe7da91..71f4580ec43c 100644 --- a/src/components/DelegateNoAccessModalProvider.tsx +++ b/src/components/DelegateNoAccessModalProvider.tsx @@ -1,14 +1,14 @@ import React, {createContext, useMemo, useState} from 'react'; import type {PropsWithChildren} from 'react'; +import {View} from 'react-native'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; +import useThemeStyles from '@hooks/useThemeStyles'; import AccountUtils from '@libs/AccountUtils'; -import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ConfirmModal from './ConfirmModal'; -import Text from './Text'; -import TextLink from './TextLink'; +import RenderHTML from './RenderHTML'; type DelegateNoAccessContextType = { /** Whether the current user is acting as delegate */ @@ -29,6 +29,7 @@ const DelegateNoAccessContext = createContext({ function DelegateNoAccessModalProvider({children}: PropsWithChildren) { const {translate} = useLocalize(); + const styles = useThemeStyles(); const [isModalOpen, setIsModalOpen] = useState(false); const currentUserDetails = useCurrentUserPersonalDetails(); const delegatorEmail = currentUserDetails?.login ?? ''; @@ -37,11 +38,9 @@ function DelegateNoAccessModalProvider({children}: PropsWithChildren) { const isDelegateAccessRestricted = isActingAsDelegate && AccountUtils.isDelegateOnlySubmitter(account); const delegateNoAccessPrompt = ( - - {translate('delegate.notAllowedMessageStart')} - {translate('delegate.notAllowedMessageHyperLinked')} - {translate('delegate.notAllowedMessageEnd', {accountOwnerEmail: delegatorEmail})} - + + + ); const contextValue = useMemo( () => ({ diff --git a/src/languages/de.ts b/src/languages/de.ts index f047a04f6754..20828a8d94ef 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -6908,9 +6908,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Bitte geben Sie den magischen Code ein, der an ${contactMethod} gesendet wurde, um Ihren Copilot zu aktualisieren.`, notAllowed: 'Nicht so schnell...', noAccessMessage: 'Als Copilot hast du keinen Zugriff auf diese Seite. Entschuldigung!', - notAllowedMessageStart: `Als ein`, - notAllowedMessageHyperLinked: 'Copilot', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `Für ${accountOwnerEmail} haben Sie keine Berechtigung, diese Aktion auszuführen. Entschuldigung!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `Als Copilot für ${accountOwnerEmail} haben Sie nicht die Erlaubnis, diese Aktion durchzuführen. Entschuldigung!`, copilotAccess: 'Copilot-Zugriff', }, debug: { diff --git a/src/languages/en.ts b/src/languages/en.ts index 43b033502526..bd42ceb148c2 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -6866,9 +6866,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Please enter the magic code sent to ${contactMethod} to update your copilot.`, notAllowed: 'Not so fast...', noAccessMessage: "As a copilot, you don't have access to \nthis page. Sorry!", - notAllowedMessageStart: `As a`, - notAllowedMessageHyperLinked: ' copilot', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => ` for ${accountOwnerEmail}, you don't have permission to take this action. Sorry!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `As a copilot for ${accountOwnerEmail}, you don't have permission to take this action. Sorry!`, copilotAccess: 'Copilot access', }, debug: { diff --git a/src/languages/es.ts b/src/languages/es.ts index d9ea77c217ed..93bc99c306aa 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -7360,9 +7360,8 @@ const translations = { `Por favor, introduce el código mágico enviado a ${contactMethod} para actualizar el nivel de acceso de tu copiloto.`, notAllowed: 'No tan rápido...', noAccessMessage: 'Como copiloto, no tienes acceso a esta página. ¡Lo sentimos!', - notAllowedMessageStart: `Como`, - notAllowedMessageHyperLinked: ' copiloto', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => ` de ${accountOwnerEmail}, no tienes permiso para realizar esta acción. ¡Lo siento!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `Como copiloto de ${accountOwnerEmail}, no tienes permiso para realizar esta acción. ¡Lo siento!`, copilotAccess: 'Acceso a Copilot', }, debug: { diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 8338f6b0be75..ffba3792de82 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -6919,9 +6919,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Veuillez entrer le code magique envoyé à ${contactMethod} pour mettre à jour votre copilote.`, notAllowed: 'Pas si vite...', noAccessMessage: "En tant que copilote, vous n'avez pas accès à cette page. Désolé !", - notAllowedMessageStart: `En tant que`, - notAllowedMessageHyperLinked: 'copilot', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `pour ${accountOwnerEmail}, vous n'avez pas la permission d'effectuer cette action. Désolé !`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `En tant que copilote de ${accountOwnerEmail}, vous n'avez pas la permission d'entreprendre cette action. Désolé de ne pas pouvoir effectuer cette action.`, copilotAccess: 'Accès Copilot', }, debug: { diff --git a/src/languages/it.ts b/src/languages/it.ts index cc758ca9efd2..0c94ad4e4703 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -6920,9 +6920,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Inserisci il codice magico inviato a ${contactMethod} per aggiornare il tuo copilota.`, notAllowed: 'Non così in fretta...', noAccessMessage: 'Come copilota, non hai accesso a questa pagina. Mi dispiace!', - notAllowedMessageStart: `Come un/una`, - notAllowedMessageHyperLinked: 'copilota', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `per ${accountOwnerEmail}, non hai il permesso di eseguire questa azione. Mi dispiace!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `Come copilota di ${accountOwnerEmail}, non hai il permesso di eseguire questa azione. Mi dispiace!`, copilotAccess: 'Accesso Copilot', }, debug: { diff --git a/src/languages/ja.ts b/src/languages/ja.ts index c8fd5c1d50cf..ab7526d3a601 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -6871,9 +6871,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `コパイロットを更新するために、${contactMethod}に送信されたマジックコードを入力してください。`, notAllowed: 'ちょっと待ってください…', noAccessMessage: 'コパイロットとして、このページにアクセスする権限がありません。申し訳ありません!', - notAllowedMessageStart: `As a`, - notAllowedMessageHyperLinked: 'コパイロット', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `${accountOwnerEmail}、この操作を行う権限がありません。申し訳ありません!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `${accountOwnerEmail} の副操縦士として、あなたはこの行動を取る許可を持っていません。申し訳ありません!`, copilotAccess: 'Copilotアクセス', }, debug: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 4d251c624e00..0d7038e57e68 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -6910,9 +6910,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Voer de magische code in die naar ${contactMethod} is verzonden om uw copilot bij te werken.`, notAllowed: 'Niet zo snel...', noAccessMessage: 'Als copiloot heb je geen toegang tot deze pagina. Sorry!', - notAllowedMessageStart: `Als een`, - notAllowedMessageHyperLinked: 'copilot', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `voor ${accountOwnerEmail}, je hebt geen toestemming om deze actie uit te voeren. Sorry!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `Als copiloot voor ${accountOwnerEmail} heb je geen toestemming om deze actie uit te voeren. Sorry!`, copilotAccess: 'Copilot-toegang', }, debug: { diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 1bda5db8e213..1642eda2731d 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -6895,9 +6895,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Proszę wprowadzić magiczny kod wysłany na ${contactMethod}, aby zaktualizować swojego pilota.`, notAllowed: 'Nie tak szybko...', noAccessMessage: 'Jako współpilot nie masz dostępu do tej strony. Przepraszamy!', - notAllowedMessageStart: `Jako`, - notAllowedMessageHyperLinked: 'copilot', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `dla ${accountOwnerEmail}, nie masz uprawnień do wykonania tej akcji. Przepraszamy!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `Jako copilot ${accountOwnerEmail} nie masz uprawnień do wykonania tej akcji. Przepraszamy!`, copilotAccess: 'Dostęp do Copilot', }, debug: { diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 412073883c1c..fc34a12f4ad6 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -6906,9 +6906,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Por favor, insira o código mágico enviado para ${contactMethod} para atualizar seu copiloto.`, notAllowed: 'Não tão rápido...', noAccessMessage: 'Como copiloto, você não tem acesso a esta página. Desculpe!', - notAllowedMessageStart: `Como um(a)`, - notAllowedMessageHyperLinked: 'copilot', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `para ${accountOwnerEmail}, você não tem permissão para realizar esta ação. Desculpe!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `Como copiloto do ${accountOwnerEmail}, você não tem permissão para realizar essa ação. Desculpe-me!`, copilotAccess: 'Acesso ao Copilot', }, debug: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 6bf0c1884a0b..da915b63fc2c 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -6777,9 +6777,8 @@ const translations = { enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `请输入发送到${contactMethod}的验证码以更新您的副驾驶。`, notAllowed: '慢着...', noAccessMessage: '作为副驾驶员,您无权访问此页面。抱歉!', - notAllowedMessageStart: `作为一名`, - notAllowedMessageHyperLinked: 'copilot', - notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `对于${accountOwnerEmail},您没有权限执行此操作。抱歉!`, + notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) => + `作为 ${accountOwnerEmail} 的副驾驶员,您无权执行此操作。对不起!`, copilotAccess: 'Copilot访问权限', }, debug: {