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
6 changes: 3 additions & 3 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1622,9 +1622,9 @@ const translations: TranslationDeepObject<typeof en> = {
featureRequiresValidate: 'Diese Funktion erfordert, dass Sie Ihr Konto verifizieren.',
validateAccount: 'Bestätigen Sie Ihr Konto',
helpText: ({email}: {email: string}) =>
`Fügen Sie weitere Möglichkeiten hinzu, Belege zu senden. Leiten Sie sie weiter an <copy-text text="${email}"/> oder senden Sie ihnen eine SMS an 47777 (nur US-Nummern).`,
pleaseVerify: 'Bitte überprüfen Sie diese Kontaktmethode',
getInTouch: 'Wann immer wir mit Ihnen in Kontakt treten müssen, werden wir diese Kontaktmethode verwenden.',
`Fügen Sie weitere Möglichkeiten hinzu, sich anzumelden und Belege an Expensify zu senden.<br/><br/>Fügen Sie eine E-Mail-Adresse hinzu, um Belege an <a href="mailto:${email}">${email}</a> weiterzuleiten, oder fügen Sie eine Telefonnummer hinzu, um Belege per SMS an 47777 zu senden (nur US-Nummern).`,
pleaseVerify: 'Bitte überprüfen Sie diese Kontaktmethode.',
getInTouch: 'Wir verwenden diese Methode, um Sie zu kontaktieren.',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) =>
`Bitte geben Sie den magischen Code ein, der an ${contactMethod} gesendet wurde. Er sollte in ein bis zwei Minuten ankommen.`,
setAsDefault: 'Als Standard festlegen',
Expand Down
7 changes: 4 additions & 3 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1724,9 +1724,10 @@ const translations = {
contactMethods: 'Contact methods',
featureRequiresValidate: 'This feature requires you to validate your account.',
validateAccount: 'Validate your account',
helpText: ({email}: {email: string}) => `Add more ways to send receipts. Forward them to <copy-text text="${email}"/> or text them to 47777 (US numbers only).`,
pleaseVerify: 'Please verify this contact method',
getInTouch: "Whenever we need to get in touch with you, we'll use this contact method.",
helpText: ({email}: {email: string}) =>
`Add more ways to log in and send receipts to Expensify.<br/><br/>Add an email address to forward receipts to <a href="mailto:${email}">${email}</a> or add a phone number to text receipts to 47777 (US numbers only).`,
pleaseVerify: 'Please verify this contact method.',
getInTouch: "We'll use this method to contact you.",
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Please enter the magic code sent to ${contactMethod}. It should arrive within a minute or two.`,
setAsDefault: 'Set as default',
yourDefaultContactMethod: "This is your current default contact method. Before you can delete it, you'll need to choose another contact method and click “Set as default”.",
Expand Down
6 changes: 3 additions & 3 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1378,9 +1378,9 @@ const translations: TranslationDeepObject<typeof en> = {
featureRequiresValidate: 'Esta función requiere que valides tu cuenta.',
validateAccount: 'Valida tu cuenta',
helpText: ({email}: {email: string}) =>
`Añade más formas de enviar recibos. Reenvíalos a <copy-text text="${email}"/> o envíalos por mensaje de texto al 47777 (solo números de EE. UU.).`,
pleaseVerify: 'Por favor, verifica este método de contacto',
getInTouch: 'Utilizaremos este método de contacto cuando necesitemos contactarte.',
`Agrega más formas de iniciar sesión y enviar recibos a Expensify.<br/><br/>Agrega una dirección de correo electrónico para reenviar recibos a <a href="mailto:${email}">${email}</a> o agrega un número de teléfono para enviar recibos por mensaje de texto al 47777 (solo números de EE. UU.).`,
pleaseVerify: 'Por favor, verifica este método de contacto.',
getInTouch: 'Usaremos este método para comunicarnos contigo.',
enterMagicCode: ({contactMethod}) => `Por favor, introduce el código mágico enviado a ${contactMethod}. Debería llegar en un par de minutos.`,
setAsDefault: 'Establecer como predeterminado',
yourDefaultContactMethod:
Expand Down
6 changes: 3 additions & 3 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1624,9 +1624,9 @@ const translations: TranslationDeepObject<typeof en> = {
featureRequiresValidate: 'Cette fonctionnalité nécessite que vous validiez votre compte.',
validateAccount: 'Validez votre compte',
helpText: ({email}: {email: string}) =>
`Ajoutez plus de moyens pour envoyer des reçus. Transférez-les à <copy-text text="${email}"/> ou envoyez-les par SMS au 47777 (numéros américains uniquement).`,
pleaseVerify: 'Veuillez vérifier cette méthode de contact',
getInTouch: 'Chaque fois que nous devons vous contacter, nous utiliserons cette méthode de contact.',
`Ajoutez d’autres façons de vous connecter et d’envoyer des reçus à Expensify.<br/><br/>Ajoutez une adresse e-mail pour transférer des reçus à <a href="mailto:${email}">${email}</a> ou ajoutez un numéro de téléphone pour envoyer des reçus par SMS au 47777 (numéros américains uniquement).`,
pleaseVerify: 'Veuillez vérifier cette méthode de contact.',
getInTouch: 'Nous utiliserons cette méthode pour vous contacter.',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Veuillez entrer le code magique envoyé à ${contactMethod}. Il devrait arriver dans une minute ou deux.`,
setAsDefault: 'Définir par défaut',
yourDefaultContactMethod:
Expand Down
7 changes: 4 additions & 3 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1617,9 +1617,10 @@ const translations: TranslationDeepObject<typeof en> = {
contactMethods: 'Metodi di contatto',
featureRequiresValidate: 'Questa funzione richiede di convalidare il tuo account.',
validateAccount: 'Convalida il tuo account',
helpText: ({email}: {email: string}) => `Aggiungi più modi per inviare le ricevute. Inoltrale a <copy-text text="${email}"/> o inviarli al 47777 (solo numeri USA).`,
pleaseVerify: 'Si prega di verificare questo metodo di contatto',
getInTouch: 'Ogni volta che avremo bisogno di contattarti, useremo questo metodo di contatto.',
helpText: ({email}: {email: string}) =>
`Aggiungi altri modi per accedere e inviare ricevute a Expensify.<br/><br/>Aggiungi un indirizzo email per inoltrare le ricevute a <a href="mailto:${email}">${email}</a> oppure aggiungi un numero di telefono per inviare ricevute via SMS al 47777 (solo numeri statunitensi).`,
pleaseVerify: 'Si prega di verificare questo metodo di contatto.',
getInTouch: 'Useremo questo metodo per contattarti.',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Per favore, inserisci il codice magico inviato a ${contactMethod}. Dovrebbe arrivare entro un minuto o due.`,
setAsDefault: 'Imposta come predefinito',
yourDefaultContactMethod:
Expand Down
6 changes: 3 additions & 3 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1618,9 +1618,9 @@ const translations: TranslationDeepObject<typeof en> = {
featureRequiresValidate: 'この機能を使用するには、アカウントの確認が必要です。',
validateAccount: 'アカウントを確認してください',
helpText: ({email}: {email: string}) =>
`領収書を送信する方法を追加してください。それらを転送する先は <copy-text text="${email}"/> または、47777(米国の番号のみ)にテキストメッセージを送信してください。`,
pleaseVerify: 'この連絡方法を確認してください',
getInTouch: '私たちがあなたに連絡を取る必要がある場合、この連絡方法を使用します。',
`Expensify にログインしたり領収書を送信したりする方法を追加できます。<br/><br/>領収書を <a href="mailto:${email}">${email}</a> に転送するメールアドレスを追加するか、電話番号を追加して領収書を 47777 にテキスト送信します(米国の番号のみ)。`,
pleaseVerify: 'この連絡方法を確認してください',
getInTouch: 'この方法を使ってご連絡します。',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `${contactMethod}に送信されたマジックコードを入力してください。1~2分以内に届くはずです。`,
setAsDefault: 'デフォルトに設定',
yourDefaultContactMethod: 'これは現在のデフォルトの連絡方法です。削除する前に、別の連絡方法を選択し、「デフォルトに設定」をクリックする必要があります。',
Expand Down
6 changes: 3 additions & 3 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1618,9 +1618,9 @@ const translations: TranslationDeepObject<typeof en> = {
featureRequiresValidate: 'Deze functie vereist dat je je account verifieert.',
validateAccount: 'Valideer uw account',
helpText: ({email}: {email: string}) =>
`Voeg meer manieren toe om bonnen te verzenden. Stuur ze naar <copy-text text="${email}"/> of stuur ze naar 47777 (alleen Amerikaanse nummers).`,
pleaseVerify: 'Verifieer deze contactmethode alstublieft',
getInTouch: 'Telkens wanneer we contact met je moeten opnemen, gebruiken we deze contactmethode.',
`Voeg meer manieren toe om in te loggen en bonnetjes naar Expensify te sturen.<br/><br/>Voeg een e-mailadres toe om bonnetjes door te sturen naar <a href="mailto:${email}">${email}</a> of voeg een telefoonnummer toe om bonnetjes te sms’en naar 47777 (alleen Amerikaanse nummers).`,
pleaseVerify: 'Verifieer deze contactmethode alstublieft.',
getInTouch: 'We gebruiken deze methode om contact met je op te nemen.',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Voer de magische code in die is verzonden naar ${contactMethod}. Het zou binnen een minuut of twee moeten aankomen.`,
setAsDefault: 'Instellen als standaard',
yourDefaultContactMethod:
Expand Down
6 changes: 3 additions & 3 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1616,9 +1616,9 @@ const translations: TranslationDeepObject<typeof en> = {
featureRequiresValidate: 'Ta funkcja wymaga weryfikacji konta.',
validateAccount: 'Zweryfikuj swoje konto',
helpText: ({email}: {email: string}) =>
`Dodaj więcej sposobów na przesyłanie paragonów. Prześlij je do <copy-text text="${email}"/> lub wyślij SMS na numer 47777 (tylko numery w USA).`,
pleaseVerify: 'Proszę zweryfikować tę metodę kontaktu',
getInTouch: 'Kiedy będziemy musieli się z Tobą skontaktować, użyjemy tej metody kontaktu.',
`Dodaj więcej sposobów logowania się i wysyłania paragonów do Expensify.<br/><br/>Dodaj adres e-mail, aby przesyłać paragony na <a href="mailto:${email}">${email}</a> lub dodaj numer telefonu, aby wysyłać paragony SMS-em na 47777 (tylko numery z USA).`,
pleaseVerify: 'Proszę zweryfikować tę metodę kontaktu.',
getInTouch: 'Użyjemy tej metody, aby się z Tobą skontaktować.',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Proszę wprowadzić magiczny kod wysłany na ${contactMethod}. Powinien dotrzeć w ciągu minuty lub dwóch.`,
setAsDefault: 'Ustaw jako domyślne',
yourDefaultContactMethod: 'To jest Twoja domyślna metoda kontaktu. Zanim będziesz mógł ją usunąć, musisz wybrać inną metodę kontaktu i kliknąć „Ustaw jako domyślną”.',
Expand Down
6 changes: 3 additions & 3 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1614,9 +1614,9 @@ const translations: TranslationDeepObject<typeof en> = {
featureRequiresValidate: 'Este recurso requer que você valide sua conta.',
validateAccount: 'Valide sua conta',
helpText: ({email}: {email: string}) =>
`Adicione mais maneiras de enviar recibos. Encaminhe-os para <copy-text text="${email}"/> ou envie uma mensagem para 47777 (apenas números dos EUA).`,
pleaseVerify: 'Por favor, verifique este método de contato',
getInTouch: 'Sempre que precisarmos entrar em contato com você, usaremos este método de contato.',
`Adicione mais formas de fazer login e enviar recibos para o Expensify.<br/><br/>Adicione um endereço de e-mail para encaminhar recibos para <a href="mailto:${email}">${email}</a> ou adicione um número de telefone para enviar recibos por mensagem de texto para 47777 (somente números dos EUA).`,
pleaseVerify: 'Por favor, verifique este método de contato.',
getInTouch: 'Usaremos este método para entrar em contato com você.',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Por favor, insira o código mágico enviado para ${contactMethod}. Ele deve chegar em um ou dois minutos.`,
setAsDefault: 'Definir como padrão',
yourDefaultContactMethod: 'Este é o seu método de contato padrão atual. Antes de poder excluí-lo, você precisará escolher outro método de contato e clicar em “Definir como padrão”.',
Expand Down
7 changes: 4 additions & 3 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1592,9 +1592,10 @@ const translations: TranslationDeepObject<typeof en> = {
contactMethods: '联系方式',
featureRequiresValidate: '此功能需要您验证您的账户。',
validateAccount: '验证您的账户',
helpText: ({email}: {email: string}) => `添加更多发送收据的方式。转发到 <copy-text text="${email}"/> 或将其发送至 47777(仅限美国号码)。`,
pleaseVerify: '请验证此联系方式',
getInTouch: '每当我们需要联系您时,我们将使用此联系方式。',
helpText: ({email}: {email: string}) =>
`添加更多登录方式并将收据发送到 Expensify。<br/><br/>添加电子邮件地址以将收据转发至 <a href="mailto:${email}">${email}</a>,或添加电话号码将收据短信发送至 47777(仅限美国号码)。`,
pleaseVerify: '请验证此联系方式。',
getInTouch: '我们将使用此方式与您联系。',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `请输入发送到${contactMethod}的验证码。验证码将在一分钟内到达。`,
setAsDefault: '设为默认',
yourDefaultContactMethod: '这是您当前的默认联系方式。在删除它之前,您需要选择另一种联系方式并点击“设为默认”。',
Expand Down
11 changes: 8 additions & 3 deletions src/pages/settings/Profile/ProfilePage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useRoute} from '@react-navigation/native';
import React, {useContext} from 'react';
import React, {useContext, useMemo} from 'react';
import {View} from 'react-native';
import AvatarButtonWithIcon from '@components/AvatarButtonWithIcon';
import AvatarSkeleton from '@components/AvatarSkeleton';
Expand All @@ -7,8 +7,8 @@
import {DelegateNoAccessContext} from '@components/DelegateNoAccessModalProvider';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import * as Expensicons from '@components/Icon/Expensicons';

Check warning on line 10 in src/pages/settings/Profile/ProfilePage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used by a pattern. Direct imports from Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details

Check warning on line 10 in src/pages/settings/Profile/ProfilePage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used. Direct imports from @components/Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details
import * as Illustrations from '@components/Icon/Illustrations';

Check warning on line 11 in src/pages/settings/Profile/ProfilePage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Illustrations' import is restricted from being used by a pattern. Direct imports from Icon/Illustrations are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyIllustrations` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details

Check warning on line 11 in src/pages/settings/Profile/ProfilePage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Illustrations' import is restricted from being used. Direct imports from @components/Icon/Illustrations are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyIllustrations` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details
import MenuItemGroup from '@components/MenuItemGroup';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import ScreenWrapper from '@components/ScreenWrapper';
Expand All @@ -27,7 +27,7 @@
import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types';
import type {SettingsSplitNavigatorParamList} from '@libs/Navigation/types';
import {getDisplayNameOrDefault, getFormattedAddress} from '@libs/PersonalDetailsUtils';
import {getLoginListBrickRoadIndicator} from '@libs/UserUtils';
import {getContactMethodsOptions, getLoginListBrickRoadIndicator} from '@libs/UserUtils';
import CONST from '@src/CONST';
import type {TranslationPaths} from '@src/languages/types';
import ONYXKEYS from '@src/ONYXKEYS';
Expand All @@ -44,6 +44,7 @@
const {safeAreaPaddingBottomStyle} = useSafeAreaPaddings();
const scrollEnabled = useScrollEnabled();
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST, {canBeMissing: true});
const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false});
const [privatePersonalDetails] = useOnyx(ONYXKEYS.PRIVATE_PERSONAL_DETAILS, {canBeMissing: false});
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
const route = useRoute<PlatformStackRouteProp<SettingsSplitNavigatorParamList, typeof SCREENS.SETTINGS.PROFILE.ROOT>>();
Expand All @@ -52,6 +53,7 @@
const pronounsKey = currentUserPersonalDetails?.pronouns?.replace(CONST.PRONOUNS.PREFIX, '') ?? '';
return pronounsKey ? translate(`pronouns.${pronounsKey}` as TranslationPaths) : translate('profilePage.selectYourPronouns');
};
const logins = useMemo(() => getContactMethodsOptions(translate, loginList, session?.email), [loginList, session?.email, translate]);

const avatarURL = currentUserPersonalDetails?.avatar ?? '';
const accountID = currentUserPersonalDetails?.accountID ?? CONST.DEFAULT_NUMBER_ID;
Expand All @@ -72,7 +74,10 @@
},
{
description: translate('contacts.contactMethods'),
title: formatPhoneNumber(currentUserPersonalDetails?.login ?? ''),
title: logins
.map((login) => login?.menuItemTitle)
.filter(Boolean)
.join(', '),
pageRoute: ROUTES.SETTINGS_CONTACT_METHODS.route,
brickRoadIndicator: contactMethodBrickRoadIndicator,
testID: 'contact-method-menu-item',
Expand Down
Loading