Skip to content

Commit fa06522

Browse files
Merge delegate.notAllowedMessage translation
1 parent a8175e0 commit fa06522

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
@@ -6908,9 +6908,8 @@ const translations = {
69086908
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Bitte geben Sie den magischen Code ein, der an ${contactMethod} gesendet wurde, um Ihren Copilot zu aktualisieren.`,
69096909
notAllowed: 'Nicht so schnell...',
69106910
noAccessMessage: 'Als Copilot hast du keinen Zugriff auf diese Seite. Entschuldigung!',
6911-
notAllowedMessageStart: `Als ein`,
6912-
notAllowedMessageHyperLinked: 'Copilot',
6913-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `Für ${accountOwnerEmail} haben Sie keine Berechtigung, diese Aktion auszuführen. Entschuldigung!`,
6911+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6912+
`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!`,
69146913
copilotAccess: 'Copilot-Zugriff',
69156914
},
69166915
debug: {

src/languages/en.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6866,9 +6866,8 @@ const translations = {
68666866
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Please enter the magic code sent to ${contactMethod} to update your copilot.`,
68676867
notAllowed: 'Not so fast...',
68686868
noAccessMessage: "As a copilot, you don't have access to \nthis page. Sorry!",
6869-
notAllowedMessageStart: `As a`,
6870-
notAllowedMessageHyperLinked: ' copilot',
6871-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => ` for ${accountOwnerEmail}, you don't have permission to take this action. Sorry!`,
6869+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6870+
`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!`,
68726871
copilotAccess: 'Copilot access',
68736872
},
68746873
debug: {

src/languages/es.ts

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

src/languages/fr.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6919,9 +6919,8 @@ const translations = {
69196919
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Veuillez entrer le code magique envoyé à ${contactMethod} pour mettre à jour votre copilote.`,
69206920
notAllowed: 'Pas si vite...',
69216921
noAccessMessage: "En tant que copilote, vous n'avez pas accès à cette page. Désolé !",
6922-
notAllowedMessageStart: `En tant que`,
6923-
notAllowedMessageHyperLinked: 'copilot',
6924-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `pour ${accountOwnerEmail}, vous n'avez pas la permission d'effectuer cette action. Désolé !`,
6922+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6923+
`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.`,
69256924
copilotAccess: 'Accès Copilot',
69266925
},
69276926
debug: {

src/languages/it.ts

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

src/languages/ja.ts

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

src/languages/nl.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6910,9 +6910,8 @@ const translations = {
69106910
enterMagicCodeUpdate: ({contactMethod}: EnterMagicCodeParams) => `Voer de magische code in die naar ${contactMethod} is verzonden om uw copilot bij te werken.`,
69116911
notAllowed: 'Niet zo snel...',
69126912
noAccessMessage: 'Als copiloot heb je geen toegang tot deze pagina. Sorry!',
6913-
notAllowedMessageStart: `Als een`,
6914-
notAllowedMessageHyperLinked: 'copilot',
6915-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `voor ${accountOwnerEmail}, je hebt geen toestemming om deze actie uit te voeren. Sorry!`,
6913+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6914+
`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!`,
69166915
copilotAccess: 'Copilot-toegang',
69176916
},
69186917
debug: {

src/languages/pl.ts

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

src/languages/pt-BR.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) => `Por favor, insira o código mágico enviado para ${contactMethod} para atualizar seu copiloto.`,
69076907
notAllowed: 'Não tão rápido...',
69086908
noAccessMessage: 'Como copiloto, você não tem acesso a esta página. Desculpe!',
6909-
notAllowedMessageStart: `Como um(a)`,
6910-
notAllowedMessageHyperLinked: 'copilot',
6911-
notAllowedMessageEnd: ({accountOwnerEmail}: AccountOwnerParams) => `para ${accountOwnerEmail}, você não tem permissão para realizar esta ação. Desculpe!`,
6909+
notAllowedMessage: ({accountOwnerEmail}: AccountOwnerParams) =>
6910+
`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!`,
69126911
copilotAccess: 'Acesso ao Copilot',
69136912
},
69146913
debug: {

0 commit comments

Comments
 (0)