Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6678,14 +6678,9 @@ ${amount} für ${merchant} - ${date}`,
copyReferralLink: 'Einladungslink kopieren',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'Chatte mit deinem Setup-Spezialisten in',
phrase2: 'für Hilfe',
},
default: {
phrase1: 'Nachricht',
phrase2: 'für Hilfe bei der Einrichtung',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`Chatte mit deinem Setup-Spezialisten in <a href="${href}">${adminReportName}</a> für Hilfe`,
default: `Nachricht <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> für Hilfe bei der Einrichtung`,
},
violations: {
allTagLevelsRequired: 'Alle Tags erforderlich',
Expand Down
11 changes: 3 additions & 8 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6628,14 +6628,9 @@ const translations = {
copyReferralLink: 'Copy invite link',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'Chat with your setup specialist in ',
phrase2: ' for help',
},
default: {
phrase1: 'Message ',
phrase2: ' for help with setup',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`Chat with your setup specialist in <a href="${href}">${adminReportName}</a> for help`,
default: `Message <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> for help with setup`,
},
violations: {
allTagLevelsRequired: 'All tags required',
Expand Down
11 changes: 3 additions & 8 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7122,14 +7122,9 @@ ${amount} para ${merchant} - ${date}`,
copyReferralLink: 'Copiar enlace de invitación',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'Chatea con tu especialista asignado en ',
phrase2: ' para obtener ayuda',
},
default: {
phrase1: 'Envía un correo electrónico a ',
phrase2: ' para obtener ayuda con la configuración',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`Chatea con tu especialista asignado en <a href="${href}">${adminReportName}</a> para obtener ayuda`,
default: `Envía un correo electrónico a <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> para obtener ayuda con la configuración`,
},
violations: {
allTagLevelsRequired: 'Todas las etiquetas son obligatorias',
Expand Down
11 changes: 3 additions & 8 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6685,14 +6685,9 @@ ${amount} pour ${merchant} - ${date}`,
copyReferralLink: "Copier le lien d'invitation",
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'Discutez avec votre spécialiste de configuration en',
phrase2: "pour obtenir de l'aide",
},
default: {
phrase1: 'Message',
phrase2: "pour obtenir de l'aide avec la configuration",
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`Discutez avec votre spécialiste de configuration en <a href="${href}">${adminReportName}</a> pour obtenir de l'aide`,
default: `Message <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> pour obtenir de l'aide avec la configuration`,
},
violations: {
allTagLevelsRequired: 'Tous les tags requis',
Expand Down
11 changes: 3 additions & 8 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6690,14 +6690,9 @@ ${amount} per ${merchant} - ${date}`,
copyReferralLink: 'Copia il link di invito',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'Chatta con il tuo specialista di configurazione in',
phrase2: 'per assistenza',
},
default: {
phrase1: 'Messaggio',
phrase2: 'per assistenza con la configurazione',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`Chatta con il tuo specialista di configurazione in <a href="${href}">${adminReportName}</a> per assistenza`,
default: `Messaggio <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> per assistenza con la configurazione`,
},
violations: {
allTagLevelsRequired: 'Tutti i tag richiesti',
Expand Down
11 changes: 3 additions & 8 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6624,14 +6624,9 @@ ${date} - ${merchant}に${amount}`,
copyReferralLink: '招待リンクをコピー',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'セットアップスペシャリストとチャットする',
phrase2: 'ヘルプが必要な場合',
},
default: {
phrase1: 'メッセージ',
phrase2: 'セットアップのヘルプについて',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`セットアップスペシャリストとチャットする <a href="${href}">${adminReportName}</a> ヘルプが必要な場合`,
default: `メッセージ <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> セットアップのヘルプについて`,
},
violations: {
allTagLevelsRequired: 'すべてのタグが必要です。',
Expand Down
11 changes: 3 additions & 8 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6674,14 +6674,9 @@ ${amount} voor ${merchant} - ${date}`,
copyReferralLink: 'Kopieer uitnodigingslink',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'Chat met uw setup specialist in',
phrase2: 'voor hulp',
},
default: {
phrase1: 'Bericht',
phrase2: 'voor hulp bij de installatie',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`Chat met uw setup specialist in <a href="${href}">${adminReportName}</a> voor hulp`,
default: `Bericht <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> voor hulp bij de installatie`,
},
violations: {
allTagLevelsRequired: 'Alle tags vereist',
Expand Down
11 changes: 3 additions & 8 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6660,14 +6660,9 @@ ${amount} dla ${merchant} - ${date}`,
copyReferralLink: 'Skopiuj link zaproszenia',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'Porozmawiaj ze swoim specjalistą ds. konfiguracji w',
phrase2: 'po pomoc',
},
default: {
phrase1: 'Wiadomość',
phrase2: 'w celu uzyskania pomocy przy konfiguracji',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`Porozmawiaj ze swoim specjalistą ds. konfiguracji w <a href="${href}">${adminReportName}</a> po pomoc`,
default: `Wiadomość <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> w celu uzyskania pomocy przy konfiguracji`,
},
violations: {
allTagLevelsRequired: 'Wszystkie wymagane tagi',
Expand Down
11 changes: 3 additions & 8 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6669,14 +6669,9 @@ ${amount} para ${merchant} - ${date}`,
copyReferralLink: 'Copiar link de convite',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: 'Converse com seu especialista em configuração em',
phrase2: 'para ajuda',
},
default: {
phrase1: 'Mensagem',
phrase2: 'para ajuda com a configuração',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) =>
`Converse com seu especialista em configuração em <a href="${href}">${adminReportName}</a> para ajuda`,
default: `Mensagem <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> para ajuda com a configuração`,
},
violations: {
allTagLevelsRequired: 'Todas as tags são obrigatórias',
Expand Down
10 changes: 2 additions & 8 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6539,14 +6539,8 @@ ${merchant}的${amount} - ${date}`,
copyReferralLink: '复制邀请链接',
},
systemChatFooterMessage: {
[CONST.INTRO_CHOICES.MANAGE_TEAM]: {
phrase1: '与您的设置专家聊天',
phrase2: '帮助',
},
default: {
phrase1: '消息',
phrase2: '帮助设置',
},
[CONST.INTRO_CHOICES.MANAGE_TEAM]: ({adminReportName, href}: {adminReportName: string; href: string}) => `与您的设置专家聊天在 <a href="${href}">${adminReportName}</a> 帮助`,
default: `消息 <concierge-link>${CONST.CONCIERGE_CHAT_NAME}</concierge-link> 帮助设置`,
},
violations: {
allTagLevelsRequired: '所有标签均为必填项',
Expand Down
29 changes: 11 additions & 18 deletions src/pages/home/report/SystemChatReportFooterMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import {emailSelector} from '@selectors/Session';
import React, {useMemo} from 'react';
import Banner from '@components/Banner';
import {Lightbulb} from '@components/Icon/Expensicons';
import RenderHTML from '@components/RenderHTML';
import Text from '@components/Text';
import TextLink from '@components/TextLink';
import useEnvironment from '@hooks/useEnvironment';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useThemeStyles from '@hooks/useThemeStyles';
import {getPolicy, shouldShowPolicy} from '@libs/PolicyUtils';
import Navigation from '@navigation/Navigation';
import {navigateToConciergeChat} from '@userActions/Report';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';

function SystemChatReportFooterMessage() {
const {translate} = useLocalize();
const styles = useThemeStyles();
const {environmentURL} = useEnvironment();
const [currentUserLogin] = useOnyx(ONYXKEYS.SESSION, {selector: emailSelector, canBeMissing: true});
const [choice] = useOnyx(ONYXKEYS.ONBOARDING_PURPOSE_SELECTED, {canBeMissing: true});
const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: true});
Expand All @@ -38,24 +38,17 @@ function SystemChatReportFooterMessage() {
switch (choice) {
case CONST.ONBOARDING_CHOICES.MANAGE_TEAM:
return (
<>
{translate('systemChatFooterMessage.newDotManageTeam.phrase1')}
<TextLink onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(adminChatReport?.reportID))}>
{adminChatReport?.reportName ?? CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS}
</TextLink>
{translate('systemChatFooterMessage.newDotManageTeam.phrase2')}
</>
<RenderHTML
html={translate('systemChatFooterMessage.newDotManageTeam', {
adminReportName: adminChatReport?.reportName ?? CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS,
href: `${environmentURL}/${ROUTES.REPORT_WITH_ID.getRoute(adminChatReport?.reportID)}`,
})}
/>
);
default:
return (
<>
{translate('systemChatFooterMessage.default.phrase1')}
<TextLink onPress={() => navigateToConciergeChat()}>{CONST?.CONCIERGE_CHAT_NAME}</TextLink>
{translate('systemChatFooterMessage.default.phrase2')}
</>
);
return <RenderHTML html={translate('systemChatFooterMessage.default')} />;
}
}, [adminChatReport?.reportName, adminChatReport?.reportID, choice, translate]);
}, [adminChatReport?.reportName, adminChatReport?.reportID, choice, translate, environmentURL]);

return (
<Banner
Expand Down
Loading