From ac280581bd3126df8f40911423708997758289f0 Mon Sep 17 00:00:00 2001 From: James Dean Date: Tue, 25 Jun 2024 15:54:34 -0700 Subject: [PATCH 01/12] Update en.ts --- src/languages/en.ts | 98 ++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 2475bd2dd56e..8f2407d314aa 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1179,7 +1179,7 @@ export default { delaySubmissionDescription: 'Expenses are shared right away for better spend visibility. Set a slower cadence if needed.', submissionFrequency: 'Submission frequency', submissionFrequencyDateOfMonth: 'Date of month', - addApprovalsTitle: 'Add approvals', + addApprovalsTitle: 'Approvals', approver: 'Approver', connectBankAccount: 'Connect bank account', addApprovalsDescription: 'Require additional approval before authorizing a payment.', @@ -1544,7 +1544,7 @@ export default { bankAccount: { bankInfo: 'Bank info', confirmBankInfo: 'Confirm bank info', - manuallyAdd: 'Manually add your bank account', + manuallyAdd: 'What are your business bank account details?', letsDoubleCheck: "Let's double check that everything looks right.", accountEnding: 'Account ending in', thisBankAccount: 'This bank account will be used for business payments on your workspace', @@ -1553,51 +1553,51 @@ export default { chooseAnAccountBelow: 'Choose an account below', addBankAccount: 'Add bank account', chooseAnAccount: 'Choose an account', - connectOnlineWithPlaid: 'Connect online with Plaid', + connectOnlineWithPlaid: 'Connect via Plaid', connectManually: 'Connect manually', - desktopConnection: 'Note: To connect with Chase, Wells Fargo, Capital One or Bank of America, please click here to complete this process in a browser.', + desktopConnection: 'Note: To connect with Chase, Wells Fargo, Capital One, or Bank of America, please click here to complete this process in a browser.', yourDataIsSecure: 'Your data is secure', - toGetStarted: 'Add a bank account to reimburse expenses, issue corporate cards, collect invoice payments, and pay bills all from one place.', + toGetStarted: 'Connect a bank account to reimburse expenses, issue corporate cards, collect invoice payments, and pay bills all from one place.', plaidBodyCopy: 'Give your employees an easier way to pay - and get paid back - for company expenses.', - checkHelpLine: 'Your routing number and account number can be found on a check for the account.', + checkHelpLine: 'Your routing and account numbers can be found on a check for the account.', validateAccountError: { - phrase1: 'Hold up! We need you to validate your account first. To do so, ', + phrase1: 'Hold up! You need to validate your account first. To do so, ', phrase2: 'sign back in with a magic code ', phrase3: 'or ', phrase4: 'verify your account here', }, - hasPhoneLoginError: 'To add a verified bank account please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.', + hasPhoneLoginError: 'To add a bank account, please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.', hasBeenThrottledError: 'There was an error adding your bank account. Please wait a few minutes and try again.', - hasCurrencyError: 'Oops! It appears that your workspace currency is set to a different currency than USD. To proceed, please set it to USD and try again.', + hasCurrencyError: "Oops! It looks like your workspace currency isn't set to USD. Please set it to USD and try again.", error: { - youNeedToSelectAnOption: 'You need to select an option to proceed.', - noBankAccountAvailable: 'Sorry, no bank account is available.', - noBankAccountSelected: 'Please choose an account.', - taxID: 'Please enter a valid tax ID number.', - website: 'Please enter a valid website. The website should be in lowercase.', - zipCode: `Incorrect zip code format. Acceptable format: ${CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`, - phoneNumber: 'Please enter a valid phone number.', - companyName: 'Please enter a valid legal business name.', - addressCity: 'Please enter a valid city.', - addressStreet: 'Please enter a valid street address that is not a PO box.', - addressState: 'Please select a valid state.', - incorporationDateFuture: 'Incorporation date cannot be in the future.', - incorporationState: 'Please select a valid state.', - industryCode: 'Please enter a valid industry classification code. Must be 6 digits.', - restrictedBusiness: 'Please confirm company is not on the list of restricted businesses.', - routingNumber: 'Please enter a valid routing number.', - accountNumber: 'Please enter a valid account number.', - routingAndAccountNumberCannotBeSame: 'The routing number and account number cannot be the same.', - companyType: 'Please select a valid company type.', - tooManyAttempts: 'Due to a high number of login attempts, this option has been temporarily disabled for 24 hours. Please try again later or manually enter details instead.', - address: 'Please enter a valid address.', - dob: 'Please select a valid date of birth.', - age: 'Must be over 18 years old.', - ssnLast4: 'Please enter valid last 4 digits of SSN.', - firstName: 'Please enter a valid first name.', - lastName: 'Please enter a valid last name.', - noDefaultDepositAccountOrDebitCardAvailable: 'Please add a default deposit bank account or debit card.', - validationAmounts: 'The validation amounts you entered are incorrect. Please double-check your bank statement and try again.', + youNeedToSelectAnOption: 'Please select an option to proceed', + noBankAccountAvailable: "Sorry, there's no bank account available", + noBankAccountSelected: 'Please choose an account', + taxID: 'Please enter a valid tax ID number', + website: 'Please enter a valid website using lower-case letters', + zipCode: `Please enter a valid ZIP code using the format: ${CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`, + phoneNumber: 'Please enter a valid phone number', + companyName: 'Please enter a valid business name', + addressCity: 'Please enter a valid city', + addressStreet: 'Please enter a valid street address', + addressState: 'Please select a valid state', + incorporationDateFuture: 'Incorporation date can't be in the future', + incorporationState: 'Please select a valid state', + industryCode: 'Please enter a valid industry classification code with six digits', + restrictedBusiness: 'Please confirm the business isn't on the list of restricted businesses', + routingNumber: 'Please enter a valid routing number', + accountNumber: 'Please enter a valid account number', + routingAndAccountNumberCannotBeSame: 'Routing and account numbers can't match', + companyType: 'Please select a valid company type', + tooManyAttempts: 'Due to a high number of login attempts, this option has been disabled for 24 hours. Please try again later or enter details manually instead.', + address: 'Please enter a valid address', + dob: 'Please select a valid date of birth', + age: 'Must be over 18 years old', + ssnLast4: 'Please enter valid last 4 digits of SSN', + firstName: 'Please enter a valid first name', + lastName: 'Please enter a valid last name', + noDefaultDepositAccountOrDebitCardAvailable: 'Please add a default deposit bank account or debit card', + validationAmounts: 'The validation amounts you entered are incorrect. Please double check your bank statement and try again.', }, }, addPersonalBankAccountPage: { @@ -1622,18 +1622,18 @@ export default { }, }, messages: { - 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}).`, + 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}).`, errorMessageInvalidEmail: 'Invalid email', userIsAlreadyMember: ({login, name}: UserIsAlreadyMemberParams) => `${login} is already a member of ${name}`, }, onfidoStep: { - acceptTerms: 'By continuing with the request to activate your Expensify wallet, you confirm that you have read, understand and accept ', + acceptTerms: 'By continuing with the request to activate your Expensify Wallet, you confirm that you have read, understand, and accept ', facialScan: 'Onfido’s Facial Scan Policy and Release', tryAgain: 'Try again', verifyIdentity: 'Verify identity', - letsVerifyIdentity: "Let's verify your identity.", + letsVerifyIdentity: "Let's verify your identity", butFirst: `But first, the boring stuff. Read up on the legalese in the next step and click "Accept" when you're ready.`, - genericError: 'There was an error while processing this step. Please try again.', + genericError: 'There was an error. Please try again.', cameraPermissionsNotGranted: 'Enable camera access', cameraRequestMessage: 'We need access to your camera to complete bank account verification. Please enable via Settings > New Expensify.', microphonePermissionsNotGranted: 'Enable microphone access', @@ -1647,17 +1647,17 @@ export default { }, additionalDetailsStep: { headerTitle: 'Additional details', - helpText: 'We need to confirm the following information before you can send and receive money from your Wallet.', + helpText: 'We need to confirm the following information before you can send and receive money from your wallet.', helpTextIdologyQuestions: 'We need to ask you just a few more questions to finish validating your identity.', helpLink: 'Learn more about why we need this.', legalFirstNameLabel: 'Legal first name', legalMiddleNameLabel: 'Legal middle name', legalLastNameLabel: 'Legal last name', - selectAnswer: 'You need to select a response to proceed.', - ssnFull9Error: 'Please enter a valid 9 digit SSN.', - needSSNFull9: "We're having trouble verifying your SSN. Please enter the full 9 digits of your SSN.", - weCouldNotVerify: 'We could not verify', - pleaseFixIt: 'Please fix this information before continuing.', + selectAnswer: 'Please select a response to proceed.', + ssnFull9Error: 'Please enter a valid nine-digit SSN.', + needSSNFull9: "We're having trouble verifying your SSN. Please enter the full nine digits of your SSN.", + weCouldNotVerify: "We couldn't verify", + pleaseFixIt: 'Please fix this information before continuing', failedKYCTextBefore: "We weren't able to successfully verify your identity. Please try again later and reach out to ", failedKYCTextAfter: ' if you have any questions.', }, @@ -2689,7 +2689,7 @@ export default { yesStartOver: 'Yes, start over', disconnectYour: 'Disconnect your ', bankAccountAnyTransactions: ' bank account. Any outstanding transactions for this account will still complete.', - clearProgress: 'Starting over will clear the progress you have made so far.', + clearProgress: 'Starting over will clear the progress you've made so far.', areYouSure: 'Are you sure?', workspaceCurrency: 'Workspace currency', updateCurrencyPrompt: 'It looks like your workspace is currently set to a different currency than USD. Please click the button below to update your currency to USD now.', @@ -3359,7 +3359,7 @@ export default { }, paymentCard: { addPaymentCard: 'Add payment card', - enterPaymentCardDetails: 'Enter your payment card details.', + enterPaymentCardDetails: 'Enter your payment card details', security: 'Expensify is PCI-DSS compliant, uses bank-level encryption, and utilizes redundant infrastructure to protect your data.', learnMoreAboutSecurity: 'Learn more about our security.', }, From 7e2dace82cf250b7dc44d5d0f1a29d8aef9a9dc9 Mon Sep 17 00:00:00 2001 From: James Dean Date: Tue, 25 Jun 2024 16:10:43 -0700 Subject: [PATCH 02/12] Update en.ts --- src/languages/en.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 8f2407d314aa..69c587ee3614 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -836,7 +836,7 @@ export default { }, privateSection: { title: 'Private', - subtitle: 'These details are used for travel and payments. They are never shown on your public profile.', + subtitle: 'These details are used for travel and payments. They're never shown on your public profile.', }, }, securityPage: { @@ -918,7 +918,7 @@ export default { initialSettingsPage: { about: 'About', aboutPage: { - description: 'The New Expensify App is built by a community of open source developers from around the world. Help us build the future of Expensify.', + description: 'New Expensify is built by a community of open-source developers from around the world. Help us build the future, today.', appDownloadLinks: 'App download links', viewKeyboardShortcuts: 'View keyboard shortcuts', viewTheCode: 'View the code', @@ -942,16 +942,16 @@ export default { viewConsole: 'View debug console', debugConsole: 'Debug console', description: 'Use the tools below to help troubleshoot the Expensify experience. If you encounter any issues, please', - submitBug: 'submit a bug', + submitBug: 'submit a bug report', confirmResetDescription: 'All unsent draft messages will be lost, but the rest of your data is safe.', resetAndRefresh: 'Reset and refresh', - clientSideLogging: 'Client side logging', + clientSideLogging: 'Client-side logging', noLogsToShare: 'No logs to share', useProfiling: 'Use profiling', profileTrace: 'Profile trace', releaseOptions: 'Release options', testingPreferences: 'Testing preferences', - useStagingServer: 'Use Staging Server', + useStagingServer: 'Use staging server', forceOffline: 'Force offline', simulatFailingNetworkRequests: 'Simulate failing network requests', authenticationStatus: 'Authentication status', @@ -1434,7 +1434,7 @@ export default { }, privatePersonalDetails: { personalDetails: 'Personal details', - privateDataMessage: 'These details are used for travel and payments. They are never shown on your public profile.', + privateDataMessage: 'These details are used for travel and payments. They're never shown on your public profile.', legalName: 'Legal name', legalFirstName: 'Legal first name', legalLastName: 'Legal last name', @@ -3077,7 +3077,7 @@ export default { }, teachersUnitePage: { teachersUnite: 'Teachers Unite', - joinExpensifyOrg: 'Join Expensify.org in eliminating injustice around the world and help teachers split their expenses for classrooms in need!', + joinExpensifyOrg: 'Join Expensify.org in eliminating injustice around the world. The current "Teachers Unite" campaign supports educators everywhere by splitting the costs of essential school supplies.', iKnowATeacher: 'I know a teacher', iAmATeacher: 'I am a teacher', getInTouch: 'Excellent! Please share their information so we can get in touch with them.', From 287ca6ea6fb15f17dc65b374b2aa8aeab4031004 Mon Sep 17 00:00:00 2001 From: James Dean Date: Tue, 25 Jun 2024 16:17:01 -0700 Subject: [PATCH 03/12] Update en.ts --- src/languages/en.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 69c587ee3614..ea19048de919 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -918,7 +918,7 @@ export default { initialSettingsPage: { about: 'About', aboutPage: { - description: 'New Expensify is built by a community of open-source developers from around the world. Help us build the future, today.', + description: 'New Expensify is built by a community of open-source developers from around the world. Help us build the future of Expensify.', appDownloadLinks: 'App download links', viewKeyboardShortcuts: 'View keyboard shortcuts', viewTheCode: 'View the code', From d7b23a02523e2ff0011ca477f108a9ef4c8ef833 Mon Sep 17 00:00:00 2001 From: James Dean Date: Tue, 25 Jun 2024 16:21:42 -0700 Subject: [PATCH 04/12] Update en.ts --- src/languages/en.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index ea19048de919..f7be57558547 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -836,7 +836,7 @@ export default { }, privateSection: { title: 'Private', - subtitle: 'These details are used for travel and payments. They're never shown on your public profile.', + subtitle: "These details are used for travel and payments. They're never shown on your public profile.", }, }, securityPage: { From 33ac19a0f3d280eb38829685d8236d357cdb0632 Mon Sep 17 00:00:00 2001 From: James Dean Date: Tue, 25 Jun 2024 16:25:49 -0700 Subject: [PATCH 05/12] Update en.ts --- src/languages/en.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index f7be57558547..7edcf9672326 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1434,7 +1434,7 @@ export default { }, privatePersonalDetails: { personalDetails: 'Personal details', - privateDataMessage: 'These details are used for travel and payments. They're never shown on your public profile.', + privateDataMessage: "These details are used for travel and payments. They're never shown on your public profile.", legalName: 'Legal name', legalFirstName: 'Legal first name', legalLastName: 'Legal last name', From a61460811c64d6fae880e05bf3e3e0f38fb4cc59 Mon Sep 17 00:00:00 2001 From: James Dean Date: Tue, 25 Jun 2024 16:57:15 -0700 Subject: [PATCH 06/12] Update es.ts --- src/languages/es.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 72876757c8aa..47cefd46bedd 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -914,7 +914,7 @@ export default { initialSettingsPage: { about: 'Acerca de', aboutPage: { - description: 'La nueva Expensify está creada por una comunidad de desarrolladores de código abierto de todo el mundo. Ayúdanos a construir el futuro de Expensify.', + description: 'La Nueva Expensify está creada por una comunidad de desarrolladores de código abierto de todo el mundo. Ayúdanos a construir el futuro de Expensify.', appDownloadLinks: 'Enlaces para descargar la App', viewKeyboardShortcuts: 'Ver atajos de teclado', viewTheCode: 'Ver código', @@ -938,7 +938,7 @@ export default { viewConsole: 'Ver la consola de depuración', debugConsole: 'Consola de depuración', description: 'Utilice las herramientas que aparecen a continuación para solucionar los problemas de Expensify. Si tiene algún problema, por favor', - submitBug: 'envíe un error', + submitBug: 'envíe un informe de error', confirmResetDescription: 'Todos los borradores no enviados se perderán, pero el resto de tus datos estarán a salvo.', resetAndRefresh: 'Restablecer y actualizar', clientSideLogging: 'Registro a nivel cliente', @@ -947,7 +947,7 @@ export default { profileTrace: 'Traza de ejecución', releaseOptions: 'Opciones de publicación', testingPreferences: 'Preferencias para Tests', - useStagingServer: 'Usar Servidor “Staging”', + useStagingServer: 'Usar servidor “staging”', forceOffline: 'Forzar desconexión', simulatFailingNetworkRequests: 'Simular fallos en solicitudes de red', authenticationStatus: 'Estado de autenticación', @@ -1176,7 +1176,7 @@ export default { delaySubmissionDescription: 'Los gastos se comparten de inmediato para una mejor visibilidad del gasto. Establece una cadencia más lenta si es necesario.', submissionFrequency: 'Frecuencia de envíos', submissionFrequencyDateOfMonth: 'Fecha del mes', - addApprovalsTitle: 'Requerir aprobaciones', + addApprovalsTitle: 'Aprobaciones', approver: 'Aprobador', connectBankAccount: 'Conectar cuenta bancaria', addApprovalsDescription: 'Requiere una aprobación adicional antes de autorizar un pago.', @@ -1561,7 +1561,7 @@ export default { bankAccount: { bankInfo: 'Información bancaria', confirmBankInfo: 'Confirmar información bancaria', - manuallyAdd: 'Añadir manualmente tu cuenta bancaria', + manuallyAdd: '¿Cuáles son los detalles de tu cuenta bancaria comercial?', letsDoubleCheck: 'Verifiquemos que todo esté correcto.', accountEnding: 'Cuenta terminada en', thisBankAccount: 'Esta cuenta bancaria se utilizará para pagos comerciales en tu espacio de trabajo', @@ -1570,13 +1570,13 @@ export default { chooseAnAccountBelow: 'Elige una cuenta a continuación', addBankAccount: 'Añadir cuenta bancaria', chooseAnAccount: 'Elige una cuenta', - connectOnlineWithPlaid: 'Conéctate a Plaid online', + connectOnlineWithPlaid: 'Conectar con Plaid', connectManually: 'Conectar manualmente', desktopConnection: 'Para conectarse con Chase, Wells Fargo, Capital One o Bank of America, haz clic aquí para completar este proceso en un navegador.', yourDataIsSecure: 'Tus datos están seguros', - toGetStarted: 'Añade una cuenta bancaria y reembolsa gastos, emite tarjetas corporativas, y cobra y paga facturas todo desde un mismo lugar.', + toGetStarted: 'Conecta una cuenta bancaria para reembolsar gastos, emitir tarjetas corporativas, y cobrar y pagar facturas todo desde un mismo lugar.', plaidBodyCopy: 'Ofrezca a sus empleados una forma más sencilla de pagar - y recuperar - los gastos de la empresa.', - checkHelpLine: 'Tu número de ruta y número de cuenta se pueden encontrar en un cheque de la cuenta bancaria.', + checkHelpLine: 'Tus números de ruta y de cuenta se pueden encontrar en un cheque de la cuenta bancaria.', validateAccountError: { phrase1: '¡Un momento! Primero necesitas validar tu cuenta. Para hacerlo, ', phrase2: 'vuelve a iniciar sesión con un código mágico', From 65e11c769235921ae725b084dc7182f81617106a Mon Sep 17 00:00:00 2001 From: James Dean Date: Wed, 26 Jun 2024 09:31:22 -0700 Subject: [PATCH 07/12] Update en.ts --- src/languages/en.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 7edcf9672326..5c98c1cf8df8 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1829,8 +1829,8 @@ export default { doYouOwn25percent: 'Do you own 25% or more of', doAnyIndividualOwn25percent: 'Do any individuals own 25% or more of', areThereMoreIndividualsWhoOwn25percent: 'Are there more individuals who own 25% or more of', - regulationRequiresUsToVerifyTheIdentity: 'Regulation requires us to verify the identity of any individual that owns more than 25% of the company.', - companyOwner: 'Company owner', + regulationRequiresUsToVerifyTheIdentity: 'Regulation requires us to verify the identity of any individual that owns more than 25% of the business.', + companyOwner: 'Business owner', enterLegalFirstAndLastName: 'Enter the legal first and last name of the owner.', legalFirstName: 'Legal first name', legalLastName: 'Legal last name', @@ -1881,7 +1881,7 @@ export default { confirmAgreements: 'Please confirm the agreements below.', certifyTrueAndAccurate: 'I certify that the information provided is true and accurate', certifyTrueAndAccurateError: 'Must certify information is true and accurate', - isAuthorizedToUseBankAccount: 'I am authorized to use my company bank account for business spend', + isAuthorizedToUseBankAccount: 'I am authorized to use this business bank account for business spend', isAuthorizedToUseBankAccountError: 'You must be a controlling officer with authorization to operate the business bank account.', termsAndConditions: 'terms and conditions', }, From 55946efe204d85018e3a75e21def81c02384405d Mon Sep 17 00:00:00 2001 From: James Dean Date: Wed, 26 Jun 2024 10:19:19 -0700 Subject: [PATCH 08/12] Update en.ts --- src/languages/en.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 5c98c1cf8df8..8925cf8dd1eb 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1581,10 +1581,10 @@ export default { addressCity: 'Please enter a valid city', addressStreet: 'Please enter a valid street address', addressState: 'Please select a valid state', - incorporationDateFuture: 'Incorporation date can't be in the future', + incorporationDateFuture: "Incorporation date can't be in the future", incorporationState: 'Please select a valid state', industryCode: 'Please enter a valid industry classification code with six digits', - restrictedBusiness: 'Please confirm the business isn't on the list of restricted businesses', + restrictedBusiness: "Please confirm the business isn't on the list of restricted businesses", routingNumber: 'Please enter a valid routing number', accountNumber: 'Please enter a valid account number', routingAndAccountNumberCannotBeSame: 'Routing and account numbers can't match', From ea302c75a259b2e7c7304af01da8e1c654b5e4d8 Mon Sep 17 00:00:00 2001 From: James Dean Date: Wed, 26 Jun 2024 10:28:52 -0700 Subject: [PATCH 09/12] Update en.ts --- src/languages/en.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 8925cf8dd1eb..ae9a8b31b762 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1587,7 +1587,7 @@ export default { restrictedBusiness: "Please confirm the business isn't on the list of restricted businesses", routingNumber: 'Please enter a valid routing number', accountNumber: 'Please enter a valid account number', - routingAndAccountNumberCannotBeSame: 'Routing and account numbers can't match', + routingAndAccountNumberCannotBeSame: "Routing and account numbers can't match", companyType: 'Please select a valid company type', tooManyAttempts: 'Due to a high number of login attempts, this option has been disabled for 24 hours. Please try again later or enter details manually instead.', address: 'Please enter a valid address', @@ -2689,7 +2689,7 @@ export default { yesStartOver: 'Yes, start over', disconnectYour: 'Disconnect your ', bankAccountAnyTransactions: ' bank account. Any outstanding transactions for this account will still complete.', - clearProgress: 'Starting over will clear the progress you've made so far.', + clearProgress: "Starting over will clear the progress you've made so far.", areYouSure: 'Are you sure?', workspaceCurrency: 'Workspace currency', updateCurrencyPrompt: 'It looks like your workspace is currently set to a different currency than USD. Please click the button below to update your currency to USD now.', From 95b5e66d1291f3b3f3e345f910f0a639bb6153e7 Mon Sep 17 00:00:00 2001 From: James Dean Date: Wed, 26 Jun 2024 15:03:38 -0700 Subject: [PATCH 10/12] Update en.ts --- src/languages/en.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index ae9a8b31b762..fae6f3f5e171 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2224,7 +2224,7 @@ export default { moreFeatures: { spendSection: { title: 'Spend', - subtitle: 'Enable optional functionality that helps you scale your team.', + subtitle: 'Enable functionality that helps you scale your team.', }, organizeSection: { title: 'Organize', From b53a8ab064fd410aeaa5307bc9b14e9fc6e610ad Mon Sep 17 00:00:00 2001 From: James Dean Date: Thu, 27 Jun 2024 13:02:05 -0700 Subject: [PATCH 11/12] Update es.ts --- src/languages/es.ts | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 47cefd46bedd..2a5352276cf7 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1587,36 +1587,36 @@ export default { 'Para añadir una cuenta bancaria verificada, asegúrate de que tu nombre de usuario principal sea un correo electrónico válido y vuelve a intentarlo. Puedes añadir tu número de teléfono como nombre de usuario secundario.', hasBeenThrottledError: 'Se produjo un error al intentar añadir tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', hasCurrencyError: - '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente a USD. Para continuar, por favor configúrala en USD e inténtalo nuevamente.', + '¡Ups! Parece que la moneda de tu espacio de trabajo no está configurada en USD. Por favor, configúrala en USD e inténtalo nuevamente.', error: { - youNeedToSelectAnOption: 'Debes seleccionar una opción para continuar.', - noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible.', - noBankAccountSelected: 'Por favor, elige una cuenta bancaria.', - taxID: 'Por favor, introduce un número de identificación fiscal válido.', + youNeedToSelectAnOption: 'Debes seleccionar una opción para continuar', + noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', + noBankAccountSelected: 'Por favor, elige una cuenta bancaria', + taxID: 'Por favor, introduce un número de identificación fiscal válido', website: 'Por favor, introduce un sitio web válido. El sitio web debe estar en minúsculas.', zipCode: `Formato de código postal incorrecto. Formato aceptable: ${CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`, - phoneNumber: 'Por favor, introduce un teléfono válido.', - companyName: 'Por favor, introduce un nombre comercial legal válido.', - addressCity: 'Por favor, introduce una ciudad válida.', - addressStreet: 'Por favor, introduce una calle de dirección válida que no sea un apartado postal.', - addressState: 'Por favor, selecciona un estado.', - incorporationDateFuture: 'La fecha de incorporación no puede ser futura.', - incorporationState: 'Por favor, selecciona una estado válido.', - industryCode: 'Por favor, introduce un código de clasificación de industria válido.', - restrictedBusiness: 'Por favor, confirma que la empresa no está en la lista de negocios restringidos.', - routingNumber: 'Por favor, introduce un número de ruta válido.', - accountNumber: 'Por favor, introduce un número de cuenta válido.', - routingAndAccountNumberCannotBeSame: 'El número de ruta y el número de cuenta no pueden ser iguales.', - companyType: 'Por favor, selecciona un tipo de compañía válido.', + phoneNumber: 'Por favor, introduce un teléfono válido', + companyName: 'Por favor, introduce un nombre comercial legal válido', + addressCity: 'Por favor, introduce una ciudad válida', + addressStreet: 'Por favor, introduce una calle de dirección válida que no sea un apartado postal', + addressState: 'Por favor, selecciona un estado', + incorporationDateFuture: 'La fecha de incorporación no puede ser futura', + incorporationState: 'Por favor, selecciona una estado válido', + industryCode: 'Por favor, introduce un código de clasificación de industria válido', + restrictedBusiness: 'Por favor, confirma que la empresa no está en la lista de negocios restringidos', + routingNumber: 'Por favor, introduce un número de ruta válido', + accountNumber: 'Por favor, introduce un número de cuenta válido', + routingAndAccountNumberCannotBeSame: 'Los números de ruta y de cuenta no pueden ser iguales', + companyType: 'Por favor, selecciona un tipo de compañía válido', tooManyAttempts: 'Debido a la gran cantidad de intentos de inicio de sesión, esta opción ha sido desactivada temporalmente durante 24 horas. Por favor, inténtalo de nuevo más tarde.', - address: 'Por favor, introduce una dirección válida.', - dob: 'Por favor, selecciona una fecha de nacimiento válida.', - age: 'Debe ser mayor de 18 años.', - ssnLast4: 'Por favor, introduce los últimos 4 dígitos del número de seguridad social.', - firstName: 'Por favor, introduce el nombre.', - lastName: 'Por favor, introduce los apellidos.', - noDefaultDepositAccountOrDebitCardAvailable: 'Por favor, añade una cuenta bancaria para depósitos o una tarjeta de débito.', + address: 'Por favor, introduce una dirección válida', + dob: 'Por favor, selecciona una fecha de nacimiento válida', + age: 'Debe ser mayor de 18 años', + ssnLast4: 'Por favor, introduce los últimos 4 dígitos del número de seguridad social', + firstName: 'Por favor, introduce el nombre', + lastName: 'Por favor, introduce los apellidos', + noDefaultDepositAccountOrDebitCardAvailable: 'Por favor, añade una cuenta bancaria para depósitos o una tarjeta de débito', validationAmounts: 'Los importes de validación que introduciste son incorrectos. Por favor, comprueba tu cuenta bancaria e inténtalo de nuevo.', }, }, @@ -1647,7 +1647,7 @@ export default { userIsAlreadyMember: ({login, name}: UserIsAlreadyMemberParams) => `${login} ya es miembro de ${name}`, }, onfidoStep: { - acceptTerms: 'Al continuar con la solicitud para activar tu billetera Expensify, confirma que ha leído, comprende y acepta ', + acceptTerms: 'Al continuar con la solicitud para activar tu Billetera Expensify, confirma que ha leído, comprende y acepta ', facialScan: 'Política y lanzamiento de la exploración facial de Onfido', tryAgain: 'Intentar otra vez', verifyIdentity: 'Verificar identidad', @@ -1669,7 +1669,7 @@ export default { }, additionalDetailsStep: { headerTitle: 'Detalles adicionales', - helpText: 'Necesitamos confirmar la siguiente información antes de que puedas enviar y recibir dinero desde tu Billetera.', + helpText: 'Necesitamos confirmar la siguiente información antes de que puedas enviar y recibir dinero desde tu billetera.', helpTextIdologyQuestions: 'Tenemos que preguntarte unas preguntas más para terminar de verificar tu identidad', helpLink: 'Obtén más información sobre por qué necesitamos esto.', legalFirstNameLabel: 'Primer nombre legal', From 02bdac2a60ec7282f49dba93a6bb3bfa5a15cd70 Mon Sep 17 00:00:00 2001 From: Carlos Miceli Date: Fri, 28 Jun 2024 15:12:33 -0300 Subject: [PATCH 12/12] fix linting issues --- .github/libs/sanitizeStringForJSONParse.ts | 2 +- src/hooks/useStepFormSubmit.ts | 11 ++- src/languages/en.ts | 3 +- src/languages/es.ts | 3 +- src/languages/types.ts | 20 ++--- src/libs/Localize/index.ts | 11 ++- src/libs/actions/Policy/Policy.ts | 28 ++++--- src/libs/migrations/RenameCardIsVirtual.ts | 27 ++++--- src/libs/migrations/RenameReceiptFilename.ts | 23 +++--- .../EnablePayments/utils/getSubstepValues.ts | 11 ++- .../BeneficialOwnersStep.tsx | 11 ++- .../report/ReportActionsListItemRenderer.tsx | 2 +- src/styles/index.ts | 76 +++++++++---------- src/types/onyx/SearchResults.ts | 8 +- .../ReportActionCompose.perf-test.tsx | 2 +- tests/unit/DateUtilsTest.ts | 4 +- tests/utils/ReportTestUtils.ts | 2 +- tests/utils/TestHelper.ts | 11 ++- 18 files changed, 141 insertions(+), 114 deletions(-) diff --git a/.github/libs/sanitizeStringForJSONParse.ts b/.github/libs/sanitizeStringForJSONParse.ts index ddb7549b0186..d646a566c517 100644 --- a/.github/libs/sanitizeStringForJSONParse.ts +++ b/.github/libs/sanitizeStringForJSONParse.ts @@ -8,7 +8,7 @@ const replacer = (str: string): string => '\r': '\\r', '\f': '\\f', '"': '\\"', - }[str] ?? ''); + })[str] ?? ''; /** * Replace any characters in the string that will break JSON.parse for our Git Log output diff --git a/src/hooks/useStepFormSubmit.ts b/src/hooks/useStepFormSubmit.ts index 883fe980a338..cd422071c725 100644 --- a/src/hooks/useStepFormSubmit.ts +++ b/src/hooks/useStepFormSubmit.ts @@ -24,10 +24,13 @@ export default function useStepFormSubmit return useCallback( (values: FormOnyxValues) => { if (shouldSaveDraft) { - const stepValues = fieldIds.reduce((acc, key) => { - acc[key] = values[key]; - return acc; - }, {} as Record, OnyxValues[T][Exclude]>); + const stepValues = fieldIds.reduce( + (acc, key) => { + acc[key] = values[key]; + return acc; + }, + {} as Record, OnyxValues[T][Exclude]>, + ); FormActions.setDraftValues(formId, stepValues); } diff --git a/src/languages/en.ts b/src/languages/en.ts index 1a4886fb0586..4794b3f5ce63 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -3115,7 +3115,8 @@ export default { }, teachersUnitePage: { teachersUnite: 'Teachers Unite', - joinExpensifyOrg: 'Join Expensify.org in eliminating injustice around the world. The current "Teachers Unite" campaign supports educators everywhere by splitting the costs of essential school supplies.', + joinExpensifyOrg: + 'Join Expensify.org in eliminating injustice around the world. The current "Teachers Unite" campaign supports educators everywhere by splitting the costs of essential school supplies.', iKnowATeacher: 'I know a teacher', iAmATeacher: 'I am a teacher', getInTouch: 'Excellent! Please share their information so we can get in touch with them.', diff --git a/src/languages/es.ts b/src/languages/es.ts index 209453ef09bb..bf9b26ed2bee 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1605,8 +1605,7 @@ export default { hasPhoneLoginError: 'Para añadir una cuenta bancaria verificada, asegúrate de que tu nombre de usuario principal sea un correo electrónico válido y vuelve a intentarlo. Puedes añadir tu número de teléfono como nombre de usuario secundario.', hasBeenThrottledError: 'Se produjo un error al intentar añadir tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', - hasCurrencyError: - '¡Ups! Parece que la moneda de tu espacio de trabajo no está configurada en USD. Por favor, configúrala en USD e inténtalo nuevamente.', + hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo no está configurada en USD. Por favor, configúrala en USD e inténtalo nuevamente.', error: { youNeedToSelectAnOption: 'Debes seleccionar una opción para continuar', noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', diff --git a/src/languages/types.ts b/src/languages/types.ts index c38fb4aadae5..c5db697b65a1 100644 --- a/src/languages/types.ts +++ b/src/languages/types.ts @@ -261,22 +261,22 @@ type FlattenObject = { [TKey in keyof TObject]: TObject[TKey] extends (...args: any[]) => any ? `${TPrefix}${TKey & string}` : // eslint-disable-next-line @typescript-eslint/no-explicit-any - TObject[TKey] extends any[] - ? `${TPrefix}${TKey & string}` - : // eslint-disable-next-line @typescript-eslint/ban-types - TObject[TKey] extends object - ? FlattenObject - : `${TPrefix}${TKey & string}`; + TObject[TKey] extends any[] + ? `${TPrefix}${TKey & string}` + : // eslint-disable-next-line @typescript-eslint/ban-types + TObject[TKey] extends object + ? FlattenObject + : `${TPrefix}${TKey & string}`; }[keyof TObject]; // Retrieves a type for a given key path (calculated from the type above) type TranslateType = TPath extends keyof TObject ? TObject[TPath] : TPath extends `${infer TKey}.${infer TRest}` - ? TKey extends keyof TObject - ? TranslateType - : never - : never; + ? TKey extends keyof TObject + ? TranslateType + : never + : never; type EnglishTranslation = typeof en; diff --git a/src/libs/Localize/index.ts b/src/libs/Localize/index.ts index c9eef3170245..dd34175e6ad1 100644 --- a/src/libs/Localize/index.ts +++ b/src/libs/Localize/index.ts @@ -64,10 +64,13 @@ type Phrase = TranslationFlatObject[TKey] extends * in our cache. */ const translationCache = new Map, Map>( - Object.values(CONST.LOCALES).reduce((cache, locale) => { - cache.push([locale, new Map()]); - return cache; - }, [] as Array<[ValueOf, Map]>), + Object.values(CONST.LOCALES).reduce( + (cache, locale) => { + cache.push([locale, new Map()]); + return cache; + }, + [] as Array<[ValueOf, Map]>, + ), ); /** diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index 0ff65daa7e5b..64b1114a056a 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -2515,13 +2515,16 @@ function enablePolicyTaxes(policyID: string, enabled: boolean) { taxRates: { ...defaultTaxRates, taxes: { - ...Object.keys(defaultTaxRates.taxes).reduce((acc, taxKey) => { - acc[taxKey] = { - ...defaultTaxRates.taxes[taxKey], - pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, - }; - return acc; - }, {} as Record), + ...Object.keys(defaultTaxRates.taxes).reduce( + (acc, taxKey) => { + acc[taxKey] = { + ...defaultTaxRates.taxes[taxKey], + pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, + }; + return acc; + }, + {} as Record, + ), }, }, }, @@ -2534,10 +2537,13 @@ function enablePolicyTaxes(policyID: string, enabled: boolean) { value: { taxRates: { taxes: { - ...Object.keys(defaultTaxRates.taxes).reduce((acc, taxKey) => { - acc[taxKey] = {pendingAction: null}; - return acc; - }, {} as Record), + ...Object.keys(defaultTaxRates.taxes).reduce( + (acc, taxKey) => { + acc[taxKey] = {pendingAction: null}; + return acc; + }, + {} as Record, + ), }, }, }, diff --git a/src/libs/migrations/RenameCardIsVirtual.ts b/src/libs/migrations/RenameCardIsVirtual.ts index 751c11d70eac..acd99e5bdf1c 100644 --- a/src/libs/migrations/RenameCardIsVirtual.ts +++ b/src/libs/migrations/RenameCardIsVirtual.ts @@ -26,20 +26,23 @@ export default function () { } Log.info('[Migrate Onyx] Running RenameCardIsVirtual migration'); - const dataToSave = cardsWithIsVirtualProp.reduce((acc, card) => { - if (!card) { - return acc; - } + const dataToSave = cardsWithIsVirtualProp.reduce( + (acc, card) => { + if (!card) { + return acc; + } - acc[card.cardID] = { - nameValuePairs: { - isVirtual: card?.nameValuePairs?.isVirtual, - }, - isVirtual: undefined, - }; + acc[card.cardID] = { + nameValuePairs: { + isVirtual: card?.nameValuePairs?.isVirtual, + }, + isVirtual: undefined, + }; - return acc; - }, {} as Record>); + return acc; + }, + {} as Record>, + ); // eslint-disable-next-line rulesdir/prefer-actions-set-data Onyx.merge(ONYXKEYS.CARD_LIST, dataToSave).then(() => { diff --git a/src/libs/migrations/RenameReceiptFilename.ts b/src/libs/migrations/RenameReceiptFilename.ts index f01676595dd7..2e27802e72d4 100644 --- a/src/libs/migrations/RenameReceiptFilename.ts +++ b/src/libs/migrations/RenameReceiptFilename.ts @@ -30,17 +30,20 @@ export default function () { return resolve(); } Log.info('[Migrate Onyx] Running RenameReceiptFilename migration'); - const dataToSave = transactionsWithReceipt?.reduce((acc, transaction) => { - if (!transaction) { + const dataToSave = transactionsWithReceipt?.reduce( + (acc, transaction) => { + if (!transaction) { + return acc; + } + Log.info(`[Migrate Onyx] Renaming receiptFilename ${transaction.receiptFilename} to filename`); + acc[`${ONYXKEYS.COLLECTION.TRANSACTION}${transaction.transactionID}`] = { + filename: transaction.receiptFilename, + receiptFilename: null, + }; return acc; - } - Log.info(`[Migrate Onyx] Renaming receiptFilename ${transaction.receiptFilename} to filename`); - acc[`${ONYXKEYS.COLLECTION.TRANSACTION}${transaction.transactionID}`] = { - filename: transaction.receiptFilename, - receiptFilename: null, - }; - return acc; - }, {} as Record>); + }, + {} as Record>, + ); // eslint-disable-next-line rulesdir/prefer-actions-set-data Onyx.mergeCollection(ONYXKEYS.COLLECTION.TRANSACTION, dataToSave).then(() => { diff --git a/src/pages/EnablePayments/utils/getSubstepValues.ts b/src/pages/EnablePayments/utils/getSubstepValues.ts index 2eb80ed1b2ee..4e444b1b53b1 100644 --- a/src/pages/EnablePayments/utils/getSubstepValues.ts +++ b/src/pages/EnablePayments/utils/getSubstepValues.ts @@ -8,10 +8,13 @@ function getSubstepValues( walletAdditionalDetailsDraft: OnyxEntry, walletAdditionalDetails: OnyxEntry, ): {[K in T]: WalletAdditionalDetailsForm[K] | string} { - return Object.entries(inputKeys).reduce((acc, [, value]) => { - acc[value] = walletAdditionalDetailsDraft?.[value] ?? walletAdditionalDetails?.[value as keyof PersonalInfoStepProps] ?? ''; - return acc; - }, {} as {[K in T]: WalletAdditionalDetailsForm[K] | string}); + return Object.entries(inputKeys).reduce( + (acc, [, value]) => { + acc[value] = walletAdditionalDetailsDraft?.[value] ?? walletAdditionalDetails?.[value as keyof PersonalInfoStepProps] ?? ''; + return acc; + }, + {} as {[K in T]: WalletAdditionalDetailsForm[K] | string}, + ); } export default getSubstepValues; diff --git a/src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx b/src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx index ae0fded74347..c745431290fb 100644 --- a/src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx +++ b/src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx @@ -68,10 +68,13 @@ function BeneficialOwnersStep({reimbursementAccount, reimbursementAccountDraft, const submit = () => { const beneficialOwnerFields = ['firstName', 'lastName', 'dob', 'ssnLast4', 'street', 'city', 'state', 'zipCode']; const beneficialOwners = beneficialOwnerKeys.map((ownerKey) => - beneficialOwnerFields.reduce((acc, fieldName) => { - acc[fieldName] = reimbursementAccountDraft ? reimbursementAccountDraft[`beneficialOwner_${ownerKey}_${fieldName}`] : undefined; - return acc; - }, {} as Record), + beneficialOwnerFields.reduce( + (acc, fieldName) => { + acc[fieldName] = reimbursementAccountDraft ? reimbursementAccountDraft[`beneficialOwner_${ownerKey}_${fieldName}`] : undefined; + return acc; + }, + {} as Record, + ), ); BankAccounts.updateBeneficialOwnersForBankAccount( diff --git a/src/pages/home/report/ReportActionsListItemRenderer.tsx b/src/pages/home/report/ReportActionsListItemRenderer.tsx index 1ef689ab1da4..912ad02a19aa 100644 --- a/src/pages/home/report/ReportActionsListItemRenderer.tsx +++ b/src/pages/home/report/ReportActionsListItemRenderer.tsx @@ -111,7 +111,7 @@ function ReportActionsListItemRenderer({ childManagerAccountID: reportAction.childManagerAccountID, childMoneyRequestCount: reportAction.childMoneyRequestCount, childOwnerAccountID: reportAction.childOwnerAccountID, - } as ReportAction), + }) as ReportAction, [ reportAction.reportActionID, reportAction.message, diff --git a/src/styles/index.ts b/src/styles/index.ts index 2009891b00a6..35f543296ff9 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -108,14 +108,14 @@ const picker = (theme: ThemeColors) => height: variables.inputHeight, borderWidth: 0, textAlign: 'left', - } satisfies TextStyle); + }) satisfies TextStyle; const link = (theme: ThemeColors) => ({ color: theme.link, textDecorationColor: theme.link, fontFamily: FontUtils.fontFamily.platform.EXP_NEUE, - } satisfies ViewStyle & MixedStyleDeclaration); + }) satisfies ViewStyle & MixedStyleDeclaration; const baseCodeTagStyles = (theme: ThemeColors) => ({ @@ -123,7 +123,7 @@ const baseCodeTagStyles = (theme: ThemeColors) => borderRadius: 5, borderColor: theme.border, backgroundColor: theme.textBackground, - } satisfies ViewStyle & MixedStyleDeclaration); + }) satisfies ViewStyle & MixedStyleDeclaration; const headlineFont = { fontFamily: FontUtils.fontFamily.platform.EXP_NEW_KANSAS_MEDIUM, @@ -135,7 +135,7 @@ const modalNavigatorContainer = (isSmallScreenWidth: boolean) => position: 'absolute', width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, height: '100%', - } satisfies ViewStyle); + }) satisfies ViewStyle; const webViewStyles = (theme: ThemeColors) => ({ @@ -237,7 +237,7 @@ const webViewStyles = (theme: ThemeColors) => lineHeight: variables.fontSizeNormalHeight, ...writingDirection.ltr, }, - } satisfies WebViewStyle); + }) satisfies WebViewStyle; const styles = (theme: ThemeColors) => ({ @@ -859,7 +859,7 @@ const styles = (theme: ThemeColors) => pointerEvents: 'none', opacity: 0, }, - } satisfies CustomPickerStyle), + }) satisfies CustomPickerStyle, badge: { backgroundColor: theme.border, @@ -995,7 +995,7 @@ const styles = (theme: ThemeColors) => paddingVertical: 40, gap: 4, flex: 1, - } satisfies ViewStyle), + }) satisfies ViewStyle, receiptViewTextContainer: { paddingHorizontal: 40, @@ -1136,14 +1136,14 @@ const styles = (theme: ThemeColors) => ({ height: lodashClamp(textInputHeight, minHeight, maxHeight), minHeight, - } satisfies ViewStyle), + }) satisfies ViewStyle, autoGrowHeightHiddenInput: (maxWidth: number, maxHeight?: number) => ({ maxWidth, maxHeight: maxHeight && maxHeight + 1, overflow: 'hidden', - } satisfies TextStyle), + }) satisfies TextStyle, textInputContainer: { flex: 1, @@ -1185,7 +1185,7 @@ const styles = (theme: ThemeColors) => textInputLabelTransformation: (translateY: AnimatableNumericValue, translateX: AnimatableNumericValue, scale: AnimatableNumericValue) => ({ transform: [{translateY}, {translateX}, {scale}], - } satisfies TextStyle), + }) satisfies TextStyle, baseTextInput: { fontFamily: FontUtils.fontFamily.platform.EXP_NEUE, @@ -1324,7 +1324,7 @@ const styles = (theme: ThemeColors) => inputAndroid: { ...picker(theme), }, - } satisfies CustomPickerStyle), + }) satisfies CustomPickerStyle, disabledText: { color: theme.icon, @@ -1563,7 +1563,7 @@ const styles = (theme: ThemeColors) => height: 12, width: 12, zIndex: 10, - } satisfies ViewStyle), + }) satisfies ViewStyle, bottomTabStatusIndicator: (backgroundColor = theme.danger) => ({ borderColor: theme.sidebar, @@ -1643,13 +1643,13 @@ const styles = (theme: ThemeColors) => ({ ...modalNavigatorContainer(isSmallScreenWidth), left: 0, - } satisfies ViewStyle), + }) satisfies ViewStyle, RHPNavigatorContainer: (isSmallScreenWidth: boolean) => ({ ...modalNavigatorContainer(isSmallScreenWidth), right: 0, - } satisfies ViewStyle), + }) satisfies ViewStyle, onboardingNavigatorOuterView: { flex: 1, @@ -1664,7 +1664,7 @@ const styles = (theme: ThemeColors) => maxHeight: '100%', borderRadius: shouldUseNarrowLayout ? 16 : 0, overflow: 'hidden', - } satisfies ViewStyle), + }) satisfies ViewStyle, welcomeVideoNarrowLayout: { width: variables.onboardingModalWidth, @@ -1685,20 +1685,20 @@ const styles = (theme: ThemeColors) => // Menu should be displayed 12px above the floating action button. // To achieve that sidebar must be moved by: distance from the bottom of the sidebar to the fab (variables.fabBottom) + fab height (variables.componentSizeLarge) + distance above the fab (12px) vertical: windowHeight - (variables.fabBottom + variables.componentSizeLarge + 12), - } satisfies AnchorPosition), + }) satisfies AnchorPosition, createAccountMenuPositionProfile: () => ({ horizontal: 18, ...getPopOverVerticalOffset(202 + 40), - } satisfies AnchorPosition), + }) satisfies AnchorPosition, createMenuPositionReportActionCompose: (shouldUseNarrowLayout: boolean, windowHeight: number, windowWidth: number) => ({ // On a narrow layout the menu is displayed in ReportScreen in RHP, so it must be moved from the right side of the screen horizontal: (shouldUseNarrowLayout ? windowWidth - variables.sideBarWidth : variables.sideBarWidth) + 18, vertical: windowHeight - CONST.MENU_POSITION_REPORT_ACTION_COMPOSE_BOTTOM, - } satisfies AnchorPosition), + }) satisfies AnchorPosition, createMenuPositionRightSidepane: { right: 18, @@ -1908,7 +1908,7 @@ const styles = (theme: ThemeColors) => outputRange: [0, variables.overlayOpacity], extrapolate: 'clamp', }), - } satisfies ViewStyle), + }) satisfies ViewStyle, nativeOverlayStyles: (current: OverlayStylesParams) => ({ @@ -1921,7 +1921,7 @@ const styles = (theme: ThemeColors) => outputRange: [0, variables.overlayOpacity], extrapolate: 'clamp', }), - } satisfies ViewStyle), + }) satisfies ViewStyle, appContent: { backgroundColor: theme.appBG, @@ -2508,13 +2508,13 @@ const styles = (theme: ThemeColors) => flexBasis: isSmallScreenWidth ? '100%' : 350, flexGrow: 0, alignSelf: 'flex-start', - } satisfies ViewStyle), + }) satisfies ViewStyle, centeredModalStyles: (isSmallScreenWidth: boolean, isFullScreenWhenSmall: boolean) => ({ borderWidth: isSmallScreenWidth && !isFullScreenWhenSmall ? 1 : 0, marginHorizontal: isSmallScreenWidth ? 0 : 20, - } satisfies ViewStyle), + }) satisfies ViewStyle, imageModalImageCenterContainer: { alignItems: 'center', @@ -2678,7 +2678,7 @@ const styles = (theme: ThemeColors) => backgroundColor: theme.cardBG, borderRadius: variables.componentBorderRadiusLarge, overflow: 'hidden', - } satisfies ViewStyle & TextStyle), + }) satisfies ViewStyle & TextStyle, anonymousRoomFooterWordmarkAndLogoContainer: (isSmallSizeLayout: boolean) => ({ flexDirection: 'row', @@ -2687,7 +2687,7 @@ const styles = (theme: ThemeColors) => justifyContent: 'space-between', marginTop: 16, }), - } satisfies ViewStyle), + }) satisfies ViewStyle, anonymousRoomFooterLogo: { width: 88, marginLeft: 0, @@ -2729,8 +2729,8 @@ const styles = (theme: ThemeColors) => borderRadius: 88, }, - rootNavigatorContainerStyles: (isSmallScreenWidth: boolean) => ({marginLeft: isSmallScreenWidth ? 0 : variables.sideBarWidth, flex: 1} satisfies ViewStyle), - RHPNavigatorContainerNavigatorContainerStyles: (isSmallScreenWidth: boolean) => ({marginLeft: isSmallScreenWidth ? 0 : variables.sideBarWidth, flex: 1} satisfies ViewStyle), + rootNavigatorContainerStyles: (isSmallScreenWidth: boolean) => ({marginLeft: isSmallScreenWidth ? 0 : variables.sideBarWidth, flex: 1}) satisfies ViewStyle, + RHPNavigatorContainerNavigatorContainerStyles: (isSmallScreenWidth: boolean) => ({marginLeft: isSmallScreenWidth ? 0 : variables.sideBarWidth, flex: 1}) satisfies ViewStyle, avatarInnerTextChat: { color: theme.text, @@ -3012,7 +3012,7 @@ const styles = (theme: ThemeColors) => switchThumbTransformation: (translateX: AnimatableNumericValue) => ({ transform: [{translateX}], - } satisfies ViewStyle), + }) satisfies ViewStyle, radioButtonContainer: { backgroundColor: theme.componentBG, @@ -3239,7 +3239,7 @@ const styles = (theme: ThemeColors) => growlNotificationTranslateY: (translateY: AnimatableNumericValue) => ({ transform: [{translateY}], - } satisfies ViewStyle), + }) satisfies ViewStyle, makeSlideInTranslation: (translationType: Translation, fromValue: number) => ({ @@ -3249,7 +3249,7 @@ const styles = (theme: ThemeColors) => to: { [translationType]: 0, }, - } satisfies CustomAnimation), + }) satisfies CustomAnimation, growlNotificationBox: { backgroundColor: theme.inverse, @@ -3558,25 +3558,25 @@ const styles = (theme: ThemeColors) => ({ ...getPopOverVerticalOffset(60), horizontal: windowWidth - 60, - } satisfies AnchorPosition), + }) satisfies AnchorPosition, threeDotsPopoverOffsetNoCloseButton: (windowWidth: number) => ({ ...getPopOverVerticalOffset(60), horizontal: windowWidth - 10, - } satisfies AnchorPosition), + }) satisfies AnchorPosition, threeDotsPopoverOffsetAttachmentModal: (windowWidth: number) => ({ ...getPopOverVerticalOffset(80), horizontal: windowWidth - 140, - } satisfies AnchorPosition), + }) satisfies AnchorPosition, popoverMenuOffset: (windowWidth: number) => ({ ...getPopOverVerticalOffset(180), horizontal: windowWidth - 355, - } satisfies AnchorPosition), + }) satisfies AnchorPosition, iPhoneXSafeArea: { backgroundColor: theme.inverse, @@ -3680,7 +3680,7 @@ const styles = (theme: ThemeColors) => ({ position: 'absolute', top: receiptImageTopPosition, - } satisfies ViewStyle), + }) satisfies ViewStyle, cardSectionContainer: { backgroundColor: theme.cardBG, @@ -3807,7 +3807,7 @@ const styles = (theme: ThemeColors) => position: 'absolute', width: isSmallScreenWidth ? windowWidth - 32 : CONST.EMOJI_PICKER_SIZE.WIDTH - 32, ...spacing.mh4, - } satisfies ViewStyle), + }) satisfies ViewStyle, reactionCounterText: { fontSize: 13, @@ -4209,7 +4209,7 @@ const styles = (theme: ThemeColors) => color: isSelected ? theme.text : theme.textSupporting, lineHeight: variables.lineHeightNormal, fontSize: variables.fontSizeNormal, - } satisfies TextStyle), + }) satisfies TextStyle, tabBackground: (hovered: boolean, isFocused: boolean, background: string | Animated.AnimatedInterpolation) => ({ backgroundColor: hovered && !isFocused ? theme.highlightBG : background, @@ -4233,7 +4233,7 @@ const styles = (theme: ThemeColors) => top: -height, left: 0, right: 0, - } satisfies ViewStyle), + }) satisfies ViewStyle, dualColorOverscrollSpacer: { position: 'absolute', @@ -5032,7 +5032,7 @@ const styles = (theme: ThemeColors) => fontSize: variables.fontSizeNormal, fontWeight: FontUtils.fontWeight.bold, }, - } satisfies Styles); + }) satisfies Styles; type ThemeStyles = ReturnType; diff --git a/src/types/onyx/SearchResults.ts b/src/types/onyx/SearchResults.ts index 3932752f4325..75323b3f30f0 100644 --- a/src/types/onyx/SearchResults.ts +++ b/src/types/onyx/SearchResults.ts @@ -12,15 +12,15 @@ type SearchDataTypes = ValueOf; type ListItemType = T extends typeof CONST.SEARCH.DATA_TYPES.TRANSACTION ? typeof TransactionListItem : T extends typeof CONST.SEARCH.DATA_TYPES.REPORT - ? typeof ReportListItem - : never; + ? typeof ReportListItem + : never; /** Model of search result section */ type SectionsType = T extends typeof CONST.SEARCH.DATA_TYPES.TRANSACTION ? TransactionListItemType[] : T extends typeof CONST.SEARCH.DATA_TYPES.REPORT - ? ReportListItemType[] - : never; + ? ReportListItemType[] + : never; /** Mapping of search results to list item */ type SearchTypeToItemMap = { diff --git a/tests/perf-test/ReportActionCompose.perf-test.tsx b/tests/perf-test/ReportActionCompose.perf-test.tsx index 9c6cfdae5a5c..1387ddf1366a 100644 --- a/tests/perf-test/ReportActionCompose.perf-test.tsx +++ b/tests/perf-test/ReportActionCompose.perf-test.tsx @@ -27,7 +27,7 @@ jest.mock( ({ ...jest.requireActual('react-native-reanimated/mock'), useAnimatedRef: jest.fn(), - } as typeof Animated), + }) as typeof Animated, ); jest.mock('@react-navigation/native', () => { diff --git a/tests/unit/DateUtilsTest.ts b/tests/unit/DateUtilsTest.ts index 9df0113168e4..2c68d5285770 100644 --- a/tests/unit/DateUtilsTest.ts +++ b/tests/unit/DateUtilsTest.ts @@ -94,7 +94,7 @@ describe('DateUtils', () => { () => ({ resolvedOptions: () => ({timeZone: 'America/Chicago'}), - } as Intl.DateTimeFormat), + }) as Intl.DateTimeFormat, ); Onyx.set(ONYXKEYS.PERSONAL_DETAILS_LIST, {'999': {accountID: 999, timezone: {selected: 'Europe/London', automatic: true}}}).then(() => { const result = DateUtils.getCurrentTimezone(); @@ -110,7 +110,7 @@ describe('DateUtils', () => { () => ({ resolvedOptions: () => ({timeZone: UTC}), - } as Intl.DateTimeFormat), + }) as Intl.DateTimeFormat, ); Onyx.set(ONYXKEYS.PERSONAL_DETAILS_LIST, {'999': {accountID: 999, timezone: {selected: 'Europe/London', automatic: true}}}).then(() => { const result = DateUtils.getCurrentTimezone(); diff --git a/tests/utils/ReportTestUtils.ts b/tests/utils/ReportTestUtils.ts index 61c778ab5576..d9262cea249f 100644 --- a/tests/utils/ReportTestUtils.ts +++ b/tests/utils/ReportTestUtils.ts @@ -45,7 +45,7 @@ const getFakeReportAction = (index: number, actionName?: ReportActionName): Repo previousReportActionID: (index === 0 ? 0 : index - 1).toString(), sequenceNumber: 0, shouldShow: true, - } as ReportAction); + }) as ReportAction; const getMockedSortedReportActions = (length = 100): ReportAction[] => Array.from({length}, (element, index): ReportAction => { diff --git a/tests/utils/TestHelper.ts b/tests/utils/TestHelper.ts index dffb2b4e312a..d807928fc7e9 100644 --- a/tests/utils/TestHelper.ts +++ b/tests/utils/TestHelper.ts @@ -216,10 +216,13 @@ function buildTestReportComment(created: string, actorAccountID: number, actionI function assertFormDataMatchesObject(formData: FormData, obj: Report) { expect( - Array.from(formData.entries()).reduce((acc, [key, val]) => { - acc[key] = val; - return acc; - }, {} as Record), + Array.from(formData.entries()).reduce( + (acc, [key, val]) => { + acc[key] = val; + return acc; + }, + {} as Record, + ), ).toEqual(expect.objectContaining(obj)); }