Skip to content

Commit

Permalink
Merge pull request #10197 from Puneet-here/phoneNumber-error
Browse files Browse the repository at this point in the history
use same phone number example at all the phone number errors
  • Loading branch information
tgolen authored Aug 3, 2022
2 parents 69b7357 + 90d6f94 commit 06b378d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ const CONST = {
CURRENCY: {
USD: 'USD',
},
EXAMPLE_PHONE_NUMBER: '+15005550006',
CONCIERGE_CHAT_NAME: 'Concierge',
CLOUDFRONT_URL,
USE_EXPENSIFY_URL,
Expand Down
7 changes: 3 additions & 4 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
error: {
invalidAmount: 'Invalid amount',
acceptedTerms: 'You must accept the Terms of Service to continue',
phoneNumber: 'Please enter a valid phone number, with the country code (e.g. +1234567890)',
phoneNumber: `Please enter a valid phone number, with the country code (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
},
please: 'Please',
contactUs: 'contact us',
Expand Down Expand Up @@ -586,7 +586,7 @@ export default {
callMeByMyName: 'Call me by my name',
},
messages: {
errorMessageInvalidPhone: 'Please enter a valid phone number without brackets or dashes. If you\'re outside the US please include your country code, eg. +447782339811',
errorMessageInvalidPhone: `Please enter a valid phone number without brackets or dashes. If you're outside the US please include your country code (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
},
onfidoStep: {
acceptTerms: 'By continuing with the request to activate your Expensify wallet, you confirm that you have read, understand and accept ',
Expand Down Expand Up @@ -860,10 +860,9 @@ export default {
invite: {
invitePeople: 'Invite new members',
personalMessagePrompt: 'Add a personal message (optional)',
pleaseSelectUser: 'Please select a user from contacts.',
genericFailureMessage: 'An error occurred inviting the user to the workspace, please try again.',
welcomeNote: ({workspaceName}) => `You have been invited to ${workspaceName || 'a workspace'}! Download the Expensify mobile app at use.expensify.com/download to start tracking your expenses.`,
pleaseEnterValidLogin: 'Please ensure the email or phone number is valid (e.g. +15005550006).',
pleaseEnterValidLogin: `Please ensure the email or phone number is valid (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
},
editor: {
nameInputLabel: 'Name',
Expand Down
7 changes: 3 additions & 4 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
error: {
invalidAmount: 'Monto no válido',
acceptedTerms: 'Debes aceptar los Términos de servicio para continuar',
phoneNumber: 'Ingresa un teléfono válido, incluyendo el código de país (p. ej. +1234567890)',
phoneNumber: `Ingresa un teléfono válido, incluyendo el código de país (p. ej. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
},
please: 'Por favor',
contactUs: 'contáctenos',
Expand Down Expand Up @@ -586,7 +586,7 @@ export default {
callMeByMyName: 'Llámame por mi nombre',
},
messages: {
errorMessageInvalidPhone: 'Por favor, introduce un número de teléfono válido sin paréntesis o guiones. Si reside fuera de Estados Unidos, por favor incluye el prefijo internacional. P. ej. +447782339811',
errorMessageInvalidPhone: `Por favor, introduce un número de teléfono válido sin paréntesis o guiones. Si reside fuera de Estados Unidos, por favor incluye el prefijo internacional (p. ej. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
},
onfidoStep: {
acceptTerms: 'Al continuar con la solicitud para activar su billetera Expensify, confirma que ha leído, comprende y acepta ',
Expand Down Expand Up @@ -862,10 +862,9 @@ export default {
invite: {
invitePeople: 'Invitar nuevos miembros',
personalMessagePrompt: 'Agregar un mensaje personal (Opcional)',
pleaseSelectUser: 'Asegúrese de que el correo electrónico o el número de teléfono sean válidos (p. ej. +15005550006).',
genericFailureMessage: 'Se produjo un error al invitar al usuario al espacio de trabajo. Vuelva a intentarlo..',
welcomeNote: ({workspaceName}) => `¡Has sido invitado a ${workspaceName}! Descargue la aplicación móvil Expensify en use.expensify.com/download para comenzar a rastrear sus gastos.`,
pleaseEnterValidLogin: 'Asegúrese de que el correo electrónico o el número de teléfono sean válidos (e.g. +15005550006).',
pleaseEnterValidLogin: `Asegúrese de que el correo electrónico o el número de teléfono sean válidos (p. ej. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
},
editor: {
nameInputLabel: 'Nombre',
Expand Down
13 changes: 0 additions & 13 deletions src/pages/workspace/WorkspaceInvitePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,6 @@ class WorkspaceInvitePage extends React.Component {
});
}

/**
* @returns {String}
*/
getErrorText() {
const errors = lodashGet(this.props.policy, 'errors', {});

if (errors.noUserSelected) {
return this.props.translate('workspace.invite.pleaseSelectUser');
}

return '';
}

/**
* @returns {Boolean}
*/
Expand Down

0 comments on commit 06b378d

Please sign in to comment.