Skip to content

Commit e6f89b4

Browse files
authored
Merge pull request Expensify#67729 from shubham1206agra/merge-translation-10
Merge delegate.notAllowedMessage translation
2 parents 531b257 + fa06522 commit e6f89b4

11 files changed

Lines changed: 27 additions & 38 deletions

File tree

src/components/DelegateNoAccessModalProvider.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React, {createContext, useMemo, useState} from 'react';
22
import type {PropsWithChildren} from 'react';
3+
import {View} from 'react-native';
34
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
45
import useLocalize from '@hooks/useLocalize';
56
import useOnyx from '@hooks/useOnyx';
7+
import useThemeStyles from '@hooks/useThemeStyles';
68
import AccountUtils from '@libs/AccountUtils';
7-
import CONST from '@src/CONST';
89
import ONYXKEYS from '@src/ONYXKEYS';
910
import ConfirmModal from './ConfirmModal';
10-
import Text from './Text';
11-
import TextLink from './TextLink';
11+
import RenderHTML from './RenderHTML';
1212

1313
type DelegateNoAccessContextType = {
1414
/** Whether the current user is acting as delegate */
@@ -29,6 +29,7 @@ const DelegateNoAccessContext = createContext<DelegateNoAccessContextType>({
2929

3030
function DelegateNoAccessModalProvider({children}: PropsWithChildren) {
3131
const {translate} = useLocalize();
32+
const styles = useThemeStyles();
3233
const [isModalOpen, setIsModalOpen] = useState(false);
3334
const currentUserDetails = useCurrentUserPersonalDetails();
3435
const delegatorEmail = currentUserDetails?.login ?? '';
@@ -37,11 +38,9 @@ function DelegateNoAccessModalProvider({children}: PropsWithChildren) {
3738
const isDelegateAccessRestricted = isActingAsDelegate && AccountUtils.isDelegateOnlySubmitter(account);
3839

3940
const delegateNoAccessPrompt = (
40-
<Text>
41-
{translate('delegate.notAllowedMessageStart')}
42-
<TextLink href={CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}>{translate('delegate.notAllowedMessageHyperLinked')}</TextLink>
43-
{translate('delegate.notAllowedMessageEnd', {accountOwnerEmail: delegatorEmail})}
44-
</Text>
41+
<View style={[styles.renderHTML, styles.flexRow]}>
42+
<RenderHTML html={translate('delegate.notAllowedMessage', {accountOwnerEmail: delegatorEmail})} />
43+
</View>
4544
);
4645
const contextValue = useMemo(
4746
() => ({

src/languages/de.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6906,9 +6906,8 @@ const translations = {
69066906
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Bitte geben Sie den magischen Code ein, der an ${contactMethod} gesendet wurde, um Ihren Copilot zu aktualisieren.`,
69076907
notAllowed: 'Nicht so schnell...',
69086908
noAccessMessage: 'Als Copilot hast du keinen Zugriff auf diese Seite. Entschuldigung!',
6909-
notAllowedMessageStart: `Als ein`,
6910-
notAllowedMessageHyperLinked: 'Copilot',
6911-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `Für ${accountOwnerEmail} haben Sie keine Berechtigung, diese Aktion auszuführen. Entschuldigung!`,
6909+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6910+
`Als <a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">Copilot</a> für ${accountOwnerEmail} haben Sie nicht die Erlaubnis, diese Aktion durchzuführen. Entschuldigung!`,
69126911
copilotAccess: 'Copilot-Zugriff',
69136912
},
69146913
debug: {

src/languages/en.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6864,9 +6864,8 @@ const translations = {
68646864
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Please enter the magic code sent to ${contactMethod} to update your copilot.`,
68656865
notAllowed: 'Not so fast...',
68666866
noAccessMessage: "As a copilot, you don't have access to \nthis page. Sorry!",
6867-
notAllowedMessageStart: `As a`,
6868-
notAllowedMessageHyperLinked: ' copilot',
6869-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => ` for ${accountOwnerEmail}, you don't have permission to take this action. Sorry!`,
6867+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6868+
`As a <a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">copilot</a> for ${accountOwnerEmail}, you don't have permission to take this action. Sorry!`,
68706869
copilotAccess: 'Copilot access',
68716870
},
68726871
debug: {

src/languages/es.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7358,9 +7358,8 @@ const translations = {
73587358
`Por favor, introduce el código mágico enviado a ${contactMethod} para actualizar el nivel de acceso de tu copiloto.`,
73597359
notAllowed: 'No tan rápido...',
73607360
noAccessMessage: 'Como copiloto, no tienes acceso a esta página. ¡Lo sentimos!',
7361-
notAllowedMessageStart: `Como`,
7362-
notAllowedMessageHyperLinked: ' copiloto',
7363-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => ` de ${accountOwnerEmail}, no tienes permiso para realizar esta acción. ¡Lo siento!`,
7361+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
7362+
`Como <a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">copiloto</a> de ${accountOwnerEmail}, no tienes permiso para realizar esta acción. ¡Lo siento!`,
73647363
copilotAccess: 'Acceso a Copilot',
73657364
},
73667365
debug: {

src/languages/fr.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6917,9 +6917,8 @@ const translations = {
69176917
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Veuillez entrer le code magique envoyé à ${contactMethod} pour mettre à jour votre copilote.`,
69186918
notAllowed: 'Pas si vite...',
69196919
noAccessMessage: "En tant que copilote, vous n'avez pas accès à cette page. Désolé !",
6920-
notAllowedMessageStart: `En tant que`,
6921-
notAllowedMessageHyperLinked: 'copilot',
6922-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `pour ${accountOwnerEmail}, vous n'avez pas la permission d'effectuer cette action. Désolé !`,
6920+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6921+
`En tant que <a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">copilote</a> de ${accountOwnerEmail}, vous n'avez pas la permission d'entreprendre cette action. Désolé de ne pas pouvoir effectuer cette action.`,
69236922
copilotAccess: 'Accès Copilot',
69246923
},
69256924
debug: {

src/languages/it.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6918,9 +6918,8 @@ const translations = {
69186918
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Inserisci il codice magico inviato a ${contactMethod} per aggiornare il tuo copilota.`,
69196919
notAllowed: 'Non così in fretta...',
69206920
noAccessMessage: 'Come copilota, non hai accesso a questa pagina. Mi dispiace!',
6921-
notAllowedMessageStart: `Come un/una`,
6922-
notAllowedMessageHyperLinked: 'copilota',
6923-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `per ${accountOwnerEmail}, non hai il permesso di eseguire questa azione. Mi dispiace!`,
6921+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6922+
`Come <a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">copilota</a> di ${accountOwnerEmail}, non hai il permesso di eseguire questa azione. Mi dispiace!`,
69246923
copilotAccess: 'Accesso Copilot',
69256924
},
69266925
debug: {

src/languages/ja.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6869,9 +6869,8 @@ const translations = {
68696869
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `コパイロットを更新するために、${contactMethod}に送信されたマジックコードを入力してください。`,
68706870
notAllowed: 'ちょっと待ってください…',
68716871
noAccessMessage: 'コパイロットとして、このページにアクセスする権限がありません。申し訳ありません!',
6872-
notAllowedMessageStart: `As a`,
6873-
notAllowedMessageHyperLinked: 'コパイロット',
6874-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `${accountOwnerEmail}、この操作を行う権限がありません。申し訳ありません!`,
6872+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6873+
`${accountOwnerEmail} の<a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">副操縦士</a>として、あなたはこの行動を取る許可を持っていません。申し訳ありません!`,
68756874
copilotAccess: 'Copilotアクセス',
68766875
},
68776876
debug: {

src/languages/nl.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6908,9 +6908,8 @@ const translations = {
69086908
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Voer de magische code in die naar ${contactMethod} is verzonden om uw copilot bij te werken.`,
69096909
notAllowed: 'Niet zo snel...',
69106910
noAccessMessage: 'Als copiloot heb je geen toegang tot deze pagina. Sorry!',
6911-
notAllowedMessageStart: `Als een`,
6912-
notAllowedMessageHyperLinked: 'copilot',
6913-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `voor ${accountOwnerEmail}, je hebt geen toestemming om deze actie uit te voeren. Sorry!`,
6911+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6912+
`Als <a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">copiloot</a> voor ${accountOwnerEmail} heb je geen toestemming om deze actie uit te voeren. Sorry!`,
69146913
copilotAccess: 'Copilot-toegang',
69156914
},
69166915
debug: {

src/languages/pl.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6893,9 +6893,8 @@ const translations = {
68936893
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Proszę wprowadzić magiczny kod wysłany na ${contactMethod}, aby zaktualizować swojego pilota.`,
68946894
notAllowed: 'Nie tak szybko...',
68956895
noAccessMessage: 'Jako współpilot nie masz dostępu do tej strony. Przepraszamy!',
6896-
notAllowedMessageStart: `Jako`,
6897-
notAllowedMessageHyperLinked: 'copilot',
6898-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `dla ${accountOwnerEmail}, nie masz uprawnień do wykonania tej akcji. Przepraszamy!`,
6896+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6897+
`Jako <a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">copilot</a> ${accountOwnerEmail} nie masz uprawnień do wykonania tej akcji. Przepraszamy!`,
68996898
copilotAccess: 'Dostęp do Copilot',
69006899
},
69016900
debug: {

src/languages/pt-BR.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6904,9 +6904,8 @@ const translations = {
69046904
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Por favor, insira o código mágico enviado para ${contactMethod} para atualizar seu copiloto.`,
69056905
notAllowed: 'Não tão rápido...',
69066906
noAccessMessage: 'Como copiloto, você não tem acesso a esta página. Desculpe!',
6907-
notAllowedMessageStart: `Como um(a)`,
6908-
notAllowedMessageHyperLinked: 'copilot',
6909-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `para ${accountOwnerEmail}, você não tem permissão para realizar esta ação. Desculpe!`,
6907+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6908+
`Como <a href="${CONST.DELEGATE_ROLE_HELP_DOT_ARTICLE_LINK}">copiloto</a> do ${accountOwnerEmail}, você não tem permissão para realizar essa ação. Desculpe-me!`,
69106909
copilotAccess: 'Acesso ao Copilot',
69116910
},
69126911
debug: {

0 commit comments

Comments
 (0)