diff --git a/android/app/build.gradle b/android/app/build.gradle index fac54600f021..ea7e6bdfce45 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -107,8 +107,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1009000200 - versionName "9.0.2-0" + versionCode 1009000203 + versionName "9.0.2-3" // Supported language variants must be declared here to avoid from being removed during the compilation. // This also helps us to not include unnecessary language variants in the APK. resConfigs "en", "es" diff --git a/docs/articles/new-expensify/connections/Set-up-QuickBooks-Online-connection.md b/docs/articles/new-expensify/connections/Set-up-QuickBooks-Online-connection.md index 6bc3b0896912..155512866a8f 100644 --- a/docs/articles/new-expensify/connections/Set-up-QuickBooks-Online-connection.md +++ b/docs/articles/new-expensify/connections/Set-up-QuickBooks-Online-connection.md @@ -46,6 +46,12 @@ Log in to QuickBooks Online and ensure all of your employees are setup as either
  • Enter your Intuit login details to import your settings from QuickBooks Online to Expensify.
  • +![The toggle location to enable accounting integrations like QuickBooks Online]({{site.url}}/assets/images/ExpensifyHelp-QBO-1.png){:width="100%"} + +![How to enable accounting integrations like QuickBooks Online]({{site.url}}/assets/images/ExpensifyHelp-QBO-2.png){:width="100%"} + +![The QuickBooks Online Connect button]({{site.url}}/assets/images/ExpensifyHelp-QBO-3.png){:width="100%"} + # Step 3: Configure import settings The following steps help you determine how data will be imported from QuickBooks Online to Expensify. diff --git a/docs/articles/new-expensify/connections/Set-up-Xero-connection.md b/docs/articles/new-expensify/connections/Set-up-Xero-connection.md index 73bff6ad5862..47917f2dffc3 100644 --- a/docs/articles/new-expensify/connections/Set-up-Xero-connection.md +++ b/docs/articles/new-expensify/connections/Set-up-Xero-connection.md @@ -23,6 +23,12 @@ To set up your Xero connection, complete the 4 steps below.
  • Enter your Xero login details to import your settings from Xero to Expensify.
  • +![The toggle location to enable accounting integrations like QuickBooks Online]({{site.url}}/assets/images/ExpensifyHelp-Xero-1.png){:width="100%"} + +![How to enable accounting integrations like QuickBooks Online]({{site.url}}/assets/images/ExpensifyHelp-Xero-2.png){:width="100%"} + +![The QuickBooks Online Connect button]({{site.url}}/assets/images/ExpensifyHelp-Xero-3.png){:width="100%"} + # Step 2: Configure import settings The following steps help you determine how data will be imported from Xero to Expensify. diff --git a/docs/articles/new-expensify/expenses/Approve-and-pay-expenses.md b/docs/articles/new-expensify/expenses/Approve-and-pay-expenses.md index 0cf642c76e4c..c037e8fe9cd3 100644 --- a/docs/articles/new-expensify/expenses/Approve-and-pay-expenses.md +++ b/docs/articles/new-expensify/expenses/Approve-and-pay-expenses.md @@ -29,7 +29,11 @@ To approve an expense, {% include info.html %} Admins can modify an expense, if needed. {% include end-info.html %} - + +![The approve button in an expense]({{site.url}}/assets/images/ExpensifyHelp_ApproveExpense_1.png){:width="100%"} + +![The approve button when you click into the expense]({{site.url}}/assets/images/ExpensifyHelp_ApproveExpense_2.png){:width="100%"} + You’re now ready to pay the expense. # Hold an expense diff --git a/ios/NewApp_AdHoc.mobileprovision.gpg b/ios/NewApp_AdHoc.mobileprovision.gpg index 29d379151525..32ed6ba30059 100644 Binary files a/ios/NewApp_AdHoc.mobileprovision.gpg and b/ios/NewApp_AdHoc.mobileprovision.gpg differ diff --git a/ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg b/ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg index cf14d27d7d87..5712b0d86b19 100644 Binary files a/ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg and b/ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg differ diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index a2e274eafc4d..1653edce72b6 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 9.0.2.0 + 9.0.2.3 FullStory OrgId diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index e1f9960caa92..8341a5d96c13 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 9.0.2.0 + 9.0.2.3 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index 7d83d9f3d273..d9fcba7e3c9d 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 9.0.2 CFBundleVersion - 9.0.2.0 + 9.0.2.3 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index cbc1c8d98fbf..b9b3241be435 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "9.0.2-0", + "version": "9.0.2-3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "9.0.2-0", + "version": "9.0.2-3", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -155,6 +155,9 @@ "@octokit/core": "4.0.4", "@octokit/plugin-paginate-rest": "3.1.0", "@octokit/plugin-throttling": "4.1.0", + "@perf-profiler/profiler": "^0.10.9", + "@perf-profiler/reporter": "^0.8.1", + "@perf-profiler/types": "^0.8.0", "@react-native-community/eslint-config": "3.2.0", "@react-native/babel-preset": "^0.73.21", "@react-native/metro-config": "^0.73.5", @@ -7873,6 +7876,116 @@ "react-native": ">=0.70.0 <1.0.x" } }, + "node_modules/@perf-profiler/android": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@perf-profiler/android/-/android-0.12.0.tgz", + "integrity": "sha512-wLI3D63drtqw3p7aKci+LCtN/ZipLJQvcw8cfmhwxqqRxTraFa8lDz5CNvNsqtCI7Zl0N9VRtnDMOj4e1W1yMQ==", + "dev": true, + "dependencies": { + "@perf-profiler/logger": "^0.3.3", + "@perf-profiler/profiler": "^0.10.9", + "@perf-profiler/types": "^0.8.0", + "commander": "^12.0.0", + "lodash": "^4.17.21" + }, + "bin": { + "perf-profiler-commands": "dist/src/commands.js" + } + }, + "node_modules/@perf-profiler/android/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@perf-profiler/ios": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@perf-profiler/ios/-/ios-0.3.1.tgz", + "integrity": "sha512-zRAgxLuCHzo47SYynljf+Aplh2K4DMwJ4dqIU30P8uPHiV5yHjE83eH+sTD6I7jUnUvZ8qAO1dhvp6ATJEpP/Q==", + "dev": true, + "dependencies": { + "@perf-profiler/ios-instruments": "^0.3.1", + "@perf-profiler/logger": "^0.3.3", + "@perf-profiler/types": "^0.8.0" + } + }, + "node_modules/@perf-profiler/ios-instruments": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@perf-profiler/ios-instruments/-/ios-instruments-0.3.1.tgz", + "integrity": "sha512-6ZiN9QTmIT8N37SslzjYNk+4+FX0X4IVuM/KiJF/DVgs056CT3MRDF8FFKF17BHsDJBi2a25QkegU8+AQdh+Qg==", + "dev": true, + "dependencies": { + "@perf-profiler/logger": "^0.3.3", + "@perf-profiler/profiler": "^0.10.9", + "@perf-profiler/types": "^0.8.0", + "commander": "^12.0.0", + "fast-xml-parser": "^4.2.7" + }, + "bin": { + "flashlight-ios-poc": "dist/launchIOS.js" + } + }, + "node_modules/@perf-profiler/ios-instruments/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@perf-profiler/logger": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@perf-profiler/logger/-/logger-0.3.3.tgz", + "integrity": "sha512-iAJJ5gWhJ3zEpdMT7M2+HX0Q0UjSuCOZiEs5g8UKKPFYQjmPWwC6otHoZz6ZzRRddjiA065iD2PTytVFkpFTeQ==", + "dev": true, + "dependencies": { + "kleur": "^4.1.5", + "luxon": "^3.4.4" + }, + "bin": { + "perf-profiler-logger": "dist/bin.js" + } + }, + "node_modules/@perf-profiler/logger/node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@perf-profiler/profiler": { + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@perf-profiler/profiler/-/profiler-0.10.9.tgz", + "integrity": "sha512-jhkFyqsrmkI9gCYmK7+R1e+vjWGw2a2YnqruRAUk71saOkLLvRSWKnT0MiGMqzi0aQj//ojeW9viDJgxQB86zg==", + "dev": true, + "dependencies": { + "@perf-profiler/android": "^0.12.0", + "@perf-profiler/ios": "^0.3.1", + "@perf-profiler/types": "^0.8.0" + } + }, + "node_modules/@perf-profiler/reporter": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@perf-profiler/reporter/-/reporter-0.8.1.tgz", + "integrity": "sha512-lZp17uMMLAV4nuDO0JbajbPCyOoD4/ugnZVxsOEEueRo8mxB26TS3R7ANtMZYjHrpQbJry0CgfTIPxflBgtq4A==", + "dev": true, + "dependencies": { + "@perf-profiler/types": "^0.8.0", + "lodash": "^4.17.21" + } + }, + "node_modules/@perf-profiler/types": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@perf-profiler/types/-/types-0.8.0.tgz", + "integrity": "sha512-TFiktv00SzLjjPp1hFYYjT9O36iGIUaF6yPLd7x/UT4CuLd0YYDUj+gvX0fbXtVtV7141tTvWbXFL5HiXGx0kw==", + "dev": true + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "dev": true, @@ -33116,6 +33229,15 @@ "node": ">=10" } }, + "node_modules/luxon": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", + "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/magic-string": { "version": "0.30.9", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.9.tgz", diff --git a/package.json b/package.json index 90e8f75979dd..eccc2fd34885 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "9.0.2-0", + "version": "9.0.2-3", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", @@ -36,7 +36,7 @@ "android-build-e2edelta": "bundle exec fastlane android build_e2edelta", "test": "TZ=utc NODE_OPTIONS=--experimental-vm-modules jest", "typecheck": "tsc", - "lint": "eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/eslint", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/eslint", "lint-changed": "eslint --fix $(git diff --diff-filter=AM --name-only main -- \"*.js\" \"*.ts\" \"*.tsx\")", "lint-watch": "npx eslint-watch --watch --changed", "shellcheck": "./scripts/shellCheck.sh", @@ -208,6 +208,9 @@ "@octokit/core": "4.0.4", "@octokit/plugin-paginate-rest": "3.1.0", "@octokit/plugin-throttling": "4.1.0", + "@perf-profiler/profiler": "^0.10.9", + "@perf-profiler/reporter": "^0.8.1", + "@perf-profiler/types": "^0.8.0", "@react-native-community/eslint-config": "3.2.0", "@react-native/babel-preset": "^0.73.21", "@react-native/metro-config": "^0.73.5", diff --git a/patches/@perf-profiler+android+0.12.0.patch b/patches/@perf-profiler+android+0.12.0.patch new file mode 100644 index 000000000000..f6ecbce9b481 --- /dev/null +++ b/patches/@perf-profiler+android+0.12.0.patch @@ -0,0 +1,54 @@ +diff --git a/node_modules/@perf-profiler/android/dist/src/commands.js b/node_modules/@perf-profiler/android/dist/src/commands.js +old mode 100755 +new mode 100644 +diff --git a/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js b/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js +index 77b9ee0..59aeed9 100644 +--- a/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js ++++ b/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js +@@ -134,7 +134,20 @@ class UnixProfiler { + } + const subProcessesStats = (0, getCpuStatsByProcess_1.processOutput)(cpu, pid); + const ram = (0, pollRamUsage_1.processOutput)(ramStr, this.getRAMPageSize()); +- const { frameTimes, interval: atraceInterval } = frameTimeParser.getFrameTimes(atrace, pid); ++ ++ let output; ++ try { ++ output = frameTimeParser.getFrameTimes(atrace, pid); ++ } catch (e) { ++ console.error(e); ++ } ++ ++ if (!output) { ++ return; ++ } ++ ++ const { frameTimes, interval: atraceInterval } = output; ++ + if (!initialTime) { + initialTime = timestamp; + } +diff --git a/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts b/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts +index d6983c1..ccacf09 100644 +--- a/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts ++++ b/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts +@@ -136,7 +136,19 @@ export abstract class UnixProfiler implements Profiler { + const subProcessesStats = processOutput(cpu, pid); + + const ram = processRamOutput(ramStr, this.getRAMPageSize()); +- const { frameTimes, interval: atraceInterval } = frameTimeParser.getFrameTimes(atrace, pid); ++ ++ let output; ++ try { ++ output = frameTimeParser.getFrameTimes(atrace, pid); ++ } catch (e) { ++ console.error(e); ++ } ++ ++ if (!output) { ++ return; ++ } ++ ++ const { frameTimes, interval: atraceInterval } = output; + + if (!initialTime) { + initialTime = timestamp; diff --git a/patches/@perf-profiler+reporter+0.8.1.patch b/patches/@perf-profiler+reporter+0.8.1.patch new file mode 100644 index 000000000000..2c918b4049c2 --- /dev/null +++ b/patches/@perf-profiler+reporter+0.8.1.patch @@ -0,0 +1,25 @@ +diff --git a/node_modules/@perf-profiler/reporter/dist/src/index.d.ts b/node_modules/@perf-profiler/reporter/dist/src/index.d.ts +index 2f84d84..14ae688 100644 +--- a/node_modules/@perf-profiler/reporter/dist/src/index.d.ts ++++ b/node_modules/@perf-profiler/reporter/dist/src/index.d.ts +@@ -4,4 +4,6 @@ export * from "./reporting/Report"; + export * from "./utils/sanitizeProcessName"; + export * from "./utils/round"; + export * from "./reporting/cpu"; ++export * from "./reporting/ram"; ++export * from "./reporting/fps"; + export { canComputeHighCpuUsage } from "./reporting/highCpu"; +diff --git a/node_modules/@perf-profiler/reporter/dist/src/index.js b/node_modules/@perf-profiler/reporter/dist/src/index.js +index 4b50e3a..780963a 100644 +--- a/node_modules/@perf-profiler/reporter/dist/src/index.js ++++ b/node_modules/@perf-profiler/reporter/dist/src/index.js +@@ -21,6 +21,8 @@ __exportStar(require("./reporting/Report"), exports); + __exportStar(require("./utils/sanitizeProcessName"), exports); + __exportStar(require("./utils/round"), exports); + __exportStar(require("./reporting/cpu"), exports); ++__exportStar(require("./reporting/fps"), exports); ++__exportStar(require("./reporting/ram"), exports); + var highCpu_1 = require("./reporting/highCpu"); + Object.defineProperty(exports, "canComputeHighCpuUsage", { enumerable: true, get: function () { return highCpu_1.canComputeHighCpuUsage; } }); + //# sourceMappingURL=index.js.map +\ No newline at end of file diff --git a/src/CONST.ts b/src/CONST.ts index e71ad55a452c..0297f7bc0d5a 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -601,6 +601,7 @@ const CONST = { ONFIDO_TERMS_OF_SERVICE_URL: 'https://onfido.com/terms-of-service/', LIST_OF_RESTRICTED_BUSINESSES: 'https://community.expensify.com/discussion/6191/list-of-restricted-businesses', TRAVEL_TERMS_URL: `${USE_EXPENSIFY_URL}/travelterms`, + PRICING: `https://www.expensify.com/pricing`, // Use Environment.getEnvironmentURL to get the complete URL with port number DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:', diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index 46d8be0f7e82..2cb615ae0af8 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -339,6 +339,9 @@ const ONYXKEYS = { // Paths of PDF file that has been cached during one session CACHED_PDF_PATHS: 'cachedPDFPaths', + /** Stores iframe link to verify 3DS flow for subscription */ + VERIFY_3DS_SUBSCRIPTION: 'verify3dsSubscription', + /** Holds the checks used while transferring the ownership of the workspace */ POLICY_OWNERSHIP_CHANGE_CHECKS: 'policyOwnershipChangeChecks', @@ -405,8 +408,8 @@ const ONYXKEYS = { /** List of Form ids */ FORMS: { - ADD_DEBIT_CARD_FORM: 'addDebitCardForm', - ADD_DEBIT_CARD_FORM_DRAFT: 'addDebitCardFormDraft', + ADD_PAYMENT_CARD_FORM: 'addPaymentCardForm', + ADD_PAYMENT_CARD_FORM_DRAFT: 'addPaymentCardFormDraft', WORKSPACE_SETTINGS_FORM: 'workspaceSettingsForm', WORKSPACE_CATEGORY_FORM: 'workspaceCategoryForm', WORKSPACE_CATEGORY_FORM_DRAFT: 'workspaceCategoryFormDraft', @@ -475,6 +478,8 @@ const ONYXKEYS = { SETTINGS_STATUS_SET_CLEAR_AFTER_FORM_DRAFT: 'settingsStatusSetClearAfterFormDraft', SETTINGS_STATUS_CLEAR_DATE_FORM: 'settingsStatusClearDateForm', SETTINGS_STATUS_CLEAR_DATE_FORM_DRAFT: 'settingsStatusClearDateFormDraft', + CHANGE_BILLING_CURRENCY_FORM: 'changeBillingCurrencyForm', + CHANGE_BILLING_CURRENCY_FORM_DRAFT: 'changeBillingCurrencyFormDraft', PRIVATE_NOTES_FORM: 'privateNotesForm', PRIVATE_NOTES_FORM_DRAFT: 'privateNotesFormDraft', I_KNOW_A_TEACHER_FORM: 'iKnowTeacherForm', @@ -517,7 +522,7 @@ const ONYXKEYS = { type AllOnyxKeys = DeepValueOf; type OnyxFormValuesMapping = { - [ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM]: FormTypes.AddDebitCardForm; + [ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM]: FormTypes.AddPaymentCardForm; [ONYXKEYS.FORMS.WORKSPACE_SETTINGS_FORM]: FormTypes.WorkspaceSettingsForm; [ONYXKEYS.FORMS.WORKSPACE_CATEGORY_FORM]: FormTypes.WorkspaceCategoryForm; [ONYXKEYS.FORMS.WORKSPACE_TAG_FORM]: FormTypes.WorkspaceTagForm; @@ -549,6 +554,7 @@ type OnyxFormValuesMapping = { [ONYXKEYS.FORMS.WAYPOINT_FORM]: FormTypes.WaypointForm; [ONYXKEYS.FORMS.SETTINGS_STATUS_SET_FORM]: FormTypes.SettingsStatusSetForm; [ONYXKEYS.FORMS.SETTINGS_STATUS_CLEAR_DATE_FORM]: FormTypes.SettingsStatusClearDateForm; + [ONYXKEYS.FORMS.CHANGE_BILLING_CURRENCY_FORM]: FormTypes.ChangeBillingCurrencyForm; [ONYXKEYS.FORMS.SETTINGS_STATUS_SET_CLEAR_AFTER_FORM]: FormTypes.SettingsStatusSetClearAfterForm; [ONYXKEYS.FORMS.PRIVATE_NOTES_FORM]: FormTypes.PrivateNotesForm; [ONYXKEYS.FORMS.I_KNOW_A_TEACHER_FORM]: FormTypes.IKnowTeacherForm; @@ -704,6 +710,7 @@ type OnyxValuesMapping = { [ONYXKEYS.IS_CHECKING_PUBLIC_ROOM]: boolean; [ONYXKEYS.MY_DOMAIN_SECURITY_GROUPS]: Record; [ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID]: string; + [ONYXKEYS.VERIFY_3DS_SUBSCRIPTION]: string; [ONYXKEYS.PREFERRED_THEME]: ValueOf; [ONYXKEYS.MAPBOX_ACCESS_TOKEN]: OnyxTypes.MapboxAccessToken; [ONYXKEYS.ONYX_UPDATES_FROM_SERVER]: OnyxTypes.OnyxUpdatesFromServer; diff --git a/src/ROUTES.ts b/src/ROUTES.ts index c38ec192127e..5c8cfdcc8a68 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -95,6 +95,7 @@ const ROUTES = { WORKSPACE_SWITCHER: 'workspace-switcher', SETTINGS: 'settings', SETTINGS_PROFILE: 'settings/profile', + SETTINGS_CHANGE_CURRENCY: 'settings/add-payment-card/change-currency', SETTINGS_SHARE_CODE: 'settings/shareCode', SETTINGS_DISPLAY_NAME: 'settings/profile/display-name', SETTINGS_TIMEZONE: 'settings/profile/timezone', @@ -107,6 +108,8 @@ const ROUTES = { getRoute: (canChangeSize: 0 | 1) => `settings/subscription/subscription-size?canChangeSize=${canChangeSize}` as const, }, SETTINGS_SUBSCRIPTION_ADD_PAYMENT_CARD: 'settings/subscription/add-payment-card', + SETTINGS_SUBSCRIPTION_CHANGE_BILLING_CURRENCY: 'settings/subscription/change-billing-currency', + SETTINGS_SUBSCRIPTION_CHANGE_PAYMENT_CURRENCY: 'settings/subscription/add-payment-card/change-payment-currency', SETTINGS_SUBSCRIPTION_DISABLE_AUTO_RENEW_SURVEY: 'settings/subscription/disable-auto-renew-survey', SETTINGS_PRIORITY_MODE: 'settings/preferences/priority-mode', SETTINGS_LANGUAGE: 'settings/preferences/language', diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 6e3d1f3276e9..5c5fc6c31092 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -41,6 +41,7 @@ const SCREENS = { SAVE_THE_WORLD: 'Settings_TeachersUnite', APP_DOWNLOAD_LINKS: 'Settings_App_Download_Links', ADD_DEBIT_CARD: 'Settings_Add_Debit_Card', + ADD_PAYMENT_CARD_CHANGE_CURRENCY: 'Settings_Add_Payment_Card_Change_Currency', ADD_BANK_ACCOUNT: 'Settings_Add_Bank_Account', CLOSE: 'Settings_Close', TWO_FACTOR_AUTH: 'Settings_TwoFactorAuth', @@ -104,6 +105,8 @@ const SCREENS = { SIZE: 'Settings_Subscription_Size', ADD_PAYMENT_CARD: 'Settings_Subscription_Add_Payment_Card', DISABLE_AUTO_RENEW_SURVEY: 'Settings_Subscription_DisableAutoRenewSurvey', + CHANGE_BILLING_CURRENCY: 'Settings_Subscription_Change_Billing_Currency', + CHANGE_PAYMENT_CURRENCY: 'Settings_Subscription_Change_Payment_Currency', }, }, SAVE_THE_WORLD: { diff --git a/src/components/AddPaymentCard/PaymentCardChangeCurrencyForm.tsx b/src/components/AddPaymentCard/PaymentCardChangeCurrencyForm.tsx new file mode 100644 index 000000000000..39fea0f4df77 --- /dev/null +++ b/src/components/AddPaymentCard/PaymentCardChangeCurrencyForm.tsx @@ -0,0 +1,142 @@ +import React, {useCallback, useMemo, useState} from 'react'; +import {View} from 'react-native'; +import type {ValueOf} from 'type-fest'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import type {FormInputErrors, FormOnyxValues} from '@components/Form/types'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import SelectionList from '@components/SelectionList'; +import RadioListItem from '@components/SelectionList/RadioListItem'; +import TextInput from '@components/TextInput'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import INPUT_IDS from '@src/types/form/ChangeBillingCurrencyForm'; +import PaymentCardCurrencyHeader from './PaymentCardCurrencyHeader'; +import PaymentCardCurrencyModal from './PaymentCardCurrencyModal'; + +type PaymentCardFormProps = { + initialCurrency?: ValueOf; + isSecurityCodeRequired?: boolean; + changeBillingCurrency: (currency?: ValueOf, values?: FormOnyxValues) => void; +}; + +const REQUIRED_FIELDS = [INPUT_IDS.SECURITY_CODE]; + +function PaymentCardChangeCurrencyForm({changeBillingCurrency, isSecurityCodeRequired, initialCurrency}: PaymentCardFormProps) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + + const [isCurrencyModalVisible, setIsCurrencyModalVisible] = useState(false); + const [currency, setCurrency] = useState>(initialCurrency ?? CONST.CURRENCY.USD); + + const validate = (values: FormOnyxValues): FormInputErrors => { + const errors = ValidationUtils.getFieldRequiredErrors(values, REQUIRED_FIELDS); + + if (values.securityCode && !ValidationUtils.isValidSecurityCode(values.securityCode)) { + errors.securityCode = translate('addPaymentCardPage.error.securityCode'); + } + + return errors; + }; + + const {sections} = useMemo( + () => ({ + sections: [ + { + data: (Object.keys(CONST.CURRENCY) as Array>).map((currencyItem) => ({ + text: currencyItem, + value: currencyItem, + keyForList: currencyItem, + isSelected: currencyItem === currency, + })), + }, + ], + }), + [currency], + ); + + const showCurrenciesModal = useCallback(() => { + setIsCurrencyModalVisible(true); + }, []); + + const changeCurrency = useCallback((selectedCurrency: ValueOf) => { + setCurrency(selectedCurrency); + setIsCurrencyModalVisible(false); + }, []); + + const selectCurrency = useCallback( + (selectedCurrency: ValueOf) => { + setCurrency(selectedCurrency); + changeBillingCurrency(selectedCurrency); + }, + [changeBillingCurrency], + ); + + if (isSecurityCodeRequired) { + return ( + changeBillingCurrency(currency, values)} + submitButtonText={translate('common.save')} + scrollContextEnabled + style={[styles.mh5, styles.flexGrow1]} + > + + <> + + + + + + >} + currentCurrency={currency} + onCurrencyChange={changeCurrency} + onClose={() => setIsCurrencyModalVisible(false)} + /> + + ); + } + + return ( + + } + initiallyFocusedOptionKey={currency} + containerStyle={[styles.mhn5]} + sections={sections} + onSelectRow={(option) => { + selectCurrency(option.value); + }} + showScrollIndicator + shouldStopPropagation + shouldUseDynamicMaxToRenderPerBatch + ListItem={RadioListItem} + /> + + ); +} + +PaymentCardChangeCurrencyForm.displayName = 'PaymentCardChangeCurrencyForm'; + +export default PaymentCardChangeCurrencyForm; diff --git a/src/components/AddPaymentCard/PaymentCardCurrencyHeader.tsx b/src/components/AddPaymentCard/PaymentCardCurrencyHeader.tsx new file mode 100644 index 000000000000..e5142aec8efc --- /dev/null +++ b/src/components/AddPaymentCard/PaymentCardCurrencyHeader.tsx @@ -0,0 +1,28 @@ +import React from 'react'; +import {View} from 'react-native'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import CONST from '@src/CONST'; + +function PaymentCardCurrencyHeader({isSectionList}: {isSectionList?: boolean}) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + return ( + + + {`${translate('billingCurrency.note')}`}{' '} + {`${translate('billingCurrency.noteLink')}`}{' '} + {`${translate('billingCurrency.noteDetails')}`} + + + ); +} + +PaymentCardCurrencyHeader.displayName = 'PaymentCardCurrencyHeader'; + +export default PaymentCardCurrencyHeader; diff --git a/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx b/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx index 60fa838b0577..19b3399caea8 100644 --- a/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx +++ b/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx @@ -1,4 +1,5 @@ import React, {useMemo} from 'react'; +import type {ValueOf} from 'type-fest'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import Modal from '@components/Modal'; import ScreenWrapper from '@components/ScreenWrapper'; @@ -13,16 +14,16 @@ type PaymentCardCurrencyModalProps = { /** Whether the modal is visible */ isVisible: boolean; - /** The list of years to render */ - currencies: Array; + /** The list of currencies to render */ + currencies: Array>; - /** Currently selected year */ - currentCurrency: keyof typeof CONST.CURRENCY; + /** Currently selected currency */ + currentCurrency: ValueOf; - /** Function to call when the user selects a year */ - onCurrencyChange?: (currency: keyof typeof CONST.CURRENCY) => void; + /** Function to call when the user selects a currency */ + onCurrencyChange?: (currency: ValueOf) => void; - /** Function to call when the user closes the year picker */ + /** Function to call when the user closes the currency picker */ onClose?: () => void; }; @@ -57,7 +58,7 @@ function PaymentCardCurrencyModal({isVisible, currencies, currentCurrency = CONS useNativeDriver > , currency?: ValueOf) => void; + addPaymentCard: (values: FormOnyxValues, currency?: ValueOf) => void; submitButtonText: string; /** Custom content to display in the footer after card form */ footerContent?: ReactNode; /** Custom content to display in the header before card form */ headerContent?: ReactNode; + /** object to get currency route details from */ + currencySelectorRoute?: typeof ROUTES.SETTINGS_SUBSCRIPTION_CHANGE_PAYMENT_CURRENCY; }; function IAcceptTheLabel() { @@ -61,6 +62,7 @@ const REQUIRED_FIELDS = [ INPUT_IDS.SECURITY_CODE, INPUT_IDS.ADDRESS_ZIP_CODE, INPUT_IDS.ADDRESS_STATE, + INPUT_IDS.CURRENCY, ]; const CARD_TYPES = { @@ -127,42 +129,44 @@ function PaymentCardForm({ showStateSelector, footerContent, headerContent, + currencySelectorRoute, }: PaymentCardFormProps) { const styles = useThemeStyles(); + const [data] = useOnyx(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM); + const {translate} = useLocalize(); const route = useRoute(); const label = CARD_LABELS[isDebitCard ? CARD_TYPES.DEBIT_CARD : CARD_TYPES.PAYMENT_CARD]; const cardNumberRef = useRef(null); - const [isCurrencyModalVisible, setIsCurrencyModalVisible] = useState(false); - const [currency, setCurrency] = useState(CONST.CURRENCY.USD); + const [cardNumber, setCardNumber] = useState(''); - const validate = (values: FormOnyxValues): FormInputErrors => { + const validate = (values: FormOnyxValues): FormInputErrors => { const errors = ValidationUtils.getFieldRequiredErrors(values, REQUIRED_FIELDS); if (values.nameOnCard && !ValidationUtils.isValidLegalName(values.nameOnCard)) { - errors.nameOnCard = translate('addDebitCardPage.error.invalidName'); + errors.nameOnCard = translate(label.error.nameOnCard); } if (values.cardNumber && !ValidationUtils.isValidDebitCard(values.cardNumber.replace(/ /g, ''))) { - errors.cardNumber = translate('addDebitCardPage.error.debitCardNumber'); + errors.cardNumber = translate(label.error.cardNumber); } if (values.expirationDate && !ValidationUtils.isValidExpirationDate(values.expirationDate)) { - errors.expirationDate = translate('addDebitCardPage.error.expirationDate'); + errors.expirationDate = translate(label.error.expirationDate); } if (values.securityCode && !ValidationUtils.isValidSecurityCode(values.securityCode)) { - errors.securityCode = translate('addDebitCardPage.error.securityCode'); + errors.securityCode = translate(label.error.securityCode); } if (values.addressStreet && !ValidationUtils.isValidAddress(values.addressStreet)) { - errors.addressStreet = translate('addDebitCardPage.error.addressStreet'); + errors.addressStreet = translate(label.error.addressStreet); } if (values.addressZipCode && !ValidationUtils.isValidZipCode(values.addressZipCode)) { - errors.addressZipCode = translate('addDebitCardPage.error.addressZipCode'); + errors.addressZipCode = translate(label.error.addressZipCode); } if (!values.acceptTerms) { @@ -172,13 +176,21 @@ function PaymentCardForm({ return errors; }; - const showCurrenciesModal = useCallback(() => { - setIsCurrencyModalVisible(true); - }, []); + const onChangeCardNumber = useCallback((newValue: string) => { + // replace all characters that are not spaces or digits + let validCardNumber = newValue.replace(/[^\d ]/g, ''); + + // gets only the first 16 digits if the inputted number have more digits than that + validCardNumber = validCardNumber.match(/(?:\d *){1,16}/)?.[0] ?? ''; - const changeCurrency = useCallback((newCurrency: keyof typeof CONST.CURRENCY) => { - setCurrency(newCurrency); - setIsCurrencyModalVisible(false); + // add the spacing between every 4 digits + validCardNumber = + validCardNumber + .replace(/ /g, '') + .match(/.{1,4}/g) + ?.join(' ') ?? ''; + + setCardNumber(validCardNumber); }, []); if (!shouldShowPaymentCardForm) { @@ -189,9 +201,9 @@ function PaymentCardForm({ <> {headerContent} addPaymentCard(formData, currency)} + onSubmit={addPaymentCard} submitButtonText={submitButtonText} scrollContextEnabled style={[styles.mh5, styles.flexGrow1]} @@ -199,15 +211,19 @@ function PaymentCardForm({ )} {!!showCurrencyField && ( - - {(isHovered) => ( - - )} - + + + )} {!!showAcceptTerms && ( @@ -298,19 +309,11 @@ function PaymentCardForm({ 'common.privacyPolicy', )}`} inputID={INPUT_IDS.ACCEPT_TERMS} - defaultValue={false} + defaultValue={!!data?.acceptTerms} LabelComponent={IAcceptTheLabel} /> )} - - } - currentCurrency={currency} - onCurrencyChange={changeCurrency} - onClose={() => setIsCurrencyModalVisible(false)} - /> {footerContent} diff --git a/src/components/CurrencySelector.tsx b/src/components/CurrencySelector.tsx new file mode 100644 index 000000000000..6c69f7b31dc1 --- /dev/null +++ b/src/components/CurrencySelector.tsx @@ -0,0 +1,78 @@ +import {useIsFocused} from '@react-navigation/native'; +import React, {forwardRef, useEffect, useRef} from 'react'; +import type {ForwardedRef} from 'react'; +import type {View} from 'react-native'; +import type {ValueOf} from 'type-fest'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import Navigation from '@libs/Navigation/Navigation'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; +import MenuItemWithTopDescription from './MenuItemWithTopDescription'; + +type CurrencySelectorProps = { + /** Form error text. e.g when no currency is selected */ + errorText?: string; + + /** Callback called when the currency changes. */ + onInputChange?: (value?: string) => void; + + /** Current selected currency */ + value?: ValueOf; + + /** inputID used by the Form component */ + // eslint-disable-next-line react/no-unused-prop-types + inputID: string; + + /** Callback to call when the picker modal is dismissed */ + onBlur?: () => void; + + /** object to get route details from */ + currencySelectorRoute?: typeof ROUTES.SETTINGS_SUBSCRIPTION_CHANGE_PAYMENT_CURRENCY | typeof ROUTES.SETTINGS_CHANGE_CURRENCY; +}; + +function CurrencySelector( + {errorText = '', value: currency, onInputChange = () => {}, onBlur, currencySelectorRoute = ROUTES.SETTINGS_CHANGE_CURRENCY}: CurrencySelectorProps, + ref: ForwardedRef, +) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + + const currencyTitleDescStyle = currency ? styles.textNormal : null; + + const didOpenCurrencySelector = useRef(false); + const isFocused = useIsFocused(); + useEffect(() => { + if (!isFocused || !didOpenCurrencySelector.current) { + return; + } + didOpenCurrencySelector.current = false; + onBlur?.(); + }, [isFocused, onBlur]); + + useEffect(() => { + // This will cause the form to revalidate and remove any error related to currency + onInputChange(currency); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [currency]); + + return ( + { + didOpenCurrencySelector.current = true; + Navigation.navigate(currencySelectorRoute); + }} + /> + ); +} + +CurrencySelector.displayName = 'CurrencySelector'; + +export default forwardRef(CurrencySelector); diff --git a/src/components/Form/types.ts b/src/components/Form/types.ts index 9aa8bc921164..6245fdcf7b49 100644 --- a/src/components/Form/types.ts +++ b/src/components/Form/types.ts @@ -8,6 +8,7 @@ import type AmountPicker from '@components/AmountPicker'; import type AmountTextInput from '@components/AmountTextInput'; import type CheckboxWithLabel from '@components/CheckboxWithLabel'; import type CountrySelector from '@components/CountrySelector'; +import type CurrencySelector from '@components/CurrencySelector'; import type DatePicker from '@components/DatePicker'; import type EmojiPickerButtonDropdown from '@components/EmojiPicker/EmojiPickerButtonDropdown'; import type Picker from '@components/Picker'; @@ -35,6 +36,7 @@ type ValidInputs = | typeof Picker | typeof AddressSearch | typeof CountrySelector + | typeof CurrencySelector | typeof AmountForm | typeof BusinessTypePicker | typeof StateSelector diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 6818c7cc6be8..fa3454ed9e61 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -248,14 +248,15 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea const isHoldCreator = ReportUtils.isHoldCreator(transaction, moneyRequestReport?.reportID) && isRequestIOU; const isTrackExpenseReport = ReportUtils.isTrackExpenseReport(moneyRequestReport); const canModifyStatus = !isTrackExpenseReport && (isPolicyAdmin || isActionOwner || isApprover); - if (isOnHold && (isHoldCreator || (!isRequestIOU && canModifyStatus))) { + const isInvoiceReport = ReportUtils.isInvoiceReport(moneyRequestReport); + if (isOnHold && (isHoldCreator || (!isRequestIOU && canModifyStatus)) && !isInvoiceReport) { threeDotsMenuItems.push({ icon: Expensicons.Stopwatch, text: translate('iou.unholdExpense'), onSelected: () => changeMoneyRequestStatus(), }); } - if (!isOnHold && (isRequestIOU || canModifyStatus) && !isScanning) { + if (!isOnHold && (isRequestIOU || canModifyStatus) && !isScanning && !isInvoiceReport) { threeDotsMenuItems.push({ icon: Expensicons.Stopwatch, text: translate('iou.hold'), diff --git a/src/languages/en.ts b/src/languages/en.ts index 10de1f63d7ac..ab30b083ce19 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -274,7 +274,7 @@ export default { your: 'your', conciergeHelp: 'Please reach out to Concierge for help.', youAppearToBeOffline: 'You appear to be offline.', - thisFeatureRequiresInternet: 'This feature requires an active internet connection to be used.', + thisFeatureRequiresInternet: 'This feature requires an active internet connection.', attachementWillBeAvailableOnceBackOnline: 'Attachment will become available once back online.', areYouSure: 'Are you sure?', verify: 'Verify', @@ -344,40 +344,40 @@ export default { }, location: { useCurrent: 'Use current location', - notFound: 'We were unable to find your location, please try again or enter an address manually.', - permissionDenied: 'It looks like you have denied permission to your location.', + notFound: 'We were unable to find your location. Please try again or enter an address manually.', + permissionDenied: "It looks like you've denied access to your location.", please: 'Please', - allowPermission: 'allow location permission in settings', - tryAgain: 'and then try again.', + allowPermission: 'allow location access in settings', + tryAgain: 'and try again.', }, anonymousReportFooter: { logoTagline: 'Join the discussion.', }, attachmentPicker: { cameraPermissionRequired: 'Camera access', - expensifyDoesntHaveAccessToCamera: "Expensify can't take photos without access to your camera. Tap Settings to update permissions.", + expensifyDoesntHaveAccessToCamera: "Expensify can't take photos without access to your camera. Tap settings to update permissions.", attachmentError: 'Attachment error', - errorWhileSelectingAttachment: 'An error occurred while selecting an attachment, please try again.', - errorWhileSelectingCorruptedAttachment: 'An error occurred while selecting a corrupted attachment, please try another file.', + errorWhileSelectingAttachment: 'An error occurred while selecting an attachment. Please try again.', + errorWhileSelectingCorruptedAttachment: 'An error occurred while selecting a corrupted attachment. Please try another file.', takePhoto: 'Take photo', chooseFromGallery: 'Choose from gallery', chooseDocument: 'Choose file', - attachmentTooLarge: 'Attachment too large', - sizeExceeded: 'Attachment size is larger than 24 MB limit.', - attachmentTooSmall: 'Attachment too small', - sizeNotMet: 'Attachment size must be greater than 240 bytes.', + attachmentTooLarge: 'Attachment is too large', + sizeExceeded: 'Attachment size is larger than 24 MB limit', + attachmentTooSmall: 'Attachment is too small', + sizeNotMet: 'Attachment size must be greater than 240 bytes', wrongFileType: 'Invalid file type', - notAllowedExtension: 'This file type is not allowed', - folderNotAllowedMessage: 'Uploading a folder is not allowed. Try a different file.', + notAllowedExtension: 'This file type is not allowed. Please try a different file type.', + folderNotAllowedMessage: 'Uploading a folder is not allowed. Please try a different file.', protectedPDFNotSupported: 'Password-protected PDF is not supported', }, connectionComplete: { - title: 'Connection Complete', + title: 'Connection complete', supportingText: 'You can close this window and head back to the Expensify app.', }, avatarCropModal: { title: 'Edit photo', - description: 'Drag, zoom, and rotate your image to your preferred specifications', + description: 'Drag, zoom, and rotate your image however you like.', }, composer: { noExtensionFoundForMimeType: 'No extension found for mime type', @@ -386,7 +386,7 @@ export default { }, baseUpdateAppModal: { updateApp: 'Update app', - updatePrompt: 'A new version of this app is available.\nUpdate now or restart the app at a later time to download the latest changes.', + updatePrompt: 'A new version of this app is available.\nUpdate now or restart the app later to download the latest changes.', }, deeplinkWrapper: { launching: 'Launching Expensify', @@ -402,17 +402,17 @@ export default { continueInWeb: 'continue to the web app', }, validateCodeModal: { - successfulSignInTitle: 'Abracadabra,\nyou are signed in!', + successfulSignInTitle: "Abracadabra,\nyou're signed in!", successfulSignInDescription: 'Head back to your original tab to continue.', - title: 'Here is your magic code', - description: 'Please enter the code using the device\nwhere it was originally requested', + title: "Here's your magic code", + description: 'Please enter the code from the device\nwhere it was originally requested', or: ', or', signInHere: 'just sign in here', expiredCodeTitle: 'Magic code expired', expiredCodeDescription: 'Go back to the original device and request a new code.', successfulNewCodeRequest: 'Code requested. Please check your device.', tfaRequiredTitle: 'Two-factor authentication\nrequired', - tfaRequiredDescription: 'Please enter the two-factor authentication code\nwhere you are trying to sign in.', + tfaRequiredDescription: "Please enter the two-factor authentication code\nwhere you're trying to sign in.", }, moneyRequestConfirmationList: { paidBy: 'Paid by', @@ -430,7 +430,7 @@ export default { welcomeText: { getStarted: 'Get started below.', anotherLoginPageIsOpen: 'Another login page is open.', - anotherLoginPageIsOpenExplanation: "You've opened the login page in a separate tab, please login from that specific tab.", + anotherLoginPageIsOpenExplanation: "You've opened the login page in a separate tab. Please log in from that tab.", welcome: 'Welcome!', welcomeWithoutExclamation: 'Welcome', phrase2: "Money talks. And now that chat and payments are in one place, it's also easy.", @@ -446,7 +446,7 @@ export default { }, }, thirdPartySignIn: { - alreadySignedIn: ({email}: AlreadySignedInParams) => `You are already signed in as ${email}.`, + alreadySignedIn: ({email}: AlreadySignedInParams) => `You're already signed in as ${email}.`, goBackMessage: ({provider}: GoBackMessageParams) => `Don't want to sign in with ${provider}?`, continueWithMyCurrentSession: 'Continue with my current session', redirectToDesktopMessage: "We'll redirect you to the desktop app once you finish signing in.", @@ -456,7 +456,7 @@ export default { }, samlSignIn: { welcomeSAMLEnabled: 'Continue logging in with single sign-on:', - orContinueWithMagicCode: 'Or optionally, your company allows signing in with a magic code', + orContinueWithMagicCode: 'You can also sign in with a magic code', useSingleSignOn: 'Use single sign-on', useMagicCode: 'Use magic code', launching: 'Launching...', @@ -547,7 +547,7 @@ export default { hereAlternateText: 'Notify everyone in this conversation', }, newMessages: 'New messages', - youHaveBeenBanned: 'Note: You have been banned from communicating in this channel', + youHaveBeenBanned: "Note: You've been banned from chatting in this channel.", reportTypingIndicator: { isTyping: 'is typing...', areTyping: 'are typing...', @@ -602,12 +602,12 @@ export default { chooseFile: 'Choose file', takePhoto: 'Take a photo', cameraAccess: 'Camera access is required to take pictures of receipts.', - cameraErrorTitle: 'Camera Error', + cameraErrorTitle: 'Camera error', + cameraErrorMessage: 'An error occurred while taking a photo. Please try again.', locationAccessTitle: 'Allow location access', locationAccessMessage: 'We’ll use your location to accurately determine your default currency and timezone. You can edit access in your device’s settings anytime.', locationErrorTitle: 'Enable location in settings', locationErrorMessage: 'Allowing location access is required to help accurately determine your default currency and timezone. Tap Settings to update permissions.', - cameraErrorMessage: 'An error occurred while taking a photo, please try again.', dropTitle: 'Let it go', dropMessage: 'Drop your file here', flash: 'flash', @@ -663,12 +663,12 @@ export default { canceled: 'Canceled', posted: 'Posted', deleteReceipt: 'Delete receipt', - pendingMatchWithCreditCard: 'Receipt pending match with credit card.', - pendingMatchWithCreditCardDescription: 'Receipt pending match with credit card. Mark as cash to ignore and request payment.', + pendingMatchWithCreditCard: 'Receipt pending match with card transaction', + pendingMatchWithCreditCardDescription: 'Receipt pending match with card transaction. Mark as cash to cancel.', markAsCash: 'Mark as cash', routePending: 'Route pending...', receiptScanning: 'Receipt scanning...', - receiptScanInProgress: 'Receipt scan in progress.', + receiptScanInProgress: 'Receipt scan in progress', receiptScanInProgressDescription: 'Receipt scan in progress. Check back later or enter the details now.', receiptIssuesFound: (count: number) => `${count === 1 ? 'Issue' : 'Issues'} found`, fieldPending: 'Pending...', @@ -678,8 +678,8 @@ export default { missingMerchant: 'Missing merchant', receiptStatusTitle: 'Scanning…', receiptStatusText: "Only you can see this receipt when it's scanning. Check back later or enter the details now.", - receiptScanningFailed: 'Receipt scanning failed. Enter the details manually.', - transactionPendingDescription: 'Transaction pending. It can take a few days from the date the card was used for the transaction to post.', + receiptScanningFailed: 'Receipt scanning failed. Please enter the details manually.', + transactionPendingDescription: 'Transaction pending. It may take a few days to post.', expenseCount: ({count, scanningReceipts = 0, pendingReceipts = 0}: RequestCountParams) => `${count} ${Str.pluralize('expense', 'expenses', count)}${scanningReceipts > 0 ? `, ${scanningReceipts} scanning` : ''}${ pendingReceipts > 0 ? `, ${pendingReceipts} pending` : '' @@ -694,7 +694,7 @@ export default { settlePayment: ({formattedAmount}: SettleExpensifyCardParams) => `Pay ${formattedAmount}`, settleBusiness: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pay ${formattedAmount} as a business` : `Pay as a business`), payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pay ${formattedAmount} elsewhere` : `Pay elsewhere`), - nextStep: 'Next Steps', + nextStep: 'Next steps', finished: 'Finished', sendInvoice: ({amount}: RequestAmountParams) => `Send ${amount} invoice`, submitAmount: ({amount}: RequestAmountParams) => `submit ${amount}`, @@ -736,24 +736,24 @@ export default { tagSelection: 'Select a tag to better organize your spend.', categorySelection: 'Select a category to better organize your spend.', error: { - invalidCategoryLength: 'The length of the category chosen exceeds the maximum allowed (255). Please choose a different or shorten the category name first.', + invalidCategoryLength: 'The category name exceeds 255 characters. Please shorten it or choose a different category.', invalidAmount: 'Please enter a valid amount before continuing.', invalidTaxAmount: ({amount}: RequestAmountParams) => `Maximum tax amount is ${amount}`, invalidSplit: 'The sum of splits must equal the total amount.', - invalidSplitParticipants: 'Enter an amount greater than zero for at least two participants.', - other: 'Unexpected error, please try again later.', + invalidSplitParticipants: 'Please enter an amount greater than zero for at least two participants.', + other: 'Unexpected error. Please try again later.', genericCreateFailureMessage: 'Unexpected error submitting this expense. Please try again later.', - genericCreateInvoiceFailureMessage: 'Unexpected error sending invoice, please try again later.', - genericHoldExpenseFailureMessage: 'Unexpected error while holding the expense. Please try again later.', - genericUnholdExpenseFailureMessage: 'Unexpected error while taking the expense off hold. Please try again later.', + genericCreateInvoiceFailureMessage: 'Unexpected error sending this invoice. Please try again later.', + genericHoldExpenseFailureMessage: 'Unexpected error holding this expense. Please try again later.', + genericUnholdExpenseFailureMessage: 'Unexpected error taking this expense off hold. Please try again later.', receiptDeleteFailureError: 'Unexpected error deleting this receipt. Please try again later.', // eslint-disable-next-line rulesdir/use-periods-for-error-messages receiptFailureMessage: "The receipt didn't upload. ", // eslint-disable-next-line rulesdir/use-periods-for-error-messages saveFileMessage: 'Download the file ', loseFileMessage: 'or dismiss this error and lose it.', - genericDeleteFailureMessage: 'Unexpected error deleting this expense, please try again later.', - genericEditFailureMessage: 'Unexpected error editing this expense, please try again later.', + genericDeleteFailureMessage: 'Unexpected error deleting this expense. Please try again later.', + genericEditFailureMessage: 'Unexpected error editing this expense. Please try again later.', genericSmartscanFailureMessage: 'Transaction is missing fields.', duplicateWaypointsErrorMessage: 'Please remove duplicate waypoints.', atLeastTwoDifferentWaypoints: 'Please enter at least two different addresses.', @@ -761,7 +761,7 @@ export default { invalidMerchant: 'Please enter a correct merchant.', }, waitingOnEnabledWallet: ({submitterDisplayName}: WaitingOnBankAccountParams) => `started settling up. Payment is on hold until ${submitterDisplayName} enables their wallet.`, - enableWallet: 'Enable Wallet', + enableWallet: 'Enable wallet', hold: 'Hold', unhold: 'Unhold', holdExpense: 'Hold expense', @@ -771,9 +771,9 @@ export default { explainHold: "Explain why you're holding this expense.", reason: 'Reason', holdReasonRequired: 'A reason is required when holding.', - expenseOnHold: 'This expense was put on hold. Review the comments for next steps.', - expensesOnHold: 'All expenses were put on hold. Review the comments for next steps.', - expenseDuplicate: 'This expense has the same details as another one. Review the duplicates to remove the hold.', + expenseOnHold: 'This expense was put on hold. Please review the comments for next steps.', + expensesOnHold: 'All expenses were put on hold. Please review the comments for next steps.', + expenseDuplicate: 'This expense has the same details as another one. Please review the duplicates to remove the hold.', reviewDuplicates: 'Review duplicates', keepAll: 'Keep all', confirmApprove: 'Confirm approval amount', @@ -786,9 +786,9 @@ export default { whatIsHoldTitle: 'What is hold?', whatIsHoldExplain: 'Hold is our way of streamlining financial collaboration. "Reject" is so harsh!', holdIsTemporaryTitle: 'Hold is usually temporary', - holdIsTemporaryExplain: "Because hold is used to clear up confusion or clarify an important detail before payment, it's not permanent.", + holdIsTemporaryExplain: "Hold is used to clear up confusion or clarify an important detail before payment. Don't worry, it's not permanent!", deleteHoldTitle: "Delete whatever won't be paid", - deleteHoldExplain: "In the rare case where something is put on hold and won't be paid, it's on the person requesting payment to delete it.", + deleteHoldExplain: "In the rare case where something's put on hold and won't be paid, it's on the person requesting payment to delete it.", set: 'set', changed: 'changed', removed: 'removed', @@ -806,8 +806,8 @@ export default { }, }, loginField: { - numberHasNotBeenValidated: 'The number has not yet been validated. Click the button to resend the validation link via text.', - emailHasNotBeenValidated: 'The email has not yet been validated. Click the button to resend the validation link via text.', + numberHasNotBeenValidated: "The number hasn't been validated. Click the button to resend the validation link via text.", + emailHasNotBeenValidated: "The email hasn't been validated. Click the button to resend the validation link via text.", }, avatarWithImagePicker: { uploadPhoto: 'Upload photo', @@ -815,7 +815,7 @@ export default { editImage: 'Edit photo', viewPhoto: 'View photo', imageUploadFailed: 'Image upload failed', - deleteWorkspaceError: 'Sorry, there was an unexpected problem deleting your workspace avatar.', + deleteWorkspaceError: 'Sorry, there was an unexpected problem deleting your workspace avatar', sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `The selected image exceeds the maximum upload size of ${maxUploadSizeInMB}MB.`, resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => `Please upload an image larger than ${minHeightInPx}x${minWidthInPx} pixels and smaller than ${maxHeightInPx}x${maxWidthInPx} pixels.`, @@ -830,18 +830,18 @@ export default { setMyTimezoneAutomatically: 'Set my timezone automatically', timezone: 'Timezone', invalidFileMessage: 'Invalid file. Please try a different image.', - avatarUploadFailureMessage: 'An error occurred uploading the avatar, please try again.', + avatarUploadFailureMessage: 'An error occurred uploading the avatar. Please try again.', online: 'Online', offline: 'Offline', syncing: 'Syncing', profileAvatar: 'Profile avatar', publicSection: { title: 'Public', - subtitle: 'These details are displayed on your public profile, available for people to see.', + subtitle: 'These details are displayed on your public profile. Anyone can see them.', }, 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: { @@ -866,10 +866,9 @@ export default { getInTouch: "Whenever we need to get in touch with you, we'll use this contact method.", enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Please enter the magic code sent to ${contactMethod}`, setAsDefault: 'Set as default', - yourDefaultContactMethod: - 'This is your current default contact method. You will not be able to delete this contact method until you set an alternative default by selecting another contact method and pressing “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”.", removeContactMethod: 'Remove contact method', - removeAreYouSure: 'Are you sure you want to remove this contact method? This action cannot be undone.', + removeAreYouSure: "Are you sure you want to remove this contact method? This action can't be undone.", failedNewContact: 'Failed to add this contact method.', genericFailureMessages: { requestContactMethodValidateCode: 'Failed to send a new magic code. Please wait a bit and try again.', @@ -877,7 +876,7 @@ export default { deleteContactMethod: 'Failed to delete contact method. Please reach out to Concierge for help.', setDefaultContactMethod: 'Failed to set a new default contact method. Please reach out to Concierge for help.', addContactMethod: 'Failed to add this contact method. Please reach out to Concierge for help.', - enteredMethodIsAlreadySubmited: 'The Entered Contact Method already exists.', + enteredMethodIsAlreadySubmited: 'This contact method already exists.', passwordRequired: 'password required.', contactMethodRequired: 'Contact method is required.', invalidContactMethod: 'Invalid contact method', @@ -923,7 +922,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: 'The New Expensify App 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', @@ -977,7 +976,7 @@ export default { security: 'Security', signOut: 'Sign out', restoreStashed: 'Restore stashed login', - signOutConfirmationText: "You'll lose any offline changes if you sign-out.", + signOutConfirmationText: "You'll lose any offline changes if you sign out.", versionLetter: 'v', readTheTermsAndPrivacy: { phrase1: 'Read the', @@ -997,7 +996,7 @@ export default { enterMessageHere: 'Enter message here', closeAccountWarning: 'Closing your account cannot be undone.', closeAccountPermanentlyDeleteData: 'Are you sure you want to delete your account? This will permanently delete any outstanding expenses.', - enterDefaultContactToConfirm: 'Please type your default contact method to confirm you wish to close your account. Your default contact method is:', + enterDefaultContactToConfirm: 'Please enter your default contact method to confirm you wish to close your account. Your default contact method is:', enterDefaultContact: 'Enter your default contact method', defaultContact: 'Default contact method:', enterYourDefaultContactMethod: 'Please enter your default contact method to close your account.', @@ -1007,7 +1006,7 @@ export default { changingYourPasswordPrompt: 'Changing your password will update your password for both your Expensify.com and New Expensify accounts.', currentPassword: 'Current password', newPassword: 'New password', - newPasswordPrompt: 'New password must be different than your old password, have at least 8 characters, 1 capital letter, 1 lowercase letter, and 1 number.', + newPasswordPrompt: 'Your new password must be different from your old password and contain at least 8 characters, 1 capital letter, 1 lowercase letter, and 1 number.', }, twoFactorAuth: { headerTitle: 'Two-factor authentication', @@ -1020,13 +1019,13 @@ export default { stepCodes: 'Recovery codes', keepCodesSafe: 'Keep these recovery codes safe!', codesLoseAccess: - 'If you lose access to your authenticator app and don’t have these codes, you will lose access to your account. \n\nNote: Setting up two-factor authentication will log you out of all other active sessions.', + "If you lose access to your authenticator app and don’t have these codes, you'll lose access to your account. \n\nNote: Setting up two-factor authentication will log you out of all other active sessions.", errorStepCodes: 'Please copy or download codes before continuing.', stepVerify: 'Verify', scanCode: 'Scan the QR code using your', authenticatorApp: 'authenticator app', addKey: 'Or add this secret key to your authenticator app:', - enterCode: 'Then enter the six digit code generated from your authenticator app.', + enterCode: 'Then enter the six-digit code generated from your authenticator app.', stepSuccess: 'Finished', enabled: 'Two-factor authentication is now enabled!', congrats: 'Congrats, now you’ve got that extra security.', @@ -1061,6 +1060,18 @@ export default { genericFailureMessage: "Private notes couldn't be saved.", }, }, + billingCurrency: { + error: { + securityCode: 'Please enter a valid security code.', + }, + securityCode: 'Security code', + changeBillingCurrency: 'Change billing currency', + changePaymentCurrency: 'Change payment currency', + paymentCurrency: 'Payment currency', + note: 'Note: Changing your payment currency can impact how much you’ll pay for Expensify. Refer to our', + noteLink: 'pricing page', + noteDetails: 'for full details.', + }, addDebitCardPage: { addADebitCard: 'Add a debit card', nameOnCard: 'Name on card', @@ -1077,10 +1088,10 @@ export default { debitCardNumber: 'Please enter a valid debit card number.', expirationDate: 'Please select a valid expiration date.', securityCode: 'Please enter a valid security code.', - addressStreet: 'Please enter a valid billing address that is not a PO Box.', + addressStreet: "Please enter a valid billing address that's not a PO box.", addressState: 'Please select a state.', addressCity: 'Please enter a city.', - genericFailureMessage: 'An error occurred while adding your card, please try again.', + genericFailureMessage: 'An error occurred while adding your card. Please try again.', password: 'Please enter your Expensify password.', }, }, @@ -1100,10 +1111,10 @@ export default { paymentCardNumber: 'Please enter a valid card number.', expirationDate: 'Please select a valid expiration date.', securityCode: 'Please enter a valid security code.', - addressStreet: 'Please enter a valid billing address that is not a PO Box.', + addressStreet: "Please enter a valid billing address that's not a PO box.", addressState: 'Please select a state.', addressCity: 'Please enter a city.', - genericFailureMessage: 'An error occurred while adding your card, please try again.', + genericFailureMessage: 'An error occurred while adding your card. Please try again.', password: 'Please enter your Expensify password.', }, }, @@ -1112,7 +1123,7 @@ export default { setDefaultConfirmation: 'Make default payment method', setDefaultSuccess: 'Default payment method set!', deleteAccount: 'Delete account', - deleteConfirmation: 'Are you sure that you want to delete this account?', + deleteConfirmation: 'Are you sure you want to delete this account?', error: { notOwnerOfBankAccount: 'There was an error setting this bank account as your default payment method.', invalidBankAccount: 'This bank account is temporarily suspended.', @@ -1135,13 +1146,13 @@ export default { assignedCards: 'Assigned cards', assignedCardsDescription: 'These are cards assigned by a workspace admin to manage company spend.', expensifyCard: 'Expensify Card', - walletActivationPending: "We're reviewing your information, please check back in a few minutes!", - walletActivationFailed: 'Unfortunately your wallet cannot be enabled at this time. Please chat with Concierge for further assistance.', - addYourBankAccount: 'Add your bank account.', + walletActivationPending: "We're reviewing your information. Please check back in a few minutes!", + walletActivationFailed: "Unfortunately, your wallet can't be enabled at this time. Please chat with Concierge for further assistance.", + addYourBankAccount: 'Add your bank account', addBankAccountBody: "Let's connect your bank account to Expensify so it’s easier than ever to send and receive payments directly in the app.", - chooseYourBankAccount: 'Choose your bank account.', + chooseYourBankAccount: 'Choose your bank account', chooseAccountBody: 'Make sure that you select the right one.', - confirmYourBankAccount: 'Confirm your bank account.', + confirmYourBankAccount: 'Confirm your bank account', }, cardPage: { expensifyCard: 'Expensify Card', @@ -1164,7 +1175,7 @@ export default { reportFraud: 'Report virtual card fraud', reviewTransaction: 'Review transaction', suspiciousBannerTitle: 'Suspicious transaction', - suspiciousBannerDescription: 'We noticed suspicious transaction on your card. Tap below to review.', + suspiciousBannerDescription: 'We noticed suspicious transactions on your card. Tap below to review.', cardLocked: "Your card is temporarily locked while our team reviews your company's account.", cardDetails: { cardNumber: 'Virtual card number', @@ -1211,12 +1222,12 @@ export default { }, }, workflowsDelayedSubmissionPage: { - autoReportingErrorMessage: 'The delayed submission parameter could not be changed. Please try again or contact support.', - autoReportingFrequencyErrorMessage: 'The submission frequency could not be changed. Please try again or contact support.', - monthlyOffsetErrorMessage: 'The monthly frequency could not be changed. Please try again or contact support.', + autoReportingErrorMessage: "Delayed submission couldn't be changed. Please try again or contact support.", + autoReportingFrequencyErrorMessage: "Submission frequency couldn't be changed. Please try again or contact support.", + monthlyOffsetErrorMessage: "Monthly frequency couldn't be changed. Please try again or contact support.", }, workflowsApprovalPage: { - genericErrorMessage: 'The approver could not be changed. Please try again or contact support.', + genericErrorMessage: "The approver couldn't be changed. Please try again or contact support.", }, workflowsPayerPage: { title: 'Authorized payer', @@ -1301,7 +1312,7 @@ export default { }, priorityModePage: { priorityMode: 'Priority mode', - explainerText: 'Choose whether to show all chats by default sorted with most recent with pinned items at the top, or #focus on unread pinned items, sorted alphabetically.', + explainerText: 'Choose whether to #focus on unread and pinned chats only, or show everything with the most recent and pinned chats at the top.', priorityModes: { default: { label: 'Most recent', @@ -1402,7 +1413,7 @@ export default { error: { invalidFormatEmailLogin: 'The email entered is invalid. Please fix the format and try again.', }, - cannotGetAccountDetails: "Couldn't retrieve account details, please try to sign in again.", + cannotGetAccountDetails: "Couldn't retrieve account details. Please try to sign in again.", loginForm: 'Login form', notYou: ({user}: NotYouParams) => `Not ${user}?`, }, @@ -1627,7 +1638,7 @@ 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}`, }, @@ -1646,24 +1657,24 @@ export default { originalDocumentNeeded: 'Please upload an original image of your ID rather than a screenshot or scanned image.', documentNeedsBetterQuality: 'Your ID appears to be damaged or has missing security features. Please upload an original image of an undamaged ID that is entirely visible.', imageNeedsBetterQuality: "There's an issue with the image quality of your ID. Please upload a new image where your entire ID can be seen clearly.", - selfieIssue: "There's an issue with your selfie/video. Please upload a new selfie/video in real time.", + selfieIssue: "There's an issue with your selfie/video. Please upload a live selfie/video.", selfieNotMatching: "Your selfie/video doesn't match your ID. Please upload a new selfie/video where your face can be clearly seen.", selfieNotLive: "Your selfie/video doesn't appear to be a live photo/video. Please upload a live selfie/video.", }, additionalDetailsStep: { headerTitle: 'Additional details', - 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.', + helpText: 'We need to confirm the following information before you can send and receive money with your wallet.', + helpTextIdologyQuestions: 'Just a few more questions to finish verifying 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.', + 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.', - failedKYCTextBefore: "We weren't able to successfully verify your identity. Please try again later and reach out to ", + failedKYCTextBefore: "We weren't able to verify your identity. Please try again later or reach out to ", failedKYCTextAfter: ' if you have any questions.', }, termsStep: { @@ -1697,7 +1708,7 @@ export default { weChargeOneFee: 'We charge one type of fee.', fdicInsurance: 'Your funds are eligible for FDIC insurance.', generalInfo: 'For general information about prepaid accounts, visit', - conditionsDetails: 'Find details and conditions for all fees and services by visiting', + conditionsDetails: 'For details and conditions for all fees and services, visit', conditionsPhone: 'or calling +1 833-400-0904.', instant: '(instant)', electronicFundsInstantFeeMin: ({amount}: TermsParams) => `(min ${amount})`, @@ -1708,19 +1719,19 @@ export default { feeAmountHeader: 'Fee amount', moreDetailsHeader: 'More details', openingAccountTitle: 'Opening an account', - openingAccountDetails: 'There is no fee to open an account.', - monthlyFeeDetails: 'There is no monthly fee.', + openingAccountDetails: "There's no fee to open an account.", + monthlyFeeDetails: "There's no monthly fee.", customerServiceTitle: 'Customer service', customerServiceDetails: 'There are no customer service fees.', - inactivityDetails: 'There is no inactivity fee.', + inactivityDetails: "There's no inactivity fee.", sendingFundsTitle: 'Sending funds to another account holder', - sendingFundsDetails: 'There is no fee to send funds to another account holder using your balance, bank account, or debit card.', + sendingFundsDetails: "There's no fee to send funds to another account holder using your balance, bank account, or debit card.", electronicFundsStandardDetails: - 'There is no fee to transfer funds from your Expensify Wallet ' + + "There's no fee to transfer funds from your Expensify Wallet " + 'to your bank account using the standard option. This transfer usually completes within 1-3 business' + ' days.', electronicFundsInstantDetails: ({percentage, amount}: ElectronicFundsParams) => - 'There is a fee to transfer funds from your Expensify Wallet to ' + + "There's a fee to transfer funds from your Expensify Wallet to " + 'your linked debit card using the instant transfer option. This transfer usually completes within ' + `several minutes. The fee is ${percentage}% of the transfer amount (with a minimum fee of ${amount}).`, fdicInsuranceBancorp: ({amount}: TermsParams) => @@ -1734,7 +1745,7 @@ export default { generalInformation2: 'If you have a complaint about a prepaid account, call the Consumer Financial Protection Bureau at 1-855-411-2372 or visit', printerFriendlyView: 'View printer-friendly version', automated: 'Automated', - liveAgent: 'Live Agent', + liveAgent: 'Live agent', instant: 'Instant', electronicFundsInstantFeeMin: ({amount}: TermsParams) => `Min ${amount}`, }, @@ -1778,18 +1789,18 @@ export default { }, personalInfoStep: { personalInfo: 'Personal info', - enterYourLegalFirstAndLast: 'Enter your legal first and last name.', + enterYourLegalFirstAndLast: "What's your legal name?", legalFirstName: 'Legal first name', legalLastName: 'Legal last name', legalName: 'Legal name', - enterYourDateOfBirth: 'Enter your date of birth.', - enterTheLast4: 'Enter the last 4 of your SSN.', + enterYourDateOfBirth: "What's your date of birth?", + enterTheLast4: 'What are the last four digits of your Social Security Number?', dontWorry: "Don't worry, we don't do any personal credit checks!", - last4SSN: 'Last 4 Social Security Number', - enterYourAddress: 'Enter your address.', + last4SSN: 'Last 4 of SSN', + enterYourAddress: "What's your address?", address: 'Address', letsDoubleCheck: "Let's double check that everything looks right.", - byAddingThisBankAccount: 'By adding this bank account, you confirm that you have read, understand and accept', + byAddingThisBankAccount: "By adding this bank account, you confirm that you've read, understand, and accept", whatsYourLegalName: 'What’s your legal name?', whatsYourDOB: 'What’s your date of birth?', whatsYourAddress: 'What’s your address?', @@ -1800,17 +1811,17 @@ export default { weNeedThisToVerify: 'We need this to verify your wallet.', }, businessInfoStep: { - businessInfo: 'Business info', - enterTheNameOfYourBusiness: 'Enter the name of your business.', - businessName: 'Legal business name', - enterYourCompanysTaxIdNumber: 'Enter your company’s Tax ID number.', + businessInfo: 'Company info', + enterTheNameOfYourBusiness: "What's the name of your company?", + businessName: 'Legal company name', + enterYourCompanysTaxIdNumber: "What's your company’s Tax ID number?", taxIDNumber: 'Tax ID number', taxIDNumberPlaceholder: '9 digits', - enterYourCompanysWebsite: 'Enter your company’s website.', + enterYourCompanysWebsite: "What's your company’s website?", companyWebsite: 'Company website', - enterYourCompanysPhoneNumber: 'Enter your company’s phone number.', - enterYourCompanysAddress: 'Enter your company’s address.', - selectYourCompanysType: 'Select your company’s type.', + enterYourCompanysPhoneNumber: "What's your company’s phone number?", + enterYourCompanysAddress: "What's your company’s address?", + selectYourCompanysType: 'What type of company is it?', companyType: 'Company type', incorporationType: { LLC: 'LLC', @@ -1820,11 +1831,11 @@ export default { SOLE_PROPRIETORSHIP: 'Sole proprietorship', OTHER: 'Other', }, - selectYourCompanysIncorporationDate: 'Select your company’s incorporation date.', + selectYourCompanysIncorporationDate: "What's your company’s incorporation date?", incorporationDate: 'Incorporation date', incorporationDatePlaceholder: 'Start date (yyyy-mm-dd)', incorporationState: 'Incorporation state', - pleaseSelectTheStateYourCompanyWasIncorporatedIn: 'Please select the state your company was incorporated in.', + pleaseSelectTheStateYourCompanyWasIncorporatedIn: 'Which state was your company incorporated in?', letsDoubleCheck: "Let's double check that everything looks right.", companyAddress: 'Company address', listOfRestrictedBusinesses: 'list of restricted businesses', @@ -1834,36 +1845,35 @@ 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.', + regulationRequiresUsToVerifyTheIdentity: 'Regulation requires us to verify the identity of any individual who owns more than 25% of the company.', companyOwner: 'Company owner', - enterLegalFirstAndLastName: 'Enter the legal first and last name of the owner.', + enterLegalFirstAndLastName: "What's the owner's legal name?", legalFirstName: 'Legal first name', legalLastName: 'Legal last name', - enterTheDateOfBirthOfTheOwner: 'Enter the date of birth of the owner.', - enterTheLast4: 'Enter the last 4 of the owner’s SSN.', - last4SSN: 'Last 4 Social Security Number', + enterTheDateOfBirthOfTheOwner: "What's the owner's date of birth?", + enterTheLast4: 'What are the last 4 digits of the owner’s Social Security Number?', + last4SSN: 'Last 4 of SSN', dontWorry: "Don't worry, we don't do any personal credit checks!", - enterTheOwnersAddress: 'Enter the owner’s address.', + enterTheOwnersAddress: "What's the owner's address?", letsDoubleCheck: 'Let’s double check that everything looks right.', legalName: 'Legal name', address: 'Address', - byAddingThisBankAccount: 'By adding this bank account, you confirm that you have read, understand and accept', + byAddingThisBankAccount: "By adding this bank account, you confirm that you've read, understand, and accept", owners: 'Owners', }, validationStep: { - headerTitle: 'Validate Bank Account', + headerTitle: 'Validate bank account', buttonText: 'Finish setup', maxAttemptsReached: 'Validation for this bank account has been disabled due to too many incorrect attempts.', - description: 'A day or two after you add your account to Expensify we send three (3) transactions to your account. They have a merchant line like "Expensify, Inc. Validation".', + description: `Within 1-2 business days, we'll send three (3) small transactions to your bank account from a name like "Expensify, Inc. Validation".`, descriptionCTA: 'Please enter each transaction amount in the fields below. Example: 1.51.', reviewingInfo: "Thanks! We're reviewing your information, and will be in touch shortly. Please check your chat with Concierge ", forNextStep: ' for next steps to finish setting up your bank account.', letsChatCTA: "Yes, let's chat", - letsChatText: 'Thanks for doing that. We need your help verifying a few pieces of information, but we can work this out quickly over chat. Ready?', + letsChatText: 'Almost there! We need your help verifying a few last bits of information over chat. Ready?', letsChatTitle: "Let's chat!", - enable2FATitle: 'Prevent fraud, enable two-factor authentication!', - enable2FAText: - 'We take your security seriously, so please set up two-factor authentication for your account now. That will allow us to dispute Expensify Card digital transactions, and will reduce your risk for fraud.', + enable2FATitle: 'Prevent fraud, enable two-factor authentication (2FA)', + enable2FAText: 'We take your security seriously. Please set up 2FA now to add an extra layer of protection to your account.', secureYourAccount: 'Secure your account', }, beneficialOwnersStep: { @@ -1885,7 +1895,7 @@ export default { completeVerification: 'Complete verification', 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', + certifyTrueAndAccurateError: 'Please certify that the information is true and accurate', isAuthorizedToUseBankAccount: 'I am authorized to use my company bank account for business spend', isAuthorizedToUseBankAccountError: 'You must be a controlling officer with authorization to operate the business bank account.', termsAndConditions: 'terms and conditions', @@ -1897,21 +1907,20 @@ export default { validateButtonText: 'Validate', validationInputLabel: 'Transaction', maxAttemptsReached: 'Validation for this bank account has been disabled due to too many incorrect attempts.', - description: 'A day or two after you add your account to Expensify we send three (3) transactions to your account. They have a merchant line like "Expensify, Inc. Validation".', + description: `Within 1-2 business days, we'll send three (3) small transactions to your bank account from a name like "Expensify, Inc. Validation".`, descriptionCTA: 'Please enter each transaction amount in the fields below. Example: 1.51.', - reviewingInfo: "Thanks! We're reviewing your information, and will be in touch shortly. Please check your chat with Concierge ", + reviewingInfo: "Thanks! We're reviewing your information and will be in touch shortly. Please check your chat with Concierge ", forNextSteps: ' for next steps to finish setting up your bank account.', letsChatCTA: "Yes, let's chat", - letsChatText: 'Thanks for doing that. We need your help verifying a few pieces of information, but we can work this out quickly over chat. Ready?', + letsChatText: 'Almost there! We need your help verifying a few last bits of information over chat. Ready?', letsChatTitle: "Let's chat!", - enable2FATitle: 'Prevent fraud, enable two-factor authentication!', - enable2FAText: - 'We take your security seriously, so please set up two-factor authentication for your account now. That will allow us to dispute Expensify Card digital transactions, and will reduce your risk for fraud.', + enable2FATitle: 'Prevent fraud, enable two-factor authentication (2FA)', + enable2FAText: 'We take your security seriously. Please set up 2FA now to add an extra layer of protection to your account.', secureYourAccount: 'Secure your account', }, reimbursementAccountLoadingAnimation: { oneMoment: 'One moment', - explanationLine: 'We’re taking a look at your information. You will be able to continue with next steps shortly.', + explanationLine: "We’re taking a look at your information. You'll be able to continue with next steps shortly.", }, session: { offlineMessageRetry: "Looks like you're offline. Please check your connection and try again.", @@ -1979,14 +1988,14 @@ export default { settlementFrequency: 'Settlement frequency', deleteConfirmation: 'Are you sure you want to delete this workspace?', unavailable: 'Unavailable workspace', - memberNotFound: 'Member not found. To invite a new member to the workspace, please use the Invite button above.', - notAuthorized: `You do not have access to this page. Are you trying to join the workspace? Please reach out to the owner of this workspace so they can add you as a member! Something else? Reach out to ${CONST.EMAIL.CONCIERGE}`, + memberNotFound: 'Member not found. To invite a new member to the workspace, please use the invite button above.', + notAuthorized: `You don't have access to this page. If you're trying to join this workspace, just ask the workspace owner to add you as a member. Something else? Reach out to ${CONST.EMAIL.CONCIERGE}.`, goToRoom: ({roomName}: GoToRoomParams) => `Go to ${roomName} room`, workspaceName: 'Workspace name', workspaceOwner: 'Owner', workspaceType: 'Workspace type', workspaceAvatar: 'Workspace avatar', - mustBeOnlineToViewMembers: 'You must be online in order to view members of this workspace.', + mustBeOnlineToViewMembers: 'You need to be online in order to view members of this workspace.', moreFeatures: 'More features', requested: 'Requested', distanceRates: 'Distance rates', @@ -2042,7 +2051,7 @@ export default { }, receivable: 'Accounts receivable', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS. archive: 'Accounts receivable archive', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS. - exportInvoicesDescription: 'Invoices will export to this account in QuickBooks Online.', + exportInvoicesDescription: 'Use this account when exporting invoices to QuickBooks Online.', exportCompanyCardsDescription: 'Set how company card purchases export to QuickBooks Online.', vendor: 'Vendor', defaultVendor: 'Default vendor', @@ -2156,7 +2165,7 @@ export default { }, exportDate: { label: 'Export date', - description: 'Use this date when exporting reports to Xero.', + description: 'Use this date when exporting purchase bills to Xero.', values: { [CONST.QUICKBOOKS_EXPORT_DATE.LAST_EXPENSE]: { label: 'Date of last expense', @@ -2174,7 +2183,7 @@ export default { }, invoiceStatus: { label: 'Purchase bill status', - description: 'Choose a status for purchase bills exported to Xero.', + description: 'Use this status when exporting purchase bills to Xero.', values: { [CONST.XERO_CONFIG.INVOICE_STATUS.DRAFT]: 'Draft', [CONST.XERO_CONFIG.INVOICE_STATUS.AWAITING_APPROVAL]: 'Awaiting approval', @@ -2376,25 +2385,25 @@ export default { selectAll: 'Select all', error: { genericAdd: 'There was a problem adding this workspace member.', - cannotRemove: 'You cannot remove yourself or the workspace owner.', + cannotRemove: "You can't remove yourself or the workspace owner.", genericRemove: 'There was a problem removing that workspace member.', }, - addedWithPrimary: 'Some users were added with their primary logins.', + addedWithPrimary: 'Some members were added with their primary logins.', invitedBySecondaryLogin: ({secondaryLogin}) => `Added by secondary login ${secondaryLogin}.`, membersListTitle: 'Directory of all workspace members.', }, card: { header: 'Unlock free Expensify Cards', headerWithEcard: 'Cards are ready!', - noVBACopy: 'Connect a bank account to issue Expensify Cards to your workspace members, and access these incredible benefits and more:', - VBANoECardCopy: 'Add a work email address to issue unlimited Expensify Cards for your workspace members, as well as all of these incredible benefits:', + noVBACopy: 'Connect a bank account to issue Expensify Cards to your workspace members and access exclusive benefits like:', + VBANoECardCopy: 'Add a work email to issue unlimited Expensify Cards to your workspace members and enjoy exclusive benefits like:', VBAWithECardCopy: 'Access these incredible benefits and more:', benefit1: 'Cash back on every US purchase', - benefit2: 'Digital and physical cards', + benefit2: 'Unlimited virtual and physical cards', benefit3: 'No personal liability', - benefit4: 'Customizable limits', + benefit4: 'Customizable limits and spend controls', addWorkEmail: 'Add work email address', - checkingDomain: 'Hang tight! We are still working on enabling your Expensify Cards. Check back here in a few minutes.', + checkingDomain: "Hang tight! We're still working on enabling your Expensify Cards. Check back here in a few minutes.", }, reimburse: { captureReceipts: 'Capture receipts', @@ -2408,10 +2417,10 @@ export default { trackDistanceChooseUnit: 'Choose a default unit to track.', unlockNextDayReimbursements: 'Unlock next-day reimbursements', captureNoVBACopyBeforeEmail: 'Ask your workspace members to forward receipts to ', - captureNoVBACopyAfterEmail: ' and download the Expensify App to track cash expenses on the go.', - unlockNoVBACopy: 'Connect a bank account to reimburse your workspace members online.', + captureNoVBACopyAfterEmail: ' and download the Expensify app to track expenses on the go.', + unlockNoVBACopy: 'Connect a bank account to reimburse your workspace members quickly and easily.', fastReimbursementsVBACopy: "You're all set to reimburse receipts from your bank account!", - updateCustomUnitError: "Your changes couldn't be saved. The workspace was modified while you were offline, please try again.", + updateCustomUnitError: "Your changes couldn't be saved because the workspace was modified while you were offline. Please try again.", invalidRateError: 'Please enter a valid rate.', lowRateError: 'Rate must be greater than 0.', }, @@ -2456,14 +2465,14 @@ export default { taxes: 'Taxes', imported: 'Imported', notImported: 'Not imported', - importAsCategory: 'Imported, displayed as categories', + importAsCategory: 'Imported as categories', importTypes: { [CONST.INTEGRATION_ENTITY_MAP_TYPES.IMPORTED]: 'Imported', - [CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG]: 'Imported, displayed as tags', + [CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG]: 'Imported as tags', [CONST.INTEGRATION_ENTITY_MAP_TYPES.DEFAULT]: 'Imported', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NOT_IMPORTED]: 'Not imported', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE]: 'Not imported', - [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Imported, displayed as report fields', + [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Imported as report fields', }, disconnectPrompt: (integrationToConnect?: ConnectionName, currentIntegration?: ConnectionName): string => { switch (integrationToConnect) { @@ -2595,10 +2604,10 @@ export default { }, invoices: { invoiceClientsAndCustomers: 'Invoice clients and customers', - invoiceFirstSectionCopy: 'Send beautiful, professional invoices directly to your clients and customers right from within the Expensify app.', + invoiceFirstSectionCopy: 'Send beautiful, professional invoices directly to your clients and customers right from the Expensify app.', viewAllInvoices: 'View all invoices', unlockOnlineInvoiceCollection: 'Unlock online invoice collection', - unlockNoVBACopy: 'Connect your bank account to accept online payments for invoices - by ACH or credit card - to be deposited straight into your account.', + unlockNoVBACopy: 'Connect your bank account to accept online invoice payments by ACH or credit card.', moneyBackInAFlash: 'Money back, in a flash!', unlockVBACopy: "You're all set to accept payments by ACH or credit card!", viewUnpaidInvoices: 'View unpaid invoices', @@ -2624,7 +2633,7 @@ export default { member: 'Invite member', members: 'Invite members', invitePeople: 'Invite new members', - genericFailureMessage: 'An error occurred inviting the user to the workspace, please try again.', + genericFailureMessage: 'An error occurred inviting the member to the workspace. Please try again.', pleaseEnterValidLogin: `Please ensure the email or phone number is valid (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`, user: 'user', users: 'users', @@ -2638,14 +2647,14 @@ export default { inviteMessageTitle: 'Add message', inviteMessagePrompt: 'Make your invitation extra special by adding a message below', personalMessagePrompt: 'Message', - genericFailureMessage: 'An error occurred inviting the user to the workspace, please try again.', + genericFailureMessage: 'An error occurred inviting the member to the workspace. Please try again.', inviteNoMembersError: 'Please select at least one member to invite.', }, distanceRates: { oopsNotSoFast: 'Oops! Not so fast...', workspaceNeeds: 'A workspace needs at least one enabled distance rate.', distance: 'Distance', - centrallyManage: 'Centrally manage rates, choose to track in miles or kilometers, and set a default category.', + centrallyManage: 'Centrally manage rates, track in miles or kilometers, and set a default category.', rate: 'Rate', addRate: 'Add rate', trackTax: 'Track tax', @@ -2664,27 +2673,26 @@ export default { editor: { descriptionInputLabel: 'Description', nameInputLabel: 'Name', - nameInputHelpText: 'This is the name you will see on your workspace.', - nameIsRequiredError: 'You need to define a name for your workspace.', + nameInputHelpText: "This is the name you'll see on your workspace.", + nameIsRequiredError: "You'll need to give your workspace a name.", currencyInputLabel: 'Default currency', currencyInputHelpText: 'All expenses on this workspace will be converted to this currency.', currencyInputDisabledText: "The default currency can't be changed because this workspace is linked to a USD bank account.", save: 'Save', - genericFailureMessage: 'An error occurred updating the workspace, please try again.', - avatarUploadFailureMessage: 'An error occurred uploading the avatar, please try again.', - addressContext: 'A workspace address is required to enable Expensify Travel. Please enter an address associated with your business.', + genericFailureMessage: 'An error occurred updating the workspace. Please try again.', + avatarUploadFailureMessage: 'An error occurred uploading the avatar. Please try again.', + addressContext: 'A Workspace Address is required to enable Expensify Travel. Please enter an address associated with your business.', }, bankAccount: { continueWithSetup: 'Continue with setup', - youreAlmostDone: - "You're almost done setting up your bank account, which will let you issue corporate cards, reimburse expenses, collect invoices, and pay bills all from the same bank account.", + youreAlmostDone: "You're almost done setting up your bank account, which will let you issue corporate cards, reimburse expenses, collect invoices, and pay bills.", streamlinePayments: 'Streamline payments', oneMoreThing: 'One more thing!', allSet: "You're all set!", accountDescriptionNoCards: - 'This bank account will be used to reimburse expenses, collect invoices, and pay bills all from the same account.\n\nPlease add a work email address as a secondary login to enable the Expensify Card.', - accountDescriptionWithCards: 'This bank account will be used to issue corporate cards, reimburse expenses, collect invoices, and pay bills all from the same account.', - addWorkEmail: 'Add work email address', + 'This bank account will be used to reimburse expenses, collect invoices, and pay bills.\n\nPlease add a work email as a secondary login to enable the Expensify Card.', + accountDescriptionWithCards: 'This bank account will be used to issue corporate cards, reimburse expenses, collect invoices, and pay bills.', + addWorkEmail: 'Add work email', letsFinishInChat: "Let's finish in chat!", almostDone: 'Almost done!', disconnectBankAccount: 'Disconnect bank account', @@ -2694,7 +2702,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 any progress you've made.", 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.', @@ -2716,7 +2724,7 @@ export default { addPaymentCardSecurity: 'security', amountOwedTitle: 'Outstanding balance', amountOwedButtonText: 'OK', - amountOwedText: 'This account has an outstanding balance from a previous month.\n\nDo you want to clear balance and take over billing of this workspace?', + amountOwedText: 'This account has an outstanding balance from a previous month.\n\nDo you want to clear the balance and take over billing of this workspace?', ownerOwesAmountTitle: 'Outstanding balance', ownerOwesAmountButtonText: 'Transfer balance', ownerOwesAmountText: ({email, amount}) => @@ -2724,7 +2732,7 @@ export default { subscriptionTitle: 'Take over annual subscription', subscriptionButtonText: 'Transfer subscription', subscriptionText: ({usersCount, finalCount}) => - `Taking over this workspace will merge its associated annual subscription with your current subscription. This will increase your subscription size by ${usersCount} users making your new subscription size ${finalCount}. Would you like to continue?`, + `Taking over this workspace will merge its annual subscription with your current subscription. This will increase your subscription size by ${usersCount} members making your new subscription size ${finalCount}. Would you like to continue?`, duplicateSubscriptionTitle: 'Duplicate subscription alert', duplicateSubscriptionButtonText: 'Continue', duplicateSubscriptionText: ({email, workspaceName}) => @@ -2732,7 +2740,7 @@ export default { hasFailedSettlementsTitle: 'Cannot transfer ownership', hasFailedSettlementsButtonText: 'Got it', hasFailedSettlementsText: ({email}) => - `You cannot take over billing because ${email} has an overdue expensify Expensify Card settlement. Please advise them to reach out to concierge@expensify.com to resolve the issue. Then, you can take over billing for this workspace.`, + `You can't take over billing because ${email} has an overdue expensify Expensify Card settlement. Please ask them to reach out to concierge@expensify.com to resolve the issue. Then, you can take over billing for this workspace.`, failedToClearBalanceTitle: 'Failed to clear balance', failedToClearBalanceButtonText: 'OK', failedToClearBalanceText: 'We were unable to clear the balance. Please try again later.', @@ -2793,14 +2801,14 @@ export default { createRoom: 'Create room', roomAlreadyExistsError: 'A room with this name already exists.', roomNameReservedError: ({reservedName}: RoomNameReservedErrorParams) => `${reservedName} is a default room on all workspaces. Please choose another name.`, - roomNameInvalidError: 'Room names can only include lowercase letters, numbers and hyphens.', + roomNameInvalidError: 'Room names can only include lowercase letters, numbers, and hyphens.', pleaseEnterRoomName: 'Please enter a room name.', pleaseSelectWorkspace: 'Please select a workspace.', renamedRoomAction: ({oldName, newName}: RenamedRoomActionParams) => ` renamed this room from ${oldName} to ${newName}`, roomRenamedTo: ({newName}: RoomRenamedToParams) => `Room renamed to ${newName}`, social: 'social', selectAWorkspace: 'Select a workspace', - growlMessageOnRenameError: 'Unable to rename policy room, please check your connection and try again.', + growlMessageOnRenameError: 'Unable to rename workspace room. Please check your connection and try again.', visibilityOptions: { restricted: 'Workspace', // the translation for "restricted" visibility is actually workspace. This is so we can display restricted visibility rooms as "workspace" without having to change what's stored. private: 'Private', @@ -2810,8 +2818,8 @@ export default { }, }, roomMembersPage: { - memberNotFound: 'Member not found. To invite a new member to the room, please use the Invite button above.', - notAuthorized: `You do not have access to this page. Are you trying to join the room? Please reach out to a member of this room so they can add you as a member! Something else? Reach out to ${CONST.EMAIL.CONCIERGE}`, + memberNotFound: 'Member not found. To invite a new member to the room, please use the invite button above.', + notAuthorized: `You don't have access to this page. If you're trying to join this room, just ask a room member to add you. Something else? Reach out to ${CONST.EMAIL.CONCIERGE}`, removeMembersPrompt: 'Are you sure you want to remove the selected members from the room?', error: { genericAdd: 'There was a problem adding this room member.', @@ -2838,18 +2846,18 @@ export default { completed: 'marked as complete', canceled: 'deleted task', reopened: 'marked as incomplete', - error: 'You do not have the permission to do the requested action.', + error: "You don't have permission to take the requested action.", }, markAsComplete: 'Mark as complete', markAsIncomplete: 'Mark as incomplete', - assigneeError: 'There was an error assigning this task, please try another assignee.', - genericCreateTaskFailureMessage: 'Unexpected error create task, please try again later.', + assigneeError: 'There was an error assigning this task. Please try another assignee.', + genericCreateTaskFailureMessage: 'There was an error creating this task. Please try again later.', deleteTask: 'Delete task', - deleteConfirmation: 'Are you sure that you want to delete this task?', + deleteConfirmation: 'Are you sure you want to delete this task?', }, statementPage: { title: (year, monthName) => `${monthName} ${year} statement`, - generatingPDF: "We're generating your PDF right now. Please come back later!", + generatingPDF: "We're generating your PDF right now. Please check back soon!", }, keyboardShortcutsPage: { title: 'Keyboard shortcuts', @@ -2880,7 +2888,7 @@ export default { genericErrorPage: { title: 'Uh-oh, something went wrong!', body: { - helpTextMobile: 'Please try closing and reopening the app or switching to', + helpTextMobile: 'Please close and reopen the app, or switch to', helpTextWeb: 'web.', helpTextConcierge: 'If the problem persists, reach out to', }, @@ -2893,12 +2901,12 @@ export default { qrMessage: 'Check your photos or downloads folder for a copy of your QR code. Protip: Add it to a presentation for your audience to scan and connect with you directly.', }, generalError: { - title: 'Attachment Error', - message: 'Attachment cannot be downloaded.', + title: 'Attachment error', + message: "Attachment can't be downloaded.", }, permissionError: { title: 'Storage access', - message: "Expensify can't save attachments without storage access. Tap Settings to update permissions.", + message: "Expensify can't save attachments without storage access. Tap settings to update permissions.", }, }, desktopApplicationMenu: { @@ -2954,26 +2962,26 @@ export default { }, checkForUpdatesModal: { available: { - title: 'Update Available', + title: 'Update available', message: ({isSilentUpdating}: {isSilentUpdating: boolean}) => `The new version will be available shortly.${!isSilentUpdating ? " We'll notify you when we're ready to update." : ''}`, soundsGood: 'Sounds good', }, notAvailable: { - title: 'Update Not Available', - message: 'There is no update available as of now! Check again at a later time.', + title: 'Update unavailable', + message: "There's no update available right now. Please check back later!", okay: 'Okay', }, error: { - title: 'Update Check Failed.', - message: "We couldn't look for an update. Please check again in a bit!.", + title: 'Update check failed.', + message: "We couldn't check for an update. Please try again in a bit.", }, }, report: { - genericCreateReportFailureMessage: 'Unexpected error creating this chat, please try again later.', - genericAddCommentFailureMessage: 'Unexpected error while posting the comment, please try again later.', - genericUpdateReportFieldFailureMessage: 'Unexpected error while updating the field, please try again later.', - genericUpdateReporNameEditFailureMessage: 'Unexpected error while renaming the report, please try again later.', + genericCreateReportFailureMessage: 'Unexpected error creating this chat. Please try again later.', + genericAddCommentFailureMessage: 'Unexpected error posting the comment. Please try again later.', + genericUpdateReportFieldFailureMessage: 'Unexpected error updating the field. Please try again later.', + genericUpdateReporNameEditFailureMessage: 'Unexpected error renaming the report. Please try again later.', noActivityYet: 'No activity yet', }, chronos: { @@ -3133,8 +3141,8 @@ export default { reasonTitle: 'Why do you need a new card?', cardDamaged: 'My card was damaged', cardLostOrStolen: 'My card was lost or stolen', - confirmAddressTitle: "Please confirm the address below is where you'd like us to send your new card.", - cardDamagedInfo: 'Your new card will arrive in 2-3 business days, and your existing card will continue to work until you activate your new one.', + confirmAddressTitle: 'Please confirm the mailing address for your new card.', + cardDamagedInfo: 'Your new card will arrive in 2-3 business days. Your current card will continue to work until you activate your new one.', cardLostOrStolenInfo: 'Your current card will be permanently deactivated as soon as your order is placed. Most cards arrive in a few business days.', address: 'Address', deactivateCardButton: 'Deactivate card', diff --git a/src/languages/es.ts b/src/languages/es.ts index c936a77e6ab4..fbd53b996b65 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -265,7 +265,7 @@ export default { your: 'tu', conciergeHelp: 'Por favor, contacta con Concierge para obtener ayuda.', youAppearToBeOffline: 'Parece que estás desconectado.', - thisFeatureRequiresInternet: 'Esta función requiere una conexión a Internet activa para ser utilizada.', + thisFeatureRequiresInternet: 'Esta función requiere una conexión a Internet activa.', attachementWillBeAvailableOnceBackOnline: 'El archivo adjunto estará disponible cuando vuelvas a estar en línea.', areYouSure: '¿Estás seguro?', verify: 'Verifique', @@ -334,12 +334,12 @@ export default { disable: 'Deshabilitar', }, connectionComplete: { - title: 'Conexión Completa', + title: 'Conexión completa', supportingText: 'Ya puedes cerrar esta página y volver a la App de Expensify.', }, location: { useCurrent: 'Usar ubicación actual', - notFound: 'No pudimos encontrar tu ubicación, inténtalo de nuevo o introduce una dirección manualmente.', + notFound: 'No pudimos encontrar tu ubicación. Inténtalo de nuevo o introduce una dirección manualmente.', permissionDenied: 'Parece que has denegado el permiso a tu ubicación.', please: 'Por favor,', allowPermission: 'habilita el permiso de ubicación en la configuración', @@ -350,7 +350,7 @@ export default { }, attachmentPicker: { cameraPermissionRequired: 'Permiso para acceder a la cámara', - expensifyDoesntHaveAccessToCamera: 'Expensify no puede tomar fotos sin acceso a la cámara. Haz click en Configuración para actualizar los permisos.', + expensifyDoesntHaveAccessToCamera: 'Expensify no puede tomar fotos sin acceso a la cámara. Haz click en configuración para actualizar los permisos.', attachmentError: 'Error al adjuntar archivo', errorWhileSelectingAttachment: 'Ha ocurrido un error al seleccionar un archivo adjunto. Por favor, inténtalo de nuevo.', errorWhileSelectingCorruptedAttachment: 'Ha ocurrido un error al seleccionar un archivo adjunto corrupto. Por favor, inténtalo con otro archivo.', @@ -422,7 +422,7 @@ export default { welcomeText: { getStarted: 'Comience a continuación.', anotherLoginPageIsOpen: 'Otra página de inicio de sesión está abierta.', - anotherLoginPageIsOpenExplanation: 'Ha abierto la página de inicio de sesión en una pestaña separada, inicie sesión desde esa pestaña específica.', + anotherLoginPageIsOpenExplanation: 'Ha abierto la página de inicio de sesión en una pestaña separada. Inicie sesión desde esa pestaña específica.', welcome: '¡Bienvenido!', welcomeWithoutExclamation: 'Bienvenido', phrase2: 'El dinero habla. Y ahora que chat y pagos están en un mismo lugar, es también fácil.', @@ -448,7 +448,7 @@ export default { }, samlSignIn: { welcomeSAMLEnabled: 'Continua iniciando sesión con el inicio de sesión único:', - orContinueWithMagicCode: 'O, opcionalmente, tu empresa te permite iniciar sesión con un código mágico', + orContinueWithMagicCode: 'También puedes iniciar sesión con un código mágico', useSingleSignOn: 'Usar el inicio de sesión único', useMagicCode: 'Usar código mágico', launching: 'Cargando...', @@ -545,7 +545,7 @@ export default { reportTypingIndicator: { isTyping: 'está escribiendo...', areTyping: 'están escribiendo...', - multipleUsers: 'Varios usuarios', + multipleUsers: 'Varios miembros', }, reportArchiveReasons: { [CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Esta sala de chat ha sido eliminada.', @@ -597,7 +597,7 @@ export default { takePhoto: 'Haz una foto', cameraAccess: 'Se requiere acceso a la cámara para hacer fotos de los recibos.', cameraErrorTitle: 'Error en la cámara', - cameraErrorMessage: 'Se produjo un error al hacer una foto, Por favor, inténtalo de nuevo.', + cameraErrorMessage: 'Se produjo un error al hacer una foto. Por favor, inténtalo de nuevo.', locationAccessTitle: 'Permitir acceso a la ubicación', locationAccessMessage: 'Usaremos su ubicación para determinar con precisión su moneda y zona horaria predeterminadas. Puede editar el acceso en la configuración de su dispositivo en cualquier momento.', @@ -659,14 +659,14 @@ export default { canceled: 'Canceló', posted: 'Contabilizado', deleteReceipt: 'Eliminar recibo', - pendingMatchWithCreditCard: 'Recibo pendiente de adjuntar con la tarjeta de crédito.', - pendingMatchWithCreditCardDescription: 'Recibo pendiente de adjuntar con tarjeta de crédito. Marca como efectivo para ignorar y solicitar pago.', + pendingMatchWithCreditCard: 'Recibo pendiente de adjuntar con la transacción de la tarjeta', + pendingMatchWithCreditCardDescription: 'Recibo pendiente de adjuntar con la transacción de la tarjeta. Márcalo como efectivo para cancelar.', markAsCash: 'Marcar como efectivo', routePending: 'Ruta pendiente...', receiptIssuesFound: (count: number) => `${count === 1 ? 'Problema encontrado' : 'Problemas encontrados'}`, fieldPending: 'Pendiente...', receiptScanning: 'Escaneando recibo...', - receiptScanInProgress: 'Escaneado de recibo en proceso.', + receiptScanInProgress: 'Escaneado de recibo en proceso', receiptScanInProgressDescription: 'Escaneado de recibo en proceso. Vuelve a comprobarlo más tarde o introduce los detalles ahora.', defaultRate: 'Tasa predeterminada', receiptMissingDetails: 'Recibo con campos vacíos', @@ -675,7 +675,7 @@ export default { receiptStatusTitle: 'Escaneando…', receiptStatusText: 'Solo tú puedes ver este recibo cuando se está escaneando. Vuelve más tarde o introduce los detalles ahora.', receiptScanningFailed: 'El escaneo de recibo ha fallado. Introduce los detalles manualmente.', - transactionPendingDescription: 'Transacción pendiente. La transacción tarda unos días en contabilizarse desde la fecha en que se utilizó la tarjeta.', + transactionPendingDescription: 'Transacción pendiente. Puede tardar unos días en contabilizarse.', expenseCount: ({count, scanningReceipts = 0, pendingReceipts = 0}: RequestCountParams) => `${count} ${Str.pluralize('gasto', 'gastos', count)}${scanningReceipts > 0 ? `, ${scanningReceipts} escaneando` : ''}${ pendingReceipts > 0 ? `, ${pendingReceipts} pendiente` : '' @@ -690,7 +690,7 @@ export default { settlePayment: ({formattedAmount}: SettleExpensifyCardParams) => `Pagar ${formattedAmount}`, settleBusiness: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pagar ${formattedAmount} como negocio` : `Pagar como empresa`), payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pagar ${formattedAmount} de otra forma` : `Pagar de otra forma`), - nextStep: 'Pasos Siguientes', + nextStep: 'Pasos siguientes', finished: 'Finalizado', sendInvoice: ({amount}: RequestAmountParams) => `Enviar factura de ${amount}`, submitAmount: ({amount}: RequestAmountParams) => `solicitar ${amount}`, @@ -712,7 +712,7 @@ export default { waitingOnBankAccount: ({submitterDisplayName}: WaitingOnBankAccountParams) => `inició el pago, pero no se procesará hasta que ${submitterDisplayName} añada una cuenta bancaria`, adminCanceledRequest: ({manager, amount}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceló el pago de ${amount}.`, canceledRequest: ({amount, submitterDisplayName}: CanceledRequestParams) => - `canceló el pago ${amount}, porque ${submitterDisplayName} no habilitó tu billetera Expensify en un plazo de 30 días.`, + `canceló el pago ${amount}, porque ${submitterDisplayName} no habilitó tu Billetera Expensify en un plazo de 30 días.`, settledAfterAddedBankAccount: ({submitterDisplayName, amount}: SettledAfterAddedBankAccountParams) => `${submitterDisplayName} añadió una cuenta bancaria. El pago de ${amount} se ha realizado.`, paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} de otra forma`, @@ -739,12 +739,12 @@ export default { invalidTaxAmount: ({amount}: RequestAmountParams) => `El importe máximo del impuesto es ${amount}`, invalidSplit: 'La suma de las partes debe ser igual al importe total.', invalidSplitParticipants: 'Introduce un importe superior a cero para al menos dos participantes.', - other: 'Error inesperado, por favor, inténtalo más tarde.', - genericHoldExpenseFailureMessage: 'Error inesperado al bloquear el gasto, por favor, inténtalo de nuevo más tarde.', - genericUnholdExpenseFailureMessage: 'Error inesperado al desbloquear el gasto, por favor, inténtalo de nuevo más tarde.', + other: 'Error inesperado. Por favor, inténtalo más tarde.', + genericHoldExpenseFailureMessage: 'Error inesperado al bloquear el gasto. Por favor, inténtalo de nuevo más tarde.', + genericUnholdExpenseFailureMessage: 'Error inesperado al desbloquear el gasto. Por favor, inténtalo de nuevo más tarde.', genericCreateFailureMessage: 'Error inesperado al enviar este gasto. Por favor, inténtalo más tarde.', - genericCreateInvoiceFailureMessage: 'Error inesperado al enviar la factura, inténtalo de nuevo más tarde.', - receiptDeleteFailureError: 'Error inesperado al borrar este recibo. Vuelve a intentarlo más tarde.', + genericCreateInvoiceFailureMessage: 'Error inesperado al enviar la factura. Por favor, inténtalo de nuevo más tarde.', + receiptDeleteFailureError: 'Error inesperado al borrar este recibo. Por favor, vuelve a intentarlo más tarde.', // eslint-disable-next-line rulesdir/use-periods-for-error-messages receiptFailureMessage: 'El recibo no se subió. ', // eslint-disable-next-line rulesdir/use-periods-for-error-messages @@ -755,11 +755,11 @@ export default { genericSmartscanFailureMessage: 'La transacción tiene campos vacíos.', duplicateWaypointsErrorMessage: 'Por favor, elimina los puntos de ruta duplicados.', atLeastTwoDifferentWaypoints: 'Por favor, introduce al menos dos direcciones diferentes.', - splitExpenseMultipleParticipantsErrorMessage: 'Solo puedes dividir un gasto entre un único espacio de trabajo o con usuarios individuales. Por favor, actualiza tu selección.', + splitExpenseMultipleParticipantsErrorMessage: 'Solo puedes dividir un gasto entre un único espacio de trabajo o con miembros individuales. Por favor, actualiza tu selección.', invalidMerchant: 'Por favor, introduce un comerciante correcto.', }, waitingOnEnabledWallet: ({submitterDisplayName}: WaitingOnBankAccountParams) => `inició el pago, pero no se procesará hasta que ${submitterDisplayName} active su billetera`, - enableWallet: 'Habilitar Billetera', + enableWallet: 'Habilitar billetera', holdExpense: 'Bloquear gasto', unholdExpense: 'Desbloquear gasto', heldExpense: 'bloqueó este gasto', @@ -768,7 +768,7 @@ export default { reason: 'Razón', holdReasonRequired: 'Se requiere una razón para bloquear.', expenseOnHold: 'Este gasto está bloqueado. Revisa los comentarios para saber como proceder.', - expensesOnHold: 'Todos los gastos quedaron bloqueado. Revisa los comentarios para saber como proceder.', + expensesOnHold: 'Todos los gastos quedaron bloqueados. Revisa los comentarios para saber como proceder.', expenseDuplicate: 'Esta solicitud tiene los mismos detalles que otra. Revisa los duplicados para eliminar el bloqueo.', reviewDuplicates: 'Revisar duplicados', keepAll: 'Mantener todos', @@ -813,7 +813,7 @@ export default { editImage: 'Editar foto', viewPhoto: 'Ver foto', imageUploadFailed: 'Error al cargar la imagen', - deleteWorkspaceError: 'Lo sentimos, hubo un problema eliminando el avatar de tu espacio de trabajo.', + deleteWorkspaceError: 'Lo sentimos, hubo un problema eliminando el avatar de tu espacio de trabajo', sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `La imagen supera el tamaño máximo de ${maxUploadSizeInMB}MB.`, resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) => `Por favor, elige una imagen más grande que ${minHeightInPx}x${minWidthInPx} píxeles y más pequeña que ${maxHeightInPx}x${maxWidthInPx} píxeles.`, @@ -865,7 +865,7 @@ export default { enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Por favor, introduce el código mágico enviado a ${contactMethod}`, setAsDefault: 'Establecer como predeterminado', yourDefaultContactMethod: - 'Este es tu método de contacto predeterminado. No podrás eliminarlo hasta que añadas otro método de contacto y lo marques como predeterminado pulsando "Establecer como predeterminado".', + 'Este es tu método de contacto predeterminado. Antes de poder eliminarlo, tendrás que elegir otro método de contacto y haz clic en "Establecer como predeterminado".', removeContactMethod: 'Eliminar método de contacto', removeAreYouSure: '¿Estás seguro de que quieres eliminar este método de contacto? Esta acción no se puede deshacer.', failedNewContact: 'Hubo un error al añadir este método de contacto.', @@ -1005,7 +1005,7 @@ export default { changingYourPasswordPrompt: 'El cambio de contraseña va a afectar tanto a la cuenta de Expensify.com como la de Nuevo Expensify.', currentPassword: 'Contraseña actual', newPassword: 'Nueva contraseña', - newPasswordPrompt: 'La nueva contraseña debe ser diferente de la antigua, tener al menos 8 caracteres, 1 letra mayúscula, 1 letra minúscula y 1 número.', + newPasswordPrompt: 'La nueva contraseña debe ser diferente de la antigua y contener al menos 8 caracteres, 1 letra mayúscula, 1 letra minúscula y 1 número.', }, twoFactorAuth: { headerTitle: 'Autenticación de dos factores', @@ -1060,6 +1060,18 @@ export default { genericFailureMessage: 'Las notas privadas no han podido ser guardadas.', }, }, + billingCurrency: { + error: { + securityCode: 'Por favor, introduce un código de seguridad válido.', + }, + securityCode: 'Código de seguridad', + changePaymentCurrency: 'Cambiar moneda de facturación', + changeBillingCurrency: 'Cambiar la moneda de pago', + paymentCurrency: 'Moneda de pago', + note: 'Nota: Cambiar tu moneda de pago puede afectar cuánto pagarás por Expensify. Consulta nuestra', + noteLink: 'página de precios', + noteDetails: 'para conocer todos los detalles.', + }, addDebitCardPage: { addADebitCard: 'Añadir una tarjeta de débito', nameOnCard: 'Nombre en la tarjeta', @@ -1079,7 +1091,7 @@ export default { addressStreet: 'Por favor, introduce una dirección de facturación válida que no sea un apartado postal.', addressState: 'Por favor, selecciona un estado.', addressCity: 'Por favor, introduce una ciudad.', - genericFailureMessage: 'Se produjo un error al añadir tu tarjeta. Vuelva a intentarlo.', + genericFailureMessage: 'Se produjo un error al añadir tu tarjeta. Por favor, vuelva a intentarlo.', password: 'Por favor, introduce tu contraseña de Expensify.', }, }, @@ -1102,7 +1114,7 @@ export default { addressStreet: 'Por favor, introduce una dirección de facturación válida que no sea un apartado postal.', addressState: 'Por favor, selecciona un estado.', addressCity: 'Por favor, introduce una ciudad.', - genericFailureMessage: 'Se produjo un error al añadir tu tarjeta. Vuelve a intentarlo.', + genericFailureMessage: 'Se produjo un error al añadir tu tarjeta. Por favor, vuelva a intentarlo.', password: 'Por favor, introduce tu contraseña de Expensify.', }, }, @@ -1127,20 +1139,20 @@ export default { expensifyWallet: 'Billetera Expensify', sendAndReceiveMoney: 'Envía y recibe dinero desde tu Billetera Expensify.', enableWalletToSendAndReceiveMoney: 'Habilita tu Billetera Expensify para comenzar a enviar y recibir dinero con amigos', - enableWallet: 'Habilitar Billetera', + enableWallet: 'Habilitar billetera', bankAccounts: 'Cuentas bancarias', addBankAccountToSendAndReceive: 'Añade una cuenta bancaria para enviar y recibir pagos directamente en la aplicación.', addBankAccount: 'Añadir cuenta bancaria', assignedCards: 'Tarjetas asignadas', assignedCardsDescription: 'Son tarjetas asignadas por un administrador del espacio de trabajo para gestionar los gastos de la empresa.', expensifyCard: 'Tarjeta Expensify', - walletActivationPending: 'Estamos revisando tu información, por favor vuelve en unos minutos.', + walletActivationPending: 'Estamos revisando tu información. Por favor, vuelve en unos minutos.', walletActivationFailed: 'Lamentablemente, no podemos activar tu billetera en este momento. Chatea con Concierge para obtener más ayuda.', - addYourBankAccount: 'Añadir tu cuenta bancaria.', + addYourBankAccount: 'Añadir tu cuenta bancaria', addBankAccountBody: 'Conectemos tu cuenta bancaria a Expensify para que sea más fácil que nunca enviar y recibir pagos directamente en la aplicación.', - chooseYourBankAccount: 'Elige tu cuenta bancaria.', + chooseYourBankAccount: 'Elige tu cuenta bancaria', chooseAccountBody: 'Asegúrese de elegir el adecuado.', - confirmYourBankAccount: 'Confirma tu cuenta bancaria.', + confirmYourBankAccount: 'Confirma tu cuenta bancaria', }, cardPage: { expensifyCard: 'Tarjeta Expensify', @@ -1303,7 +1315,7 @@ export default { priorityModePage: { priorityMode: 'Modo prioridad', explainerText: - 'Elige si deseas mostrar por defecto todos los chats ordenados desde el más reciente y con los elementos anclados en la parte superior, o elige el modo #concentración, con los elementos no leídos anclados en la parte superior y ordenados alfabéticamente.', + 'Elige #concentración si deseas enfocarte sólo en los chats no leídos y en los anclados, o mostrarlo todo con los chats más recientes y los anclados en la parte superior.', priorityModes: { default: { label: 'Más recientes', @@ -1329,7 +1341,7 @@ export default { groupChat: { groupMembersListTitle: 'Directorio de los miembros del grupo.', lastMemberTitle: '¡Atención!', - lastMemberWarning: 'Ya que eres la última persona aquí, si te vas, este chat quedará inaccesible para todos los usuarios. ¿Estás seguro de que quieres salir del chat?', + lastMemberWarning: 'Ya que eres la última persona aquí, si te vas, este chat quedará inaccesible para todos los miembros. ¿Estás seguro de que quieres salir del chat?', defaultReportName: ({displayName}: {displayName: string}) => `Chat de group de ${displayName}`, }, languagePage: { @@ -1654,7 +1666,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', @@ -1676,7 +1688,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', @@ -1687,7 +1699,7 @@ export default { needSSNFull9: 'Estamos teniendo problemas para verificar tu número de seguridad social. Introduce los 9 dígitos del número de seguridad social.', weCouldNotVerify: 'No se pudo verificar', pleaseFixIt: 'Corrige esta información antes de continuar.', - failedKYCTextBefore: 'No se ha podido verificar correctamente tu identidad. Vuelve a intentarlo más tarde y comunicate con ', + failedKYCTextBefore: 'No se ha podido verificar correctamente tu identidad. Vuelve a intentarlo más tarde o comunicate con ', failedKYCTextAfter: ' si tienes alguna pregunta.', }, termsStep: { @@ -1707,7 +1719,7 @@ export default { checkTheBoxes: 'Por favor, marca las siguientes casillas.', agreeToTerms: 'Debes aceptar los términos y condiciones para continuar.', shortTermsForm: { - expensifyPaymentsAccount: ({walletProgram}: WalletProgramParams) => `La billetera Expensify es emitida por ${walletProgram}.`, + expensifyPaymentsAccount: ({walletProgram}: WalletProgramParams) => `La Billetera Expensify es emitida por ${walletProgram}.`, perPurchase: 'Por compra', atmWithdrawal: 'Retiro en cajeros automáticos', cashReload: 'Recarga de efectivo', @@ -1727,7 +1739,7 @@ export default { electronicFundsInstantFeeMin: ({amount}: TermsParams) => `(mínimo ${amount})`, }, longTermsForm: { - listOfAllFees: 'Una lista de todas las tarifas de la billetera Expensify', + listOfAllFees: 'Una lista de todas las tarifas de la Billetera Expensify', typeOfFeeHeader: 'Tipo de tarifa', feeAmountHeader: 'Importe de la tarifa', moreDetailsHeader: 'Más detalles', @@ -1740,11 +1752,11 @@ export default { sendingFundsTitle: 'Enviar fondos a otro titular de cuenta', sendingFundsDetails: 'No se aplica ningún cargo por enviar fondos a otro titular de cuenta utilizando tu saldo cuenta bancaria o tarjeta de débito', electronicFundsStandardDetails: - 'No hay cargo por transferir fondos desde tu billetera Expensify ' + + 'No hay cargo por transferir fondos desde tu Billetera Expensify ' + 'a tu cuenta bancaria utilizando la opción estándar. Esta transferencia generalmente se completa en' + '1-3 días laborables.', electronicFundsInstantDetails: ({percentage, amount}: ElectronicFundsParams) => - 'Hay una tarifa para transferir fondos desde tu billetera Expensify a ' + + 'Hay una tarifa para transferir fondos desde tu Billetera Expensify a ' + 'la tarjeta de débito vinculada utilizando la opción de transferencia instantánea. Esta transferencia ' + `generalmente se completa dentro de varios minutos. La tarifa es el ${percentage}% del importe de la ` + `transferencia (con una tarifa mínima de ${amount}). `, @@ -1767,7 +1779,7 @@ export default { activateStep: { headerTitle: 'Habilitar pagos', activatedTitle: '¡Billetera activada!', - activatedMessage: 'Felicidades, tu Billetera está configurada y lista para hacer pagos.', + activatedMessage: 'Felicidades, tu billetera está configurada y lista para hacer pagos.', checkBackLaterTitle: 'Un momento...', checkBackLaterMessage: 'Todavía estamos revisando tu información. Por favor, vuelve más tarde.', continueToPayment: 'Continuar al pago', @@ -1803,15 +1815,15 @@ export default { }, personalInfoStep: { personalInfo: 'Información Personal', - enterYourLegalFirstAndLast: 'Introduce tu nombre y apellidos', + enterYourLegalFirstAndLast: '¿Cuál es tu nombre legal?', legalFirstName: 'Nombre', legalLastName: 'Apellidos', legalName: 'Nombre legal', - enterYourDateOfBirth: 'Introduce tu fecha de nacimiento', - enterTheLast4: 'Introduce los últimos 4 dígitos de tu número de la seguridad social', - dontWorry: 'No te preocupes, no hacemos ninguna verificación de crédito', + enterYourDateOfBirth: '¿Cuál es tu fecha de nacimiento?', + enterTheLast4: '¿Cuáles son los últimos 4 dígitos de tu número de la seguridad social?', + dontWorry: 'No te preocupes, no hacemos verificaciones de crédito personales.', last4SSN: 'Últimos 4 dígitos de tu número de la seguridad social', - enterYourAddress: 'Introduce tu dirección', + enterYourAddress: '¿Cuál es tu dirección?', address: 'Dirección', letsDoubleCheck: 'Revisemos que todo esté bien', byAddingThisBankAccount: 'Añadiendo esta cuenta bancaria, confirmas que has leído, entendido y aceptado', @@ -1826,16 +1838,16 @@ export default { }, businessInfoStep: { businessInfo: 'Información de la empresa', - enterTheNameOfYourBusiness: 'Introduce el nombre de tu empresa.', + enterTheNameOfYourBusiness: '¿Cuál es el nombre de tu empresa?', businessName: 'Nombre de la empresa', - enterYourCompanysTaxIdNumber: 'Introduce el número de identificación fiscal.', + enterYourCompanysTaxIdNumber: '¿Cuál es el número de identificación fiscal?', taxIDNumber: 'Número de identificación fiscal', taxIDNumberPlaceholder: '9 dígitos', - enterYourCompanysWebsite: 'Introduce la página web de tu empresa.', + enterYourCompanysWebsite: '¿Cuál es la página web de tu empresa?', companyWebsite: 'Página web de la empresa', - enterYourCompanysPhoneNumber: 'Introduce el número de teléfono de tu empresa.', - enterYourCompanysAddress: 'Introduce la dirección de tu empresa.', - selectYourCompanysType: 'Selecciona el tipo de empresa.', + enterYourCompanysPhoneNumber: '¿Cuál es el número de teléfono de tu empresa?', + enterYourCompanysAddress: '¿Cuál es la dirección de tu empresa?', + selectYourCompanysType: '¿Cuál es el tipo de empresa?', companyType: 'Tipo de empresa', incorporationType: { LLC: 'SRL', @@ -1845,11 +1857,11 @@ export default { SOLE_PROPRIETORSHIP: 'Empresa individual', OTHER: 'Otros', }, - selectYourCompanysIncorporationDate: 'Selecciona la fecha de constitución de la empresa.', + selectYourCompanysIncorporationDate: '¿Cuál es la fecha de constitución de la empresa?', incorporationDate: 'Fecha de constitución', incorporationDatePlaceholder: 'Fecha de inicio (yyyy-mm-dd)', incorporationState: 'Estado en el que se constituyó', - pleaseSelectTheStateYourCompanyWasIncorporatedIn: 'Selecciona el estado en el que se constituyó la empresa.', + pleaseSelectTheStateYourCompanyWasIncorporatedIn: '¿Cuál es el estado en el que se constituyó la empresa?', letsDoubleCheck: 'Verifiquemos que todo esté correcto', companyAddress: 'Dirección de la empresa', listOfRestrictedBusinesses: 'lista de negocios restringidos', @@ -1861,14 +1873,14 @@ export default { areThereMoreIndividualsWhoOwn25percent: '¿Hay más personas que posean el 25% o más de', regulationRequiresUsToVerifyTheIdentity: 'La ley nos exige verificar la identidad de cualquier persona que posea más del 25% de la empresa.', companyOwner: 'Dueño de la empresa', - enterLegalFirstAndLastName: 'Introduce el nombre y apellidos legales del dueño.', + enterLegalFirstAndLastName: '¿Cuál es el nombre legal del dueño?', legalFirstName: 'Nombre legal', legalLastName: 'Apellidos legales', - enterTheDateOfBirthOfTheOwner: 'Introduce la fecha de nacimiento del dueño.', - enterTheLast4: 'Introduce los últimos 4 dígitos del número de la seguridad social del dueño.', + enterTheDateOfBirthOfTheOwner: '¿Cuál es la fecha de nacimiento del dueño?', + enterTheLast4: '¿Cuáles son los últimos 4 dígitos del número de la seguridad social del dueño?', last4SSN: 'Últimos 4 dígitos del número de la seguridad social', dontWorry: 'No te preocupes, ¡no realizamos verificaciones de crédito personales!', - enterTheOwnersAddress: 'Introduce la dirección del dueño.', + enterTheOwnersAddress: '¿Cuál es la dirección del dueño?', letsDoubleCheck: 'Vamos a verificar que todo esté correcto.', legalName: 'Nombre legal', address: 'Dirección', @@ -1879,17 +1891,15 @@ export default { headerTitle: 'Validar cuenta bancaria', buttonText: 'Finalizar configuración', maxAttemptsReached: 'Se ha inhabilitado la validación de esta cuenta bancaria debido a demasiados intentos incorrectos.', - description: - 'Uno o dos días después de añadir tu cuenta a Expensify, te enviaremos tres (3) transacciones a tu cuenta. Tienen un nombre de comerciante similar a "Expensify, Inc. Validation".', + description: 'Enviaremos tres (3) pequeñas transacciones a tu cuenta bancaria a nombre de "Expensify, Inc. Validation" dentro de los próximos 1-2 días laborables.', descriptionCTA: 'Introduce el importe de cada transacción en los campos siguientes. Ejemplo: 1.51.', reviewingInfo: '¡Gracias! Estamos revisando tu información y nos comunicaremos contigo en breve. Consulta el chat con Concierge ', forNextStep: ' para conocer los próximos pasos para terminar de configurar tu cuenta bancaria.', letsChatCTA: 'Sí, vamos a chatear', - letsChatText: 'Gracias. Necesitamos tu ayuda para verificar la información, pero podemos hacerlo rápidamente a través del chat. ¿Estás listo?', + letsChatText: '¡Ya casi estamos! Necesitamos tu ayuda para verificar unos últimos datos a través del chat. ¿Estás listo?', letsChatTitle: '¡Vamos a chatear!', enable2FATitle: 'Evita fraudes, activa la autenticación de dos factores!', - enable2FAText: - 'Tu seguridad es importante para nosotros. Por favor, configura ahora la autenticación de dos factores. Eso nos permitirá disputar las transacciones de la Tarjeta Expensify y reducirá tu riesgo de fraude.', + enable2FAText: 'Tu seguridad es importante para nosotros. Por favor, configura ahora la autenticación de dos factores para añadir una capa adicional de protección a tu cuenta.', secureYourAccount: 'Asegura tu cuenta', }, beneficialOwnersStep: { @@ -1911,7 +1921,7 @@ export default { completeVerification: 'Completar la verificación', confirmAgreements: 'Por favor, confirma los acuerdos siguientes.', certifyTrueAndAccurate: 'Certifico que la información dada es verdadera y precisa', - certifyTrueAndAccurateError: 'Debe certificar que la información es verdadera y precisa', + certifyTrueAndAccurateError: 'Por favor, certifica que la información es verdadera y exacta', isAuthorizedToUseBankAccount: 'Estoy autorizado para usar la cuenta bancaria de mi empresa para gastos de empresa', isAuthorizedToUseBankAccountError: 'Debes ser el responsable oficial con autorización para operar la cuenta bancaria de la empresa.', termsAndConditions: 'Términos y Condiciones', @@ -1923,17 +1933,15 @@ export default { validateButtonText: 'Validar', validationInputLabel: 'Transacción', maxAttemptsReached: 'La validación de esta cuenta bancaria se ha desactivado debido a demasiados intentos incorrectos.', - description: - 'Un día o dos después de añadir tu cuenta a Expensify, te enviaremos tres (3) transacciones a tu cuenta. Tienen un nombre de comerciante similar a "Expensify, Inc. Validation".', + description: 'Enviaremos tres (3) pequeñas transacciones a tu cuenta bancaria a nombre de "Expensify, Inc. Validation" dentro de los próximos 1-2 días laborables.', descriptionCTA: 'Introduce el importe de cada transacción en los campos siguientes. Ejemplo: 1.51.', reviewingInfo: '¡Gracias! Estamos revisando tu información y nos comunicaremos contigo en breve. Consulta el chat con Concierge ', forNextSteps: ' para conocer los próximos pasos para terminar de configurar tu cuenta bancaria.', letsChatCTA: 'Sí, vamos a chatear', - letsChatText: 'Gracias. Necesitamos tu ayuda para verificar la información, pero podemos resolverlo rápidamente a través del chat. ¿Estás Listo?', + letsChatText: '¡Ya casi estamos! Necesitamos tu ayuda para verificar unos últimos datos a través del chat. ¿Estás listo?', letsChatTitle: '¡Vamos a chatear!', enable2FATitle: '¡Evita fraudes, activa la autenticación de dos factores!', - enable2FAText: - 'Tu seguridad es importante para nosotros. Por favor, configura ahora la autenticación de dos factores. Eso nos permitirá disputar las transacciones de la Tarjeta Expensify y reducirá tu riesgo de fraude.', + enable2FAText: 'Tu seguridad es importante para nosotros. Por favor, configura ahora la autenticación de dos factores para añadir una capa adicional de protección a tu cuenta.', secureYourAccount: 'Asegura tu cuenta', }, reimbursementAccountLoadingAnimation: { @@ -2006,8 +2014,8 @@ export default { settlementFrequency: 'Frecuencia de liquidación', deleteConfirmation: '¿Estás seguro de que quieres eliminar este espacio de trabajo?', unavailable: 'Espacio de trabajo no disponible', - memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro al espacio de trabajo, por favor, utiliza el botón Invitar que está arriba.', - notAuthorized: `No tienes acceso a esta página. ¿Estás tratando de unirte al espacio de trabajo? Comunícate con el propietario de este espacio de trabajo para que pueda añadirte como miembro. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`, + memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro al espacio de trabajo, por favor, utiliza el botón invitar que está arriba.', + notAuthorized: `No tienes acceso a esta página. Si estás intentando unirte a este espacio de trabajo, pide al dueño del espacio de trabajo que te añada como miembro. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`, goToRoom: ({roomName}: GoToRoomParams) => `Ir a la sala ${roomName}`, workspaceName: 'Nombre del espacio de trabajo', workspaceOwner: 'Dueño', @@ -2067,7 +2075,7 @@ export default { }, receivable: 'Cuentas por cobrar', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS. archive: 'Archivo de cuentas por cobrar', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS. - exportInvoicesDescription: 'Las facturas se exportarán a esta cuenta en QuickBooks Online.', + exportInvoicesDescription: 'Usa esta cuenta al exportar facturas a QuickBooks Online.', exportCompanyCardsDescription: 'Establece cómo se exportan las compras con tarjeta de empresa a QuickBooks Online.', account: 'Cuenta', accountDescription: 'Elige dónde contabilizar las compensaciones de entradas a los asientos contables.', @@ -2194,25 +2202,25 @@ export default { }, exportDate: { label: 'Fecha de exportación', - description: 'Usa esta fecha al exportar informe a Xero.', + description: 'Usa esta fecha al exportar facturas de compra a Xero.', values: { [CONST.XERO_EXPORT_DATE.LAST_EXPENSE]: { label: 'Fecha del último gasto', - description: 'Fecha del gasto mas reciente en el informe', + description: 'Fecha del gasto mas reciente en el informe.', }, [CONST.XERO_EXPORT_DATE.REPORT_EXPORTED]: { label: 'Fecha de exportación', - description: 'Fecha de exportación del informe a Xero', + description: 'Fecha de exportación del informe a Xero.', }, [CONST.XERO_EXPORT_DATE.REPORT_SUBMITTED]: { label: 'Fecha de envío', - description: 'Fecha en la que el informe se envió para su aprobación', + description: 'Fecha en la que el informe se envió para su aprobación.', }, }, }, invoiceStatus: { label: 'Estado de la factura de compra', - description: 'Elige un estado para las facturas de compra exportadas a Xero.', + description: 'Usa este estado al exportar facturas de compra a Xero.', values: { [CONST.XERO_CONFIG.INVOICE_STATUS.DRAFT]: 'Borrador', [CONST.XERO_CONFIG.INVOICE_STATUS.AWAITING_APPROVAL]: 'Pendiente de aprobación', @@ -2346,7 +2354,7 @@ export default { deleteFailureMessage: 'Se ha producido un error al intentar eliminar la etiqueta. Por favor, inténtalo más tarde.', tagRequiredError: 'Lo nombre de la etiqueta es obligatorio.', existingTagError: 'Ya existe una etiqueta con este nombre.', - genericFailureMessage: 'Se produjo un error al actualizar la etiqueta, inténtelo nuevamente.', + genericFailureMessage: 'Se produjo un error al actualizar la etiqueta. Por favor, inténtelo nuevamente.', importedFromAccountingSoftware: 'Etiquetas importadas desde', }, taxes: { @@ -2401,7 +2409,7 @@ export default { getTheExpensifyCardAndMore: 'Consigue la Tarjeta Expensify y más', }, people: { - genericFailureMessage: 'Se ha producido un error al intentar eliminar a un usuario del espacio de trabajo. Por favor, inténtalo más tarde.', + genericFailureMessage: 'Se ha producido un error al intentar eliminar a un miembro del espacio de trabajo. Por favor, inténtalo más tarde.', removeMembersPrompt: '¿Estás seguro de que deseas eliminar a estos miembros?', removeMembersTitle: 'Eliminar miembros', removeMemberButtonTitle: 'Quitar del espacio de trabajo', @@ -2417,7 +2425,7 @@ export default { cannotRemove: 'No puedes eliminarte ni a ti mismo ni al dueño del espacio de trabajo.', genericRemove: 'Ha ocurrido un problema al eliminar al miembro del espacio de trabajo.', }, - addedWithPrimary: 'Se agregaron algunos usuarios con sus nombres de usuario principales.', + addedWithPrimary: 'Se agregaron algunos miembros con sus nombres de usuario principales.', invitedBySecondaryLogin: ({secondaryLogin}) => `Agregado por nombre de usuario secundario ${secondaryLogin}.`, membersListTitle: 'Directorio de todos los miembros del espacio de trabajo.', }, @@ -2462,14 +2470,14 @@ export default { taxes: 'Impuestos', imported: 'Importado', notImported: 'No importado', - importAsCategory: 'Importado, mostrado as categoría', + importAsCategory: 'Importado como categorías', importTypes: { [CONST.INTEGRATION_ENTITY_MAP_TYPES.IMPORTED]: 'Importado', - [CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG]: 'Importado, mostrado como etiqueta', + [CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG]: 'Importado como etiquetas', [CONST.INTEGRATION_ENTITY_MAP_TYPES.DEFAULT]: 'Importado', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NOT_IMPORTED]: 'No importado', [CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE]: 'No importado', - [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importado, mostrado como campo de informe', + [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importado como campos de informe', }, disconnectPrompt: (integrationToConnect?: ConnectionName, currentIntegration?: ConnectionName): string => { switch (integrationToConnect) { @@ -2592,12 +2600,12 @@ export default { card: { header: 'Desbloquea Tarjetas Expensify gratis', headerWithEcard: '¡Tus tarjetas están listas!', - noVBACopy: 'Conecta una cuenta bancaria para emitir tarjetas Expensify a los miembros de tu espacio de trabajo y accede a estos increíbles beneficios y más:', + noVBACopy: 'Conecta una cuenta bancaria para emitir Tarjetas Expensify a los miembros de tu espacio de trabajo y acceder a estos increíbles beneficios y más:', VBANoECardCopy: - 'Añade tu correo electrónico de trabajo para emitir Tarjetas Expensify ilimitadas para los miembros de tu espacio de trabajo y acceder a todas estas increíbles ventajas:', + 'Añade tu correo electrónico de trabajo para emitir Tarjetas Expensify ilimitadas a los miembros de tu espacio de trabajo y acceder a todas estas increíbles ventajas:', VBAWithECardCopy: 'Acceda a estos increíbles beneficios y más:', benefit1: 'Devolución de dinero en cada compra en Estados Unidos', - benefit2: 'Tarjetas digitales y físicas', + benefit2: 'Tarjetas virtuales y físicas ilimitadas', benefit3: 'Sin responsabilidad personal', benefit4: 'Límites personalizables', addWorkEmail: 'Añadir correo electrónico de trabajo', @@ -2615,7 +2623,7 @@ export default { trackDistanceChooseUnit: 'Elige una unidad predeterminada de medida.', unlockNextDayReimbursements: 'Desbloquea reembolsos diarios', captureNoVBACopyBeforeEmail: 'Pide a los miembros de tu espacio de trabajo que envíen recibos a ', - captureNoVBACopyAfterEmail: ' y descarga la App de Expensify para controlar tus gastos en efectivo sobre la marcha.', + captureNoVBACopyAfterEmail: ' y descarga la app de Expensify para controlar tus gastos en efectivo sobre la marcha.', unlockNoVBACopy: 'Conecta una cuenta bancaria para reembolsar online a los miembros de tu espacio de trabajo.', fastReimbursementsVBACopy: '¡Todo listo para reembolsar recibos desde tu cuenta bancaria!', updateCustomUnitError: 'Los cambios no han podido ser guardados. El espacio de trabajo ha sido modificado mientras estabas desconectado. Por favor, inténtalo de nuevo.', @@ -2637,7 +2645,7 @@ export default { invoiceFirstSectionCopy: 'Envía facturas detalladas y profesionales directamente a tus clientes desde la app de Expensify.', viewAllInvoices: 'Ver facturas emitidas', unlockOnlineInvoiceCollection: 'Desbloquea el cobro de facturas online', - unlockNoVBACopy: 'Conecta tu cuenta bancaria para recibir pagos online de facturas - por transferencia o con tarjeta - directamente en tu cuenta.', + unlockNoVBACopy: 'Conecta tu cuenta bancaria para recibir pagos de facturas online por transferencia o con tarjeta.', moneyBackInAFlash: '¡Tu dinero de vuelta en un momento!', unlockVBACopy: '¡Todo listo para recibir pagos por transferencia o con tarjeta!', viewUnpaidInvoices: 'Ver facturas emitidas pendientes', @@ -2663,10 +2671,10 @@ export default { member: 'Invitar miembros', members: 'Invitar miembros', invitePeople: 'Invitar nuevos miembros', - genericFailureMessage: 'Se produjo un error al invitar al usuario al espacio de trabajo. Vuelva a intentarlo..', + genericFailureMessage: 'Se produjo un error al invitar al miembro al espacio de trabajo. Vuelva a intentarlo..', 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}).`, - user: 'usuario', - users: 'usuarios', + user: 'miembro', + users: 'miembros', invited: 'invitó', removed: 'eliminó', leftWorkspace: 'salió del espacio de trabajo', @@ -2678,7 +2686,7 @@ export default { inviteMessagePrompt: 'Añadir un mensaje para hacer tu invitación destacar', personalMessagePrompt: 'Mensaje', inviteNoMembersError: 'Por favor, selecciona al menos un miembro a invitar.', - genericFailureMessage: 'Se produjo un error al invitar al usuario al espacio de trabajo. Vuelva a intentarlo..', + genericFailureMessage: 'Se produjo un error al invitar al miembro al espacio de trabajo. Por favor, vuelva a intentarlo..', }, distanceRates: { oopsNotSoFast: 'Ups! No tan rápido...', @@ -2715,14 +2723,13 @@ export default { }, bankAccount: { continueWithSetup: 'Continuar con la configuración', - youreAlmostDone: - 'Casi has acabado de configurar tu cuenta bancaria, que te permitirá emitir tarjetas corporativas, reembolsar gastos y cobrar pagar facturas, todo desde la misma cuenta bancaria.', + youreAlmostDone: 'Casi has acabado de configurar tu cuenta bancaria, que te permitirá emitir tarjetas corporativas, reembolsar gastos y cobrar pagar facturas.', streamlinePayments: 'Optimiza pagos', oneMoreThing: '¡Una cosa más!', allSet: '¡Todo listo!', accountDescriptionNoCards: - 'Esta cuenta bancaria se utilizará para reembolsar gastos y cobrar y pagar facturas, todo desde la misma cuenta.\n\nPor favor, añade un correo electrónico de trabajo como tu nombre de usuario secundario para activar la Tarjeta Expensify.', - accountDescriptionWithCards: 'Esta cuenta bancaria se utilizará para emitir tarjetas corporativas, reembolsar gastos y cobrar y pagar facturas, todo desde la misma cuenta.', + 'Esta cuenta bancaria se utilizará para reembolsar gastos y cobrar y pagar facturas.\n\nPor favor, añade un correo electrónico de trabajo como tu nombre de usuario secundario para activar la Tarjeta Expensify.', + accountDescriptionWithCards: 'Esta cuenta bancaria se utilizará para emitir tarjetas corporativas, reembolsar gastos y cobrar y pagar facturas.', addWorkEmail: 'Añadir correo electrónico de trabajo', letsFinishInChat: '¡Continuemos en el chat!', almostDone: '¡Casi listo!', @@ -2764,7 +2771,7 @@ export default { subscriptionTitle: 'Asumir la suscripción anual', subscriptionButtonText: 'Transferir suscripción', subscriptionText: ({usersCount, finalCount}) => - `Al hacerse cargo de este espacio de trabajo se fusionará tu suscripción anual asociada con tu suscripción actual. Esto aumentará el tamaño de tu suscripción en ${usersCount} usuarios, lo que hará que tu nuevo tamaño de suscripción sea ${finalCount}. ¿Te gustaria continuar?`, + `Al hacerse cargo de este espacio de trabajo se fusionará tu suscripción anual asociada con tu suscripción actual. Esto aumentará el tamaño de tu suscripción en ${usersCount} miembros, lo que hará que tu nuevo tamaño de suscripción sea ${finalCount}. ¿Te gustaria continuar?`, duplicateSubscriptionTitle: 'Alerta de suscripción duplicada', duplicateSubscriptionButtonText: 'Continuar', duplicateSubscriptionText: ({email, workspaceName}) => @@ -2841,7 +2848,7 @@ export default { roomRenamedTo: ({newName}: RoomRenamedToParams) => `Sala renombrada a ${newName}`, social: 'social', selectAWorkspace: 'Seleccionar un espacio de trabajo', - growlMessageOnRenameError: 'No se ha podido cambiar el nombre del espacio de trabajo, por favor, comprueba tu conexión e inténtalo de nuevo.', + growlMessageOnRenameError: 'No se ha podido cambiar el nombre del espacio de trabajo. Por favor, comprueba tu conexión e inténtalo de nuevo.', visibilityOptions: { restricted: 'Espacio de trabajo', // the translation for "restricted" visibility is actually workspace. This is so we can display restricted visibility rooms as "workspace" without having to change what's stored. private: 'Privada', @@ -2851,8 +2858,8 @@ export default { }, }, roomMembersPage: { - memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro a la sala de chat, por favor, utiliza el botón Invitar que está más arriba.', - notAuthorized: `No tienes acceso a esta página. ¿Estás tratando de unirte a la sala de chat? Comunícate con el propietario de esta sala de chat para que pueda añadirte como miembro. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`, + memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro a la sala de chat, por favor, utiliza el botón invitar que está más arriba.', + notAuthorized: `No tienes acceso a esta página. Si estás intentando unirte a esta sala, pide a un miembro de la sala que te añada. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`, removeMembersPrompt: '¿Estás seguro de que quieres eliminar a los miembros seleccionados de la sala de chat?', error: { genericAdd: 'Hubo un problema al añadir este miembro a la sala de chat.', @@ -2872,7 +2879,7 @@ export default { task: 'Tarea', title: 'Título', description: 'Descripción', - assignee: 'Usuario asignado', + assignee: 'Miembro asignado', completed: 'Completada', messages: { created: ({title}: TaskCreatedActionParams) => `tarea para ${title}`, @@ -2883,8 +2890,8 @@ export default { }, markAsComplete: 'Marcar como completada', markAsIncomplete: 'Marcar como incompleta', - assigneeError: 'Hubo un error al asignar esta tarea, inténtalo con otro usuario.', - genericCreateTaskFailureMessage: 'Error inesperado al crear el tarea, por favor, inténtalo más tarde.', + assigneeError: 'Hubo un error al asignar esta tarea. Por favor, inténtalo con otro miembro.', + genericCreateTaskFailureMessage: 'Error inesperado al crear el tarea. Por favor, inténtalo más tarde.', deleteTask: 'Eliminar tarea', deleteConfirmation: '¿Estás seguro de que quieres eliminar esta tarea?', }, @@ -2940,7 +2947,7 @@ export default { }, permissionError: { title: 'Permiso para acceder al almacenamiento', - message: 'Expensify no puede guardar los archivos adjuntos sin permiso para acceder al almacenamiento. Haz click en Configuración para actualizar los permisos.', + message: 'Expensify no puede guardar los archivos adjuntos sin permiso para acceder al almacenamiento. Haz click en configuración para actualizar los permisos.', }, }, desktopApplicationMenu: { @@ -3015,7 +3022,7 @@ export default { genericCreateReportFailureMessage: 'Error inesperado al crear el chat. Por favor, inténtalo más tarde.', genericAddCommentFailureMessage: 'Error inesperado al añadir el comentario. Por favor, inténtalo más tarde.', genericUpdateReportFieldFailureMessage: 'Error inesperado al actualizar el campo. Por favor, inténtalo más tarde.', - genericUpdateReporNameEditFailureMessage: 'Error inesperado al cambiar el nombre del informe. Vuelva a intentarlo más tarde.', + genericUpdateReporNameEditFailureMessage: 'Error inesperado al cambiar el nombre del informe. Por favor, intentarlo más tarde.', noActivityYet: 'Sin actividad todavía', }, chronos: { @@ -3636,8 +3643,8 @@ export default { reasonTitle: '¿Por qué necesitas una tarjeta nueva?', cardDamaged: 'Mi tarjeta está dañada', cardLostOrStolen: 'He perdido o me han robado la tarjeta', - confirmAddressTitle: 'Confirma que la dirección que aparece a continuación es a la que deseas que te enviemos tu nueva tarjeta.', - cardDamagedInfo: 'La nueva tarjeta te llegará en 2-3 días laborables y la tarjeta actual seguirá funcionando hasta que actives la nueva.', + confirmAddressTitle: 'Por favor, confirma la dirección postal de tu nueva tarjeta.', + cardDamagedInfo: 'La nueva tarjeta te llegará en 2-3 días laborables. La tarjeta actual seguirá funcionando hasta que actives la nueva.', cardLostOrStolenInfo: 'La tarjeta actual se desactivará permanentemente en cuanto realices el pedido. La mayoría de las tarjetas llegan en pocos días laborables.', address: 'Dirección', deactivateCardButton: 'Desactivar tarjeta', diff --git a/src/libs/API/parameters/OpenProfileParams.ts b/src/libs/API/parameters/OpenProfileParams.ts deleted file mode 100644 index f42ea8234fc8..000000000000 --- a/src/libs/API/parameters/OpenProfileParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -type OpenProfileParams = { - timezone: string; -}; - -export default OpenProfileParams; diff --git a/src/libs/API/parameters/UpdateBillingCurrencyParams.ts b/src/libs/API/parameters/UpdateBillingCurrencyParams.ts new file mode 100644 index 000000000000..957b377a2e95 --- /dev/null +++ b/src/libs/API/parameters/UpdateBillingCurrencyParams.ts @@ -0,0 +1,9 @@ +import type {ValueOf} from 'type-fest'; +import type CONST from '@src/CONST'; + +type UpdateBillingCurrencyParams = { + currency: ValueOf; + cardCVV: string; +}; + +export default UpdateBillingCurrencyParams; diff --git a/src/libs/API/parameters/index.ts b/src/libs/API/parameters/index.ts index c43ab514b251..da4f1216016e 100644 --- a/src/libs/API/parameters/index.ts +++ b/src/libs/API/parameters/index.ts @@ -32,7 +32,6 @@ export type {default as OpenAppParams} from './OpenAppParams'; export type {default as OpenOldDotLinkParams} from './OpenOldDotLinkParams'; export type {default as OpenPlaidBankAccountSelectorParams} from './OpenPlaidBankAccountSelectorParams'; export type {default as OpenPlaidBankLoginParams} from './OpenPlaidBankLoginParams'; -export type {default as OpenProfileParams} from './OpenProfileParams'; export type {default as OpenPublicProfilePageParams} from './OpenPublicProfilePageParams'; export type {default as OpenReimbursementAccountPageParams} from './OpenReimbursementAccountPageParams'; export type {default as OpenReportParams} from './OpenReportParams'; @@ -97,6 +96,7 @@ export type {default as UpdateRoomVisibilityParams} from './UpdateRoomVisibility export type {default as UpdateReportWriteCapabilityParams} from './UpdateReportWriteCapabilityParams'; export type {default as AddWorkspaceRoomParams} from './AddWorkspaceRoomParams'; export type {default as UpdatePolicyRoomNameParams} from './UpdatePolicyRoomNameParams'; +export type {default as UpdateBillingCurrencyParams} from './UpdateBillingCurrencyParams'; export type {default as AddEmojiReactionParams} from './AddEmojiReactionParams'; export type {default as RemoveEmojiReactionParams} from './RemoveEmojiReactionParams'; export type {default as LeaveRoomParams} from './LeaveRoomParams'; diff --git a/src/libs/API/types.ts b/src/libs/API/types.ts index f94ba0c54978..e3115a624680 100644 --- a/src/libs/API/types.ts +++ b/src/libs/API/types.ts @@ -16,7 +16,6 @@ const WRITE_COMMANDS = { UPDATE_PREFERRED_LOCALE: 'UpdatePreferredLocale', OPEN_APP: 'OpenApp', RECONNECT_APP: 'ReconnectApp', - OPEN_PROFILE: 'OpenProfile', HANDLE_RESTRICTED_EVENT: 'HandleRestrictedEvent', OPEN_REPORT: 'OpenReport', DELETE_PAYMENT_BANK_ACCOUNT: 'DeletePaymentBankAccount', @@ -158,6 +157,7 @@ const WRITE_COMMANDS = { UPDATE_MONEY_REQUEST_DESCRIPTION: 'UpdateMoneyRequestDescription', UPDATE_MONEY_REQUEST_AMOUNT_AND_CURRENCY: 'UpdateMoneyRequestAmountAndCurrency', HOLD_MONEY_REQUEST: 'HoldRequest', + UPDATE_BILLING_CARD_CURRENCY: 'UpdateBillingCardCurrency', UNHOLD_MONEY_REQUEST: 'UnHoldRequest', UPDATE_DISTANCE_REQUEST: 'UpdateDistanceRequest', REQUEST_MONEY: 'RequestMoney', @@ -236,7 +236,6 @@ type WriteCommandParameters = { [WRITE_COMMANDS.UPDATE_PREFERRED_LOCALE]: Parameters.UpdatePreferredLocaleParams; [WRITE_COMMANDS.RECONNECT_APP]: Parameters.ReconnectAppParams; [WRITE_COMMANDS.OPEN_APP]: Parameters.OpenAppParams; - [WRITE_COMMANDS.OPEN_PROFILE]: Parameters.OpenProfileParams; [WRITE_COMMANDS.HANDLE_RESTRICTED_EVENT]: Parameters.HandleRestrictedEventParams; [WRITE_COMMANDS.OPEN_REPORT]: Parameters.OpenReportParams; [WRITE_COMMANDS.DELETE_PAYMENT_BANK_ACCOUNT]: Parameters.DeletePaymentBankAccountParams; @@ -440,6 +439,7 @@ type WriteCommandParameters = { [WRITE_COMMANDS.SET_POLICY_DISTANCE_RATES_ENABLED]: Parameters.SetPolicyDistanceRatesEnabledParams; [WRITE_COMMANDS.DELETE_POLICY_DISTANCE_RATES]: Parameters.DeletePolicyDistanceRatesParams; [WRITE_COMMANDS.DISMISS_TRACK_EXPENSE_ACTIONABLE_WHISPER]: Parameters.DismissTrackExpenseActionableWhisperParams; + [WRITE_COMMANDS.UPDATE_BILLING_CARD_CURRENCY]: Parameters.UpdateBillingCurrencyParams; [WRITE_COMMANDS.CONVERT_TRACKED_EXPENSE_TO_REQUEST]: Parameters.ConvertTrackedExpenseToRequestParams; [WRITE_COMMANDS.CATEGORIZE_TRACKED_EXPENSE]: Parameters.CategorizeTrackedExpenseParams; [WRITE_COMMANDS.SHARE_TRACKED_EXPENSE]: Parameters.ShareTrackedExpenseParams; @@ -567,6 +567,7 @@ const SIDE_EFFECT_REQUEST_COMMANDS = { OPEN_OLD_DOT_LINK: 'OpenOldDotLink', OPEN_REPORT: 'OpenReport', RECONNECT_APP: 'ReconnectApp', + ADD_PAYMENT_CARD_GBR: 'AddPaymentCardGBP', REVEAL_EXPENSIFY_CARD_DETAILS: 'RevealExpensifyCardDetails', SWITCH_TO_OLD_DOT: 'SwitchToOldDot', } as const; @@ -582,6 +583,7 @@ type SideEffectRequestCommandParameters = { [SIDE_EFFECT_REQUEST_COMMANDS.JOIN_POLICY_VIA_INVITE_LINK]: Parameters.JoinPolicyInviteLinkParams; [SIDE_EFFECT_REQUEST_COMMANDS.RECONNECT_APP]: Parameters.ReconnectAppParams; [SIDE_EFFECT_REQUEST_COMMANDS.GENERATE_SPOTNANA_TOKEN]: Parameters.GenerateSpotnanaTokenParams; + [SIDE_EFFECT_REQUEST_COMMANDS.ADD_PAYMENT_CARD_GBR]: Parameters.AddPaymentCardParams; [SIDE_EFFECT_REQUEST_COMMANDS.ACCEPT_SPOTNANA_TERMS]: null; }; diff --git a/src/libs/LoginUtils.ts b/src/libs/LoginUtils.ts index ded60ab3e800..191fd72db4e9 100644 --- a/src/libs/LoginUtils.ts +++ b/src/libs/LoginUtils.ts @@ -21,7 +21,14 @@ function getPhoneNumberWithoutSpecialChars(phone: string): string { * Append user country code to the phone number */ function appendCountryCode(phone: string): string { - return phone.startsWith('+') ? phone : `+${countryCodeByIP}${phone}`; + if (phone.startsWith('+')) { + return phone; + } + const phoneWithCountryCode = `+${countryCodeByIP}${phone}`; + if (parsePhoneNumber(phoneWithCountryCode).possible) { + return phoneWithCountryCode; + } + return `+${phone}`; } /** diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index cb13c347d8aa..6e9782defe4f 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -326,7 +326,10 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../../pages/workspace/taxes/ValuePage').default, [SCREENS.WORKSPACE.TAX_CREATE]: () => require('../../../../pages/workspace/taxes/WorkspaceCreateTaxPage').default, [SCREENS.SETTINGS.SAVE_THE_WORLD]: () => require('../../../../pages/TeachersUnite/SaveTheWorldPage').default, - [SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD]: () => require('../../../../pages/settings/Subscription/PaymentCard/AddPaymentCard').default, + [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_PAYMENT_CURRENCY]: () => require('../../../../pages/settings/PaymentCard/ChangeCurrency').default, + [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_BILLING_CURRENCY]: () => require('../../../../pages/settings/Subscription/PaymentCard/ChangeBillingCurrency').default, + [SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD]: () => require('../../../../pages/settings/Subscription/PaymentCard').default, + [SCREENS.SETTINGS.ADD_PAYMENT_CARD_CHANGE_CURRENCY]: () => require('../../../../pages/settings/PaymentCard/ChangeCurrency').default, }); const EnablePaymentsStackNavigator = createModalStackNavigator({ diff --git a/src/libs/Navigation/linkTo/index.ts b/src/libs/Navigation/linkTo/index.ts index 90e52d02163c..3c4608d6b5de 100644 --- a/src/libs/Navigation/linkTo/index.ts +++ b/src/libs/Navigation/linkTo/index.ts @@ -72,17 +72,21 @@ export default function linkTo(navigation: NavigationContainerRef | undefined, (value) => value === undefined), - omitBy(actionParams?.params as Record | undefined, (value) => value === undefined), + omitBy(targetParams as Record | undefined, (value) => value === undefined), ); // If this action is navigating to the report screen and the top most navigator is different from the one we want to navigate - PUSH the new screen to the top of the stack by default @@ -110,8 +114,8 @@ export default function linkTo(navigation: NavigationContainerRef).policyIDs = policyID; + if (targetName === SCREENS.SEARCH.CENTRAL_PANE && targetParams && policyID) { + (targetParams as Record).policyIDs = policyID; } // If the type is UP, we deeplinked into one of the RHP flows and we want to replace the current screen with the previous one in the flow diff --git a/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts b/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts index c4858d3141f1..1192e4649ea0 100755 --- a/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts +++ b/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts @@ -39,7 +39,13 @@ const CENTRAL_PANE_TO_RHP_MAPPING: Partial> = [SCREENS.SETTINGS.SAVE_THE_WORLD]: [SCREENS.I_KNOW_A_TEACHER, SCREENS.INTRO_SCHOOL_PRINCIPAL, SCREENS.I_AM_A_TEACHER], [SCREENS.SETTINGS.TROUBLESHOOT]: [SCREENS.SETTINGS.CONSOLE], [SCREENS.SEARCH.CENTRAL_PANE]: [SCREENS.SEARCH.REPORT_RHP], - [SCREENS.SETTINGS.SUBSCRIPTION.ROOT]: [SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD, SCREENS.SETTINGS.SUBSCRIPTION.SIZE, SCREENS.SETTINGS.SUBSCRIPTION.DISABLE_AUTO_RENEW_SURVEY], + [SCREENS.SETTINGS.SUBSCRIPTION.ROOT]: [ + SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD, + SCREENS.SETTINGS.SUBSCRIPTION.SIZE, + SCREENS.SETTINGS.SUBSCRIPTION.DISABLE_AUTO_RENEW_SURVEY, + SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_BILLING_CURRENCY, + SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_PAYMENT_CURRENCY, + ], }; export default CENTRAL_PANE_TO_RHP_MAPPING; diff --git a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts index 5defdd9d2e08..b2a69d3aeb39 100755 --- a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts +++ b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts @@ -11,6 +11,7 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial> = { SCREENS.WORKSPACE.OWNER_CHANGE_CHECK, SCREENS.WORKSPACE.OWNER_CHANGE_SUCCESS, SCREENS.WORKSPACE.OWNER_CHANGE_ERROR, + SCREENS.WORKSPACE.OWNER_CHANGE_ERROR, ], [SCREENS.WORKSPACE.WORKFLOWS]: [ SCREENS.WORKSPACE.WORKFLOWS_APPROVER, diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts index bba611136450..c66472abb3b4 100644 --- a/src/libs/Navigation/linkingConfig/config.ts +++ b/src/libs/Navigation/linkingConfig/config.ts @@ -126,6 +126,18 @@ const config: LinkingOptions['config'] = { path: ROUTES.SETTINGS_SUBSCRIPTION_ADD_PAYMENT_CARD, exact: true, }, + [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_BILLING_CURRENCY]: { + path: ROUTES.SETTINGS_SUBSCRIPTION_CHANGE_BILLING_CURRENCY, + exact: true, + }, + [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_PAYMENT_CURRENCY]: { + path: ROUTES.SETTINGS_SUBSCRIPTION_CHANGE_PAYMENT_CURRENCY, + exact: true, + }, + [SCREENS.SETTINGS.ADD_PAYMENT_CARD_CHANGE_CURRENCY]: { + path: ROUTES.SETTINGS_CHANGE_CURRENCY, + exact: true, + }, [SCREENS.SETTINGS.PREFERENCES.THEME]: { path: ROUTES.SETTINGS_THEME, exact: true, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 4f09e3a42d58..6c4e03aa2018 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -254,6 +254,8 @@ type SettingsNavigatorParamList = { canChangeSize: 0 | 1; }; [SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD]: undefined; + [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_BILLING_CURRENCY]: undefined; + [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_PAYMENT_CURRENCY]: undefined; [SCREENS.WORKSPACE.TAXES_SETTINGS]: { policyID: string; }; diff --git a/src/libs/NavigationUtils.ts b/src/libs/NavigationUtils.ts index f0442e4995d2..4fdc03c3d334 100644 --- a/src/libs/NavigationUtils.ts +++ b/src/libs/NavigationUtils.ts @@ -1,7 +1,7 @@ import SCREENS from '@src/SCREENS'; import type {CentralPaneName} from './Navigation/types'; -const CENTRAL_PANE_SCREEN_NAMES = [ +const CENTRAL_PANE_SCREEN_NAMES = new Set([ SCREENS.SETTINGS.WORKSPACES, SCREENS.SETTINGS.PREFERENCES.ROOT, SCREENS.SETTINGS.SECURITY, @@ -13,14 +13,14 @@ const CENTRAL_PANE_SCREEN_NAMES = [ SCREENS.SETTINGS.SUBSCRIPTION.ROOT, SCREENS.SEARCH.CENTRAL_PANE, SCREENS.REPORT, -]; +]); function isCentralPaneName(screen: string | undefined): screen is CentralPaneName { if (!screen) { return false; } - return CENTRAL_PANE_SCREEN_NAMES.includes(screen as CentralPaneName); + return CENTRAL_PANE_SCREEN_NAMES.has(screen as CentralPaneName); } export default isCentralPaneName; diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index b85d93bf0d33..24471b7f0140 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -297,7 +297,7 @@ Onyx.connect({ const transactionThreadReportID = ReportActionUtils.getOneTransactionThreadReportID(reportID, actions[reportActions[0]]); if (transactionThreadReportID) { const transactionThreadReportActionsArray = Object.values(actions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionThreadReportID}`] ?? {}); - sortedReportActions = ReportActionUtils.getCombinedReportActions(reportActionsArray, transactionThreadReportActionsArray, reportID); + sortedReportActions = ReportActionUtils.getCombinedReportActions(reportActionsArray, transactionThreadReportID, transactionThreadReportActionsArray, reportID); } lastReportActions[reportID] = sortedReportActions[0]; diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 352a75bf9255..2132b97ef555 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -191,7 +191,7 @@ function getWhisperedTo(reportAction: OnyxInputOrEntry): number[] const originalMessage = getOriginalMessage(reportAction); const message = getReportActionMessage(reportAction); - if (!(originalMessage && 'whisperedTo' in originalMessage) && !(message && 'whisperedTo' in message)) { + if (!(originalMessage && typeof originalMessage === 'object' && 'whisperedTo' in originalMessage) && !(message && typeof message === 'object' && 'whisperedTo' in message)) { return []; } @@ -199,10 +199,14 @@ function getWhisperedTo(reportAction: OnyxInputOrEntry): number[] return message?.whisperedTo ?? []; } - if (originalMessage && 'whisperedTo' in originalMessage) { + if (originalMessage && typeof originalMessage === 'object' && 'whisperedTo' in originalMessage) { return originalMessage?.whisperedTo ?? []; } + if (typeof originalMessage !== 'object') { + Log.info('Original message is not an object for reportAction: ', true, {reportActionID: reportAction?.reportActionID, actionName: reportAction?.actionName}); + } + return []; } @@ -373,14 +377,18 @@ function shouldIgnoreGap(currentReportAction: ReportAction | undefined, nextRepo * Returns a sorted and filtered list of report actions from a report and it's associated child * transaction thread report in order to correctly display reportActions from both reports in the one-transaction report view. */ -function getCombinedReportActions(reportActions: ReportAction[], transactionThreadReportActions: ReportAction[], reportID?: string): ReportAction[] { - if (isEmptyObject(transactionThreadReportActions)) { +function getCombinedReportActions( + reportActions: ReportAction[], + transactionThreadReportID: string | null, + transactionThreadReportActions: ReportAction[], + reportID?: string, +): ReportAction[] { + if (_.isEmpty(transactionThreadReportID)) { return reportActions; } // Filter out the created action from the transaction thread report actions, since we already have the parent report's created action in `reportActions` const filteredTransactionThreadReportActions = transactionThreadReportActions?.filter((action) => action.actionName !== CONST.REPORT.ACTIONS.TYPE.CREATED); - const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]; const isSelfDM = report?.chatType === CONST.REPORT.CHAT_TYPE.SELF_DM; // Filter out request and send money request actions because we don't want to show any preview actions for one transaction reports diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 3fe054efb3ea..cca52ac37c9d 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -5523,7 +5523,7 @@ function getSystemChat(): OnyxEntry { /** * Attempts to find a report in onyx with the provided list of participants. Does not include threads, task, expense, room, and policy expense chat. */ -function getChatByParticipants(newParticipantList: number[], reports: OnyxCollection = allReports): OnyxEntry { +function getChatByParticipants(newParticipantList: number[], reports: OnyxCollection = allReports, shouldIncludeGroupChats = false): OnyxEntry { const sortedNewParticipantList = newParticipantList.sort(); return Object.values(reports ?? {}).find((report) => { const participantAccountIDs = Object.keys(report?.participants ?? {}); @@ -5536,7 +5536,7 @@ function getChatByParticipants(newParticipantList: number[], reports: OnyxCollec isMoneyRequestReport(report) || isChatRoom(report) || isPolicyExpenseChat(report) || - isGroupChat(report) + (isGroupChat(report) && !shouldIncludeGroupChats) ) { return false; } diff --git a/src/libs/SearchUtils.ts b/src/libs/SearchUtils.ts index 6e6a541ccdff..460a686766a7 100644 --- a/src/libs/SearchUtils.ts +++ b/src/libs/SearchUtils.ts @@ -26,7 +26,7 @@ const columnNamesToSortingProperty = { [CONST.SEARCH.TABLE_COLUMNS.CATEGORY]: 'category' as const, [CONST.SEARCH.TABLE_COLUMNS.TYPE]: 'type' as const, [CONST.SEARCH.TABLE_COLUMNS.ACTION]: 'action' as const, - [CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION]: null, + [CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION]: 'comment' as const, [CONST.SEARCH.TABLE_COLUMNS.TAX_AMOUNT]: null, [CONST.SEARCH.TABLE_COLUMNS.RECEIPT]: null, }; @@ -254,8 +254,8 @@ function getSortedTransactionData(data: TransactionListItemType[], sortBy?: Sear } return data.sort((a, b) => { - const aValue = a[sortingProperty]; - const bValue = b[sortingProperty]; + const aValue = sortingProperty === 'comment' ? a.comment.comment : a[sortingProperty]; + const bValue = sortingProperty === 'comment' ? b.comment.comment : b[sortingProperty]; if (aValue === undefined || bValue === undefined) { return 0; diff --git a/src/libs/actions/App.ts b/src/libs/actions/App.ts index 846d19b25857..988de759d763 100644 --- a/src/libs/actions/App.ts +++ b/src/libs/actions/App.ts @@ -7,18 +7,9 @@ import Onyx from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; import {importEmojiLocale} from '@assets/emojis'; import * as API from '@libs/API'; -import type { - GetMissingOnyxMessagesParams, - HandleRestrictedEventParams, - OpenAppParams, - OpenOldDotLinkParams, - OpenProfileParams, - ReconnectAppParams, - UpdatePreferredLocaleParams, -} from '@libs/API/parameters'; +import type {GetMissingOnyxMessagesParams, HandleRestrictedEventParams, OpenAppParams, OpenOldDotLinkParams, ReconnectAppParams, UpdatePreferredLocaleParams} from '@libs/API/parameters'; import {SIDE_EFFECT_REQUEST_COMMANDS, WRITE_COMMANDS} from '@libs/API/types'; import * as Browser from '@libs/Browser'; -import DateUtils from '@libs/DateUtils'; import {buildEmojisTrie} from '@libs/EmojiTrie'; import Log from '@libs/Log'; import getCurrentUrl from '@libs/Navigation/currentUrl'; @@ -32,7 +23,6 @@ import type {OnyxKey} from '@src/ONYXKEYS'; import type {Route} from '@src/ROUTES'; import ROUTES from '@src/ROUTES'; import type * as OnyxTypes from '@src/types/onyx'; -import type {SelectedTimezone} from '@src/types/onyx/PersonalDetails'; import type {OnyxData} from '@src/types/onyx/Request'; import * as Policy from './Policy/Policy'; import * as Session from './Session'; @@ -457,52 +447,6 @@ function redirectThirdPartyDesktopSignIn() { } } -function openProfile(personalDetails: OnyxTypes.PersonalDetails) { - const oldTimezoneData = personalDetails.timezone ?? {}; - let newTimezoneData = oldTimezoneData; - - if (oldTimezoneData?.automatic ?? true) { - newTimezoneData = { - automatic: true, - selected: Intl.DateTimeFormat().resolvedOptions().timeZone as SelectedTimezone, - }; - } - - newTimezoneData = DateUtils.formatToSupportedTimezone(newTimezoneData); - - const parameters: OpenProfileParams = { - timezone: JSON.stringify(newTimezoneData), - }; - - // We expect currentUserAccountID to be a number because it doesn't make sense to open profile if currentUserAccountID is not set - if (typeof currentUserAccountID === 'number') { - API.write(WRITE_COMMANDS.OPEN_PROFILE, parameters, { - optimisticData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.PERSONAL_DETAILS_LIST, - value: { - [currentUserAccountID]: { - timezone: newTimezoneData, - }, - }, - }, - ], - failureData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.PERSONAL_DETAILS_LIST, - value: { - [currentUserAccountID]: { - timezone: oldTimezoneData, - }, - }, - }, - ], - }); - } -} - /** * @param shouldAuthenticateWithCurrentAccount Optional, indicates whether default authentication method (shortLivedAuthToken) should be used */ @@ -558,7 +502,6 @@ export { setLocaleAndNavigate, setSidebarLoaded, setUpPoliciesAndNavigate, - openProfile, redirectThirdPartyDesktopSignIn, openApp, reconnectApp, diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 6a9427e884ec..44f92d73e8dc 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -3776,11 +3776,9 @@ function getOrCreateOptimisticSplitChatReport(existingSplitChatReportID: string, // Check if the report is available locally if we do have one let existingSplitChatReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${existingChatReportID}`]; - // If we do not have one locally then we will search for a chat with the same participants (only for 1:1 chats). - const shouldGetOrCreateOneOneDM = participants.length < 2; const allParticipantsAccountIDs = [...participantAccountIDs, currentUserAccountID]; - if (!existingSplitChatReport && shouldGetOrCreateOneOneDM) { - existingSplitChatReport = ReportUtils.getChatByParticipants(allParticipantsAccountIDs); + if (!existingSplitChatReport) { + existingSplitChatReport = ReportUtils.getChatByParticipants(allParticipantsAccountIDs, undefined, participantAccountIDs.length > 1); } // We found an existing chat report we are done... diff --git a/src/libs/actions/PaymentMethods.ts b/src/libs/actions/PaymentMethods.ts index 6371c970379f..60efc55f37a4 100644 --- a/src/libs/actions/PaymentMethods.ts +++ b/src/libs/actions/PaymentMethods.ts @@ -5,15 +5,23 @@ import type {OnyxEntry, OnyxUpdate} from 'react-native-onyx'; import Onyx from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; import * as API from '@libs/API'; -import type {AddPaymentCardParams, DeletePaymentCardParams, MakeDefaultPaymentMethodParams, PaymentCardParams, TransferWalletBalanceParams} from '@libs/API/parameters'; -import {READ_COMMANDS, WRITE_COMMANDS} from '@libs/API/types'; +import type { + AddPaymentCardParams, + DeletePaymentCardParams, + MakeDefaultPaymentMethodParams, + PaymentCardParams, + TransferWalletBalanceParams, + UpdateBillingCurrencyParams, +} from '@libs/API/parameters'; +import {READ_COMMANDS, SIDE_EFFECT_REQUEST_COMMANDS, WRITE_COMMANDS} from '@libs/API/types'; import * as CardUtils from '@libs/CardUtils'; import Navigation from '@libs/Navigation/Navigation'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {Route} from '@src/ROUTES'; -import INPUT_IDS from '@src/types/form/AddDebitCardForm'; +import INPUT_IDS from '@src/types/form/AddPaymentCardForm'; import type {BankAccountList, FundList} from '@src/types/onyx'; +import type {AccountData} from '@src/types/onyx/Fund'; import type {PaymentMethodType} from '@src/types/onyx/OriginalMessage'; import type PaymentMethod from '@src/types/onyx/PaymentMethod'; import type {FilterMethodPaymentType} from '@src/types/onyx/WalletTransfer'; @@ -167,7 +175,7 @@ function addPaymentCard(params: PaymentCardParams) { const optimisticData: OnyxUpdate[] = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, + key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, value: {isLoading: true}, }, ]; @@ -175,7 +183,7 @@ function addPaymentCard(params: PaymentCardParams) { const successData: OnyxUpdate[] = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, + key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, value: {isLoading: false}, }, ]; @@ -183,7 +191,7 @@ function addPaymentCard(params: PaymentCardParams) { const failureData: OnyxUpdate[] = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, + key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, value: {isLoading: false}, }, ]; @@ -224,7 +232,7 @@ function addSubscriptionPaymentCard(cardData: { const optimisticData: OnyxUpdate[] = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, + key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, value: {isLoading: true}, }, ]; @@ -232,7 +240,7 @@ function addSubscriptionPaymentCard(cardData: { const successData: OnyxUpdate[] = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, + key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, value: {isLoading: false}, }, ]; @@ -240,24 +248,37 @@ function addSubscriptionPaymentCard(cardData: { const failureData: OnyxUpdate[] = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, + key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, value: {isLoading: false}, }, ]; - // TODO integrate API for subscription card as a follow up - API.write(WRITE_COMMANDS.ADD_PAYMENT_CARD, parameters, { - optimisticData, - successData, - failureData, - }); + if (currency === CONST.CURRENCY.GBP) { + // eslint-disable-next-line rulesdir/no-api-side-effects-method + API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.ADD_PAYMENT_CARD_GBR, parameters, {optimisticData, successData, failureData}).then((response) => { + if (response?.jsonCode !== CONST.JSON_CODE.SUCCESS) { + return; + } + // TODO 3ds flow will be done as a part https://github.com/Expensify/App/issues/42432 + // We will use this onyx key to open Modal and preview iframe. Potentially we can save the whole object which come from side effect + Onyx.set(ONYXKEYS.VERIFY_3DS_SUBSCRIPTION, (response as {authenticationLink: string}).authenticationLink); + }); + } else { + // eslint-disable-next-line rulesdir/no-multiple-api-calls + API.write(WRITE_COMMANDS.ADD_PAYMENT_CARD, parameters, { + optimisticData, + successData, + failureData, + }); + Navigation.goBack(); + } } /** - * Resets the values for the add debit card form back to their initial states + * Resets the values for the add payment card form back to their initial states */ -function clearDebitCardFormErrorAndSubmit() { - Onyx.set(ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, { +function clearPaymentCardFormErrorAndSubmit() { + Onyx.set(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, { isLoading: false, errors: undefined, [INPUT_IDS.SETUP_COMPLETE]: false, @@ -269,6 +290,25 @@ function clearDebitCardFormErrorAndSubmit() { [INPUT_IDS.ADDRESS_ZIP_CODE]: '', [INPUT_IDS.ADDRESS_STATE]: '', [INPUT_IDS.ACCEPT_TERMS]: '', + [INPUT_IDS.CURRENCY]: CONST.CURRENCY.USD, + }); +} + +/** + * Clear 3ds flow - when verification will be finished + * + */ +function clearPaymentCard3dsVerification() { + Onyx.set(ONYXKEYS.VERIFY_3DS_SUBSCRIPTION, ''); +} + +/** + * Set currency for payments + * + */ +function setPaymentMethodCurrency(currency: ValueOf) { + Onyx.merge(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, { + [INPUT_IDS.CURRENCY]: currency, }); } @@ -421,6 +461,69 @@ function deletePaymentCard(fundID: number) { }); } +/** + * Call the API to change billing currency. + * + */ +function updateBillingCurrency(currency: ValueOf, cardCVV: string) { + const parameters: UpdateBillingCurrencyParams = { + cardCVV, + currency, + }; + + const optimisticData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.FORMS.CHANGE_BILLING_CURRENCY_FORM, + value: { + isLoading: true, + errors: null, + }, + }, + ]; + + const successData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.FORMS.CHANGE_BILLING_CURRENCY_FORM, + value: { + isLoading: false, + }, + }, + ]; + + const failureData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.FORMS.CHANGE_BILLING_CURRENCY_FORM, + value: { + isLoading: false, + }, + }, + ]; + + API.write(WRITE_COMMANDS.UPDATE_BILLING_CARD_CURRENCY, parameters, { + optimisticData, + successData, + failureData, + }); +} + +/** + * Set payment card form with API data + * + */ +function setPaymentCardForm(values: AccountData) { + Onyx.merge(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, { + [INPUT_IDS.CARD_NUMBER]: values.cardNumber, + [INPUT_IDS.EXPIRATION_DATE]: `${values.cardMonth}${values.cardYear?.toString()?.substring(2)}`, + [INPUT_IDS.ADDRESS_STREET]: values.addressStreet, + [INPUT_IDS.ADDRESS_ZIP_CODE]: values.addressZip?.toString(), + [INPUT_IDS.ADDRESS_STATE]: values.addressState, + [INPUT_IDS.CURRENCY]: values.currency, + }); +} + export { deletePaymentCard, addPaymentCard, @@ -429,15 +532,19 @@ export { kycWallRef, continueSetup, addSubscriptionPaymentCard, - clearDebitCardFormErrorAndSubmit, + clearPaymentCardFormErrorAndSubmit, dismissSuccessfulTransferBalancePage, transferWalletBalance, resetWalletTransferData, saveWalletTransferAccountTypeAndID, saveWalletTransferMethodType, hasPaymentMethodError, + updateBillingCurrency, clearDeletePaymentMethodError, clearAddPaymentMethodError, clearWalletError, + setPaymentMethodCurrency, + clearPaymentCard3dsVerification, clearWalletTermsError, + setPaymentCardForm, }; diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index 5945c09d67af..d1326ee8f733 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -2190,6 +2190,7 @@ function createWorkspaceFromIOUPayment(iouReport: OnyxEntry): string | u }, }, ]; + successData.push(...employeeWorkspaceChat.onyxSuccessData); successData.push(...employeeWorkspaceChat.onyxSuccessData); diff --git a/src/libs/actions/__mocks__/App.ts b/src/libs/actions/__mocks__/App.ts index 3d2b5814684b..03744b397597 100644 --- a/src/libs/actions/__mocks__/App.ts +++ b/src/libs/actions/__mocks__/App.ts @@ -11,7 +11,6 @@ const { setLocaleAndNavigate, setSidebarLoaded, setUpPoliciesAndNavigate, - openProfile, redirectThirdPartyDesktopSignIn, openApp, reconnectApp, @@ -59,7 +58,6 @@ export { setLocaleAndNavigate, setSidebarLoaded, setUpPoliciesAndNavigate, - openProfile, redirectThirdPartyDesktopSignIn, openApp, reconnectApp, diff --git a/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx b/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx index 244b997f6ec6..03a4b790bc5f 100644 --- a/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx +++ b/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx @@ -100,6 +100,7 @@ function BaseOnboardingPurpose({shouldUseNativeStyles, shouldEnableMaxHeight, on hoverAndPressStyle: [styles.purposeMenuItemSelected], rightComponent: selectedCheckboxIcon, shouldShowRightComponent: isSelected, + numberOfLinesTitle: 0, onPress: () => { Welcome.setOnboardingPurposeSelected(choice); setErrorMessage(''); diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index 5c42f4a6cccd..8737c352237f 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -96,6 +96,7 @@ function ReportActionsView({ isLoadingNewerReportActions = false, hasLoadingNewerReportActionsError = false, isReadyForCommentLinking = false, + transactionThreadReportID, }: ReportActionsViewProps) { useCopySelectionHelper(); const reactionListRef = useContext(ReactionListContext); @@ -154,11 +155,72 @@ function ReportActionsView({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [route, isLoadingInitialReportActions, reportActionID]); + // When we are offline before opening an IOU/Expense report, + // the total of the report and sometimes the expense aren't displayed because these actions aren't returned until `OpenReport` API is complete. + // We generate a fake created action here if it doesn't exist to display the total whenever possible because the total just depends on report data + // and we also generate an expense action if the number of expenses in allReportActions is less than the total number of expenses + // to display at least one expense action to match the total data. + const reportActionsToDisplay = useMemo(() => { + if (!ReportUtils.isMoneyRequestReport(report) || !allReportActions.length) { + return allReportActions; + } + + const actions = [...allReportActions]; + const lastAction = allReportActions[allReportActions.length - 1]; + + if (!ReportActionsUtils.isCreatedAction(lastAction)) { + const optimisticCreatedAction = ReportUtils.buildOptimisticCreatedReportAction(String(report?.ownerAccountID), DateUtils.subtractMillisecondsFromDateTime(lastAction.created, 1)); + optimisticCreatedAction.pendingAction = null; + actions.push(optimisticCreatedAction); + } + + const reportPreviewAction = ReportActionsUtils.getReportPreviewAction(report.chatReportID ?? '', report.reportID); + const moneyRequestActions = allReportActions.filter((action) => { + const originalMessage = ReportActionsUtils.isMoneyRequestAction(action) ? ReportActionsUtils.getOriginalMessage(action) : undefined; + return ( + ReportActionsUtils.isMoneyRequestAction(action) && + originalMessage && + (originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE || + !!(originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.PAY && originalMessage?.IOUDetails) || + originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.TRACK) + ); + }); + + if (report.total && moneyRequestActions.length < (reportPreviewAction?.childMoneyRequestCount ?? 0) && isEmptyObject(transactionThreadReport)) { + const optimisticIOUAction = ReportUtils.buildOptimisticIOUReportAction( + CONST.IOU.REPORT_ACTION_TYPE.CREATE, + 0, + CONST.CURRENCY.USD, + '', + [], + NumberUtils.rand64(), + undefined, + report.reportID, + false, + false, + {}, + false, + DateUtils.subtractMillisecondsFromDateTime(actions[actions.length - 1].created, 1), + ) as OnyxTypes.ReportAction; + moneyRequestActions.push(optimisticIOUAction); + actions.splice(actions.length - 1, 0, optimisticIOUAction); + } + + // Update pending action of created action if we have some requests that are pending + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const createdAction = actions.pop()!; + if (moneyRequestActions.filter((action) => !!action.pendingAction).length > 0) { + createdAction.pendingAction = CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE; + } + + return [...actions, createdAction]; + }, [allReportActions, report, transactionThreadReport]); + // Get a sorted array of reportActions for both the current report and the transaction thread report associated with this report (if there is one) // so that we display transaction-level and report-level report actions in order in the one-transaction view const combinedReportActions = useMemo( - () => ReportActionsUtils.getCombinedReportActions(allReportActions, transactionThreadReportActions), - [allReportActions, transactionThreadReportActions], + () => ReportActionsUtils.getCombinedReportActions(reportActionsToDisplay, transactionThreadReportID ?? null, transactionThreadReportActions), + [reportActionsToDisplay, transactionThreadReportActions, transactionThreadReportID], ); const parentReportActionForTransactionThread = useMemo( @@ -460,67 +522,6 @@ function ReportActionsView({ }; }, [isTheFirstReportActionIsLinked]); - // When we are offline before opening an IOU/Expense report, - // the total of the report and sometimes the expense aren't displayed because these actions aren't returned until `OpenReport` API is complete. - // We generate a fake created action here if it doesn't exist to display the total whenever possible because the total just depends on report data - // and we also generate an expense action if the number of expenses in reportActions is less than the total number of expenses - // to display at least one expense action to match the total data. - const reportActionsToDisplay = useMemo(() => { - if (!ReportUtils.isMoneyRequestReport(report) || !reportActions.length) { - return reportActions; - } - - const actions = [...reportActions]; - const lastAction = reportActions[reportActions.length - 1]; - - if (!ReportActionsUtils.isCreatedAction(lastAction)) { - const optimisticCreatedAction = ReportUtils.buildOptimisticCreatedReportAction(String(report?.ownerAccountID), DateUtils.subtractMillisecondsFromDateTime(lastAction.created, 1)); - optimisticCreatedAction.pendingAction = null; - actions.push(optimisticCreatedAction); - } - - const reportPreviewAction = ReportActionsUtils.getReportPreviewAction(report.chatReportID ?? '-1', report.reportID); - const moneyRequestActions = reportActions.filter((action) => { - const originalMessage = ReportActionsUtils.isMoneyRequestAction(action) ? ReportActionsUtils.getOriginalMessage(action) : undefined; - return ( - ReportActionsUtils.isMoneyRequestAction(action) && - originalMessage && - (originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE || - !!(originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.PAY && originalMessage?.IOUDetails) || - originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.TRACK) - ); - }); - - if (report.total && moneyRequestActions.length < (reportPreviewAction?.childMoneyRequestCount ?? 0) && isEmptyObject(transactionThreadReport)) { - const optimisticIOUAction = ReportUtils.buildOptimisticIOUReportAction( - CONST.IOU.REPORT_ACTION_TYPE.CREATE, - 0, - CONST.CURRENCY.USD, - '', - [], - NumberUtils.rand64(), - undefined, - report.reportID, - false, - false, - {}, - false, - DateUtils.subtractMillisecondsFromDateTime(actions[actions.length - 1].created, 1), - ) as OnyxTypes.ReportAction; - moneyRequestActions.push(optimisticIOUAction); - actions.splice(actions.length - 1, 0, optimisticIOUAction); - } - - // Update pending action of created action if we have some requests that are pending - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const createdAction = actions.pop()!; - if (moneyRequestActions.filter((action) => !!action.pendingAction).length > 0) { - createdAction.pendingAction = CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE; - } - - return [...actions, createdAction]; - }, [reportActions, report, transactionThreadReport]); - // Comments have not loaded at all yet do nothing if (!reportActions.length) { return null; @@ -536,7 +537,7 @@ function ReportActionsView({ parentReportAction={parentReportAction} parentReportActionForTransactionThread={parentReportActionForTransactionThread} onLayout={recordTimeToMeasureItemLayout} - sortedReportActions={reportActionsToDisplay} + sortedReportActions={reportActions} mostRecentIOUReportActionID={mostRecentIOUReportActionID} loadOlderChats={loadOlderChats} loadNewerChats={loadNewerChats} diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index 46c0d10e08ac..58e69485c1b3 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -34,8 +34,9 @@ type MoneyRequestParticipantsSelectorProps = { /** Callback to add participants in MoneyRequestModal */ onParticipantsAdded: (value: Participant[]) => void; + /** Selected participants from MoneyRequestModal with login */ - participants?: Participant[]; + participants?: Participant[] | typeof CONST.EMPTY_ARRAY; /** The type of IOU report, i.e. split, request, send, track */ iouType: IOUType; @@ -47,7 +48,7 @@ type MoneyRequestParticipantsSelectorProps = { action: IOUAction; }; -function MoneyRequestParticipantsSelector({participants = [], onFinish, onParticipantsAdded, iouType, iouRequestType, action}: MoneyRequestParticipantsSelectorProps) { +function MoneyRequestParticipantsSelector({participants = CONST.EMPTY_ARRAY, onFinish, onParticipantsAdded, iouType, iouRequestType, action}: MoneyRequestParticipantsSelectorProps) { const {translate} = useLocalize(); const styles = useThemeStyles(); const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState(''); @@ -94,7 +95,7 @@ function MoneyRequestParticipantsSelector({participants = [], onFinish, onPartic options.personalDetails, betas, '', - participants, + participants as Participant[], CONST.EXPENSIFY_EMAILS, // If we are using this component in the "Submit expense" flow then we pass the includeOwnedWorkspaceChats argument so that the current user @@ -153,7 +154,7 @@ function MoneyRequestParticipantsSelector({participants = [], onFinish, onPartic const newOptions = OptionsListUtils.filterOptions(defaultOptions, debouncedSearchTerm, { betas, - selectedOptions: participants, + selectedOptions: participants as Participant[], excludeLogins: CONST.EXPENSIFY_EMAILS, maxRecentReportsToShow: CONST.IOU.MAX_RECENT_REPORTS_TO_SHOW, }); @@ -378,6 +379,17 @@ function MoneyRequestParticipantsSelector({participants = [], onFinish, onPartic onFinish, ]); + const onSelectRow = useCallback( + (item: Participant) => { + if (isIOUSplit) { + addParticipantToSelection(item); + return; + } + addSingleParticipant(item); + }, + [isIOUSplit, addParticipantToSelection, addSingleParticipant], + ); + return ( (isIOUSplit ? addParticipantToSelection(item) : addSingleParticipant(item))} + onSelectRow={onSelectRow} shouldDebounceRowSelect footerContent={footerContent} headerMessage={header} diff --git a/src/pages/settings/PaymentCard/ChangeCurrency/index.tsx b/src/pages/settings/PaymentCard/ChangeCurrency/index.tsx new file mode 100644 index 000000000000..affa5fde3706 --- /dev/null +++ b/src/pages/settings/PaymentCard/ChangeCurrency/index.tsx @@ -0,0 +1,43 @@ +import React, {useCallback} from 'react'; +import {View} from 'react-native'; +import {useOnyx} from 'react-native-onyx'; +import type {ValueOf} from 'type-fest'; +import PaymentCardChangeCurrencyForm from '@components/AddPaymentCard/PaymentCardChangeCurrencyForm'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import Navigation from '@navigation/Navigation'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import type CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; + +function ChangeCurrency() { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + const [debitCardForm] = useOnyx(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM); + + const changeCurrency = useCallback((currency?: ValueOf) => { + if (currency) { + PaymentMethods.setPaymentMethodCurrency(currency); + } + + Navigation.goBack(); + }, []); + + return ( + + + + + + + ); +} + +ChangeCurrency.displayName = 'ChangeCurrency'; + +export default ChangeCurrency; diff --git a/src/pages/settings/Profile/ProfilePage.tsx b/src/pages/settings/Profile/ProfilePage.tsx index ae252da6fff6..a31945d40f12 100755 --- a/src/pages/settings/Profile/ProfilePage.tsx +++ b/src/pages/settings/Profile/ProfilePage.tsx @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react'; +import React from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; @@ -21,7 +21,6 @@ import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as UserUtils from '@libs/UserUtils'; -import * as App from '@userActions/App'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -101,10 +100,6 @@ function ProfilePage({ }, ]; - useEffect(() => { - App.openProfile(currentUserPersonalDetails); - }, [currentUserPersonalDetails]); - const privateOptions = [ { description: translate('privatePersonalDetails.legalName'), diff --git a/src/pages/settings/Subscription/CardSection/CardSectionActions/index.tsx b/src/pages/settings/Subscription/CardSection/CardSectionActions/index.tsx index 09f8e525014d..6bcc5822c186 100644 --- a/src/pages/settings/Subscription/CardSection/CardSectionActions/index.tsx +++ b/src/pages/settings/Subscription/CardSection/CardSectionActions/index.tsx @@ -31,7 +31,7 @@ function CardSectionActions() { { icon: Expensicons.MoneyCircle, text: translate('subscription.cardSection.changeCurrency'), - onSelected: () => {}, // TODO: update with navigation to "change currency" screen (https://github.com/Expensify/App/issues/38629) + onSelected: () => Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION_CHANGE_BILLING_CURRENCY), }, ], [translate], diff --git a/src/pages/settings/Subscription/CardSection/CardSectionDataEmpty/index.tsx b/src/pages/settings/Subscription/CardSection/CardSectionDataEmpty/index.tsx index a20ad3c0a96c..627556e7b5bd 100644 --- a/src/pages/settings/Subscription/CardSection/CardSectionDataEmpty/index.tsx +++ b/src/pages/settings/Subscription/CardSection/CardSectionDataEmpty/index.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useCallback} from 'react'; import Button from '@components/Button'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -9,10 +9,14 @@ function CardSectionDataEmpty() { const {translate} = useLocalize(); const styles = useThemeStyles(); + const openAddPaymentCardScreen = useCallback(() => { + Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION_ADD_PAYMENT_CARD); + }, []); + return (