From 1f3726e1c47dee757d6fc389709f32223fe9a3e6 Mon Sep 17 00:00:00 2001 From: Shubham Agrawal Date: Wed, 3 Apr 2024 15:57:50 +0530 Subject: [PATCH 01/29] Renaming money request to expense --- src/CONST.ts | 2 +- src/ONYXKEYS.ts | 4 +- src/components/ConfirmedRoute.tsx | 2 +- src/components/DistanceEReceipt.tsx | 2 +- .../DistanceRequest/DistanceRequestFooter.tsx | 2 +- .../DistanceRequestRenderItem.tsx | 2 +- src/components/HoldBanner.tsx | 2 +- src/components/MoneyReportHeader.tsx | 2 +- .../MoneyRequestConfirmationList.tsx | 2 +- src/components/MoneyRequestHeader.tsx | 8 +- ...oraryForRefactorRequestConfirmationList.js | 26 +++--- .../ReportActionItem/MoneyRequestAction.tsx | 6 +- .../MoneyRequestPreviewContent.tsx | 2 +- .../MoneyRequestPreview/types.ts | 2 +- .../ReportActionItem/MoneyRequestView.tsx | 4 +- .../ReportActionItem/ReportPreview.tsx | 10 +- src/components/SettlementButton.tsx | 4 +- src/components/TagPicker/index.tsx | 2 +- src/components/transactionPropTypes.js | 2 +- src/languages/en.ts | 80 ++++++++-------- src/languages/es.ts | 28 +++--- src/libs/DistanceRequestUtils.ts | 10 +- src/libs/IOUUtils.ts | 4 +- src/libs/ModifiedExpenseMessage.ts | 4 +- src/libs/MoneyRequestUtils.ts | 4 +- src/libs/OptionsListUtils.ts | 2 +- src/libs/ReportActionsUtils.ts | 4 +- src/libs/ReportUtils.ts | 93 +++++++++---------- src/libs/TransactionUtils.ts | 10 +- src/libs/actions/IOU.ts | 66 ++++++------- src/libs/actions/Transaction.ts | 6 +- src/libs/actions/User.ts | 6 +- .../TransactionBackupsToCollection.ts | 2 +- .../PurposeForUsingExpensifyPage.tsx | 12 +-- src/pages/home/HeaderView.tsx | 2 +- src/pages/home/ReportScreen.tsx | 2 +- .../report/ContextMenu/ContextMenuActions.tsx | 4 +- .../AttachmentPickerWithMenuItems.tsx | 6 +- src/pages/home/report/ReportActionItem.tsx | 12 +-- src/pages/home/report/ReportActionsView.tsx | 8 +- .../FloatingActionButtonAndPopover.js | 8 +- src/pages/iou/HoldReasonPage.tsx | 4 +- src/pages/iou/IOUCurrencySelection.js | 12 +-- src/pages/iou/propTypes/index.js | 14 +-- .../request/IOURequestRedirectToStartPage.js | 4 +- src/pages/iou/request/IOURequestStartPage.js | 10 +- ...yForRefactorRequestParticipantsSelector.js | 12 +-- .../iou/request/step/IOURequestStepAmount.js | 2 +- .../request/step/IOURequestStepCategory.js | 2 +- .../step/IOURequestStepConfirmation.js | 2 +- .../request/step/IOURequestStepCurrency.js | 2 +- .../iou/request/step/IOURequestStepDate.js | 2 +- .../request/step/IOURequestStepDescription.js | 2 +- .../request/step/IOURequestStepDistance.js | 4 +- .../request/step/IOURequestStepMerchant.js | 2 +- .../step/IOURequestStepParticipants.js | 6 +- .../step/IOURequestStepRoutePropTypes.js | 2 +- .../iou/request/step/IOURequestStepTag.js | 2 +- .../step/IOURequestStepTaxAmountPage.js | 6 +- .../iou/steps/MoneyRequestAmountForm.tsx | 2 +- src/types/onyx/Report.ts | 2 +- src/types/onyx/Transaction.ts | 6 +- tests/actions/IOUTest.ts | 42 ++++----- .../ReportActionCompose.perf-test.tsx | 2 +- tests/unit/ModifiedExpenseMessageTest.ts | 2 +- tests/unit/ReportUtilsTest.js | 6 +- 66 files changed, 302 insertions(+), 309 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 0fa1c64be44d..049b374684df 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1336,7 +1336,7 @@ const CONST = { }, IOU: { - // This is the transactionID used when going through the create money request flow so that it mimics a real transaction (like the edit flow) + // This is the transactionID used when going through the create expense flow so that it mimics a real transaction (like the edit flow) OPTIMISTIC_TRANSACTION_ID: '1', // Note: These payment types are used when building IOU reportAction message values in the server and should // not be changed. diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index c134d2a65db2..e46f6aa5fc46 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -127,7 +127,7 @@ const ONYXKEYS = { /** The NVP with the last payment method used per policy */ NVP_LAST_PAYMENT_METHOD: 'nvp_private_lastPaymentMethod', - /** This NVP holds to most recent waypoints that a person has used when creating a distance request */ + /** This NVP holds to most recent waypoints that a person has used when creating a distance expense */ NVP_RECENT_WAYPOINTS: 'expensify_recentWaypoints', /** This NVP will be `true` if the user has ever dismissed the engagement modal on either OldDot or NewDot. If it becomes true it should stay true forever. */ @@ -341,7 +341,7 @@ const ONYXKEYS = { PRIVATE_NOTES_DRAFT: 'privateNotesDraft_', NEXT_STEP: 'reportNextStep_', - // Manual request tab selector + // Manual expense tab selector SELECTED_TAB: 'selectedTab_', /** This is deprecated, but needed for a migration, so we still need to include it here so that it will be initialized in Onyx.init */ diff --git a/src/components/ConfirmedRoute.tsx b/src/components/ConfirmedRoute.tsx index 17c5097b8154..351129a5ee3e 100644 --- a/src/components/ConfirmedRoute.tsx +++ b/src/components/ConfirmedRoute.tsx @@ -24,7 +24,7 @@ type ConfirmedRoutePropsOnyxProps = { }; type ConfirmedRouteProps = ConfirmedRoutePropsOnyxProps & { - /** Transaction that stores the distance request data */ + /** Transaction that stores the distance expense data */ transaction: OnyxEntry; }; diff --git a/src/components/DistanceEReceipt.tsx b/src/components/DistanceEReceipt.tsx index 20b927913bfb..f6adac9b6034 100644 --- a/src/components/DistanceEReceipt.tsx +++ b/src/components/DistanceEReceipt.tsx @@ -20,7 +20,7 @@ import ScrollView from './ScrollView'; import Text from './Text'; type DistanceEReceiptProps = { - /** The transaction for the distance request */ + /** The transaction for the distance expense */ transaction: Transaction; }; diff --git a/src/components/DistanceRequest/DistanceRequestFooter.tsx b/src/components/DistanceRequest/DistanceRequestFooter.tsx index 624ea940888b..e21bdc1c9e56 100644 --- a/src/components/DistanceRequest/DistanceRequestFooter.tsx +++ b/src/components/DistanceRequest/DistanceRequestFooter.tsx @@ -27,7 +27,7 @@ type DistanceRequestFooterOnyxProps = { }; type DistanceRequestFooterProps = DistanceRequestFooterOnyxProps & { - /** The waypoints for the distance request */ + /** The waypoints for the distance expense */ waypoints?: WaypointCollection; /** Function to call when the user wants to add a new waypoint */ diff --git a/src/components/DistanceRequest/DistanceRequestRenderItem.tsx b/src/components/DistanceRequest/DistanceRequestRenderItem.tsx index 57e4fb0b530e..75345f9aa621 100644 --- a/src/components/DistanceRequest/DistanceRequestRenderItem.tsx +++ b/src/components/DistanceRequest/DistanceRequestRenderItem.tsx @@ -7,7 +7,7 @@ import type {TranslationPaths} from '@src/languages/types'; import type {WaypointCollection} from '@src/types/onyx/Transaction'; type DistanceRequestProps = { - /** The waypoints for the distance request */ + /** The waypoints for the distance expense */ waypoints?: WaypointCollection; /** The index of the item */ diff --git a/src/components/HoldBanner.tsx b/src/components/HoldBanner.tsx index af77d9076629..d760d4efbe96 100644 --- a/src/components/HoldBanner.tsx +++ b/src/components/HoldBanner.tsx @@ -12,7 +12,7 @@ function HoldBanner() { return ( {translate('iou.hold')} - {translate('iou.requestOnHold')} + {translate('iou.expenseOnHold')} ); } diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 488dfc574ab2..ede38c75f278 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -38,7 +38,7 @@ type MoneyReportHeaderProps = MoneyReportHeaderOnyxProps & { /** The report currently being looked at */ report: OnyxTypes.Report; - /** The policy tied to the money request report */ + /** The policy tied to the expense report */ policy: OnyxEntry; }; diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx index 2cda2530d769..d92999210114 100755 --- a/src/components/MoneyRequestConfirmationList.tsx +++ b/src/components/MoneyRequestConfirmationList.tsx @@ -343,7 +343,7 @@ function MoneyRequestConfirmationList({ if (isSplitBill && iouAmount === 0) { text = translate('iou.split'); } else if ((!!receiptPath && isTypeRequest) || isDistanceRequestWithPendingRoute) { - text = translate('iou.request'); + text = translate('iou.expense'); if (iouAmount !== 0) { text = translate('iou.requestAmount', {amount: formattedAmount}); } diff --git a/src/components/MoneyRequestHeader.tsx b/src/components/MoneyRequestHeader.tsx index 5d3231ca0a41..8d6826015f0b 100644 --- a/src/components/MoneyRequestHeader.tsx +++ b/src/components/MoneyRequestHeader.tsx @@ -63,7 +63,7 @@ function MoneyRequestHeader({session, parentReport, report, parentReportAction, const isOnHold = TransactionUtils.isOnHold(transaction); const {isSmallScreenWidth, windowWidth} = useWindowDimensions(); - // Only the requestor can take delete the request, admins can only edit it. + // Only the requestor can take delete the expense, admins can only edit it. const isActionOwner = typeof parentReportAction?.actorAccountID === 'number' && typeof session?.accountID === 'number' && parentReportAction.actorAccountID === session?.accountID; const isPolicyAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN; const isApprover = ReportUtils.isMoneyRequestReport(moneyRequestReport) && (session?.accountID ?? null) === moneyRequestReport?.managerID; @@ -118,14 +118,14 @@ function MoneyRequestHeader({session, parentReport, report, parentReportAction, if (isOnHold && (isHoldCreator || (!isRequestIOU && canModifyStatus))) { threeDotsMenuItems.push({ icon: Expensicons.Stopwatch, - text: translate('iou.unholdRequest'), + text: translate('iou.unholdExpense'), onSelected: () => changeMoneyRequestStatus(), }); } if (!isOnHold && (isRequestIOU || canModifyStatus)) { threeDotsMenuItems.push({ icon: Expensicons.Stopwatch, - text: translate('iou.holdRequest'), + text: translate('iou.holdExpense'), onSelected: () => changeMoneyRequestStatus(), }); } @@ -196,7 +196,7 @@ function MoneyRequestHeader({session, parentReport, report, parentReportAction, {isOnHold && } setIsDeleteModalVisible(false)} diff --git a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js index 3fd76eea657b..434451af3640 100755 --- a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js +++ b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js @@ -93,7 +93,7 @@ const propTypes = { /** Selected participants from MoneyRequestModal with login / accountID */ selectedParticipants: PropTypes.arrayOf(optionPropTypes).isRequired, - /** Payee of the money request with login */ + /** Payee of the expense with login */ payeePersonalDetails: optionPropTypes, /** Can the participants be modified or not */ @@ -102,7 +102,7 @@ const propTypes = { /** Should the list be read only, and not editable? */ isReadOnly: PropTypes.bool, - /** Whether the money request is a scan request */ + /** Whether the expense is a scan expense */ isScanRequest: PropTypes.bool, /** Depending on expense report or personal IOU report, respective bank account route */ @@ -115,10 +115,10 @@ const propTypes = { email: PropTypes.string.isRequired, }), - /** The policyID of the request */ + /** The policyID of the expense */ policyID: PropTypes.string, - /** The reportID of the request */ + /** The reportID of the expense */ reportID: PropTypes.string, /** File path of the receipt */ @@ -130,25 +130,25 @@ const propTypes = { /** List styles for OptionsSelector */ listStyles: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]), - /** ID of the transaction that represents the money request */ + /** ID of the transaction that represents the expense */ transactionID: PropTypes.string, - /** Unit and rate used for if the money request is a distance request */ + /** Unit and rate used for if the expense is a distance expense */ mileageRate: PropTypes.shape({ /** Unit used to represent distance */ unit: PropTypes.oneOf([CONST.CUSTOM_UNITS.DISTANCE_UNIT_MILES, CONST.CUSTOM_UNITS.DISTANCE_UNIT_KILOMETERS]), - /** Rate used to calculate the distance request amount */ + /** Rate used to calculate the distance expense amount */ rate: PropTypes.number, /** The currency of the rate */ currency: PropTypes.string, }), - /** Whether the money request is a distance request */ + /** Whether the expense is a distance expense */ isDistanceRequest: PropTypes.bool, - /** Whether we're editing a split bill */ + /** Whether we're editing a split expense */ isEditingSplitBill: PropTypes.bool, /** Whether we should show the amount, date, and merchant fields. */ @@ -168,7 +168,7 @@ const propTypes = { /** The policy of the report */ policy: policyPropTypes.policy, - /** Transaction that represents the money request */ + /** Transaction that represents the expense */ transaction: transactionPropTypes, }; @@ -265,7 +265,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ // A flag and a toggler for showing the rest of the form fields const [shouldExpandFields, toggleShouldExpandFields] = useReducer((state) => !state, false); - // Do not hide fields in case of send money request + // Do not hide fields in case of paying someone const shouldShowAllFields = isDistanceRequest || shouldExpandFields || !shouldShowSmartScanFields || isTypeSend || isEditingSplitBill; const shouldShowDate = (shouldShowSmartScanFields || isDistanceRequest) && !isTypeSend; @@ -387,7 +387,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ } else if (isTypeSplit && iouAmount === 0) { text = translate('iou.split'); } else if ((receiptPath && isTypeRequest) || isDistanceRequestWithPendingRoute) { - text = translate('iou.request'); + text = translate('iou.expense'); if (iouAmount !== 0) { text = translate('iou.requestAmount', {amount: formattedAmount}); } @@ -914,7 +914,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ isThumbnail={isThumbnail} source={receiptThumbnail || receiptImage} // AuthToken is required when retrieving the image from the server - // but we don't need it to load the blob:// or file:// image when starting a money request / split bill + // but we don't need it to load the blob:// or file:// image when starting a submit / split expense // So if we have a thumbnail, it means we're retrieving the image from the server isAuthTokenRequired={!_.isEmpty(receiptThumbnail)} fileExtension={fileExtension} diff --git a/src/components/ReportActionItem/MoneyRequestAction.tsx b/src/components/ReportActionItem/MoneyRequestAction.tsx index 7d9ba2697c7a..4f91b2084b45 100644 --- a/src/components/ReportActionItem/MoneyRequestAction.tsx +++ b/src/components/ReportActionItem/MoneyRequestAction.tsx @@ -37,7 +37,7 @@ type MoneyRequestActionProps = MoneyRequestActionOnyxProps & { /** The ID of the associated chatReport */ chatReportID: string; - /** The ID of the associated request report */ + /** The ID of the associated expense report */ requestReportID: string; /** The ID of the current report */ @@ -114,10 +114,8 @@ function MoneyRequestAction({ let message: TranslationPaths; if (isReversedTransaction) { message = 'parentReportAction.reversedTransaction'; - } else if (isTrackExpenseAction) { - message = 'parentReportAction.deletedExpense'; } else { - message = 'parentReportAction.deletedRequest'; + message = 'parentReportAction.deletedExpense'; } return ${translate(message)}`} />; } diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index 2e9f9a553b71..50f736101be3 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -101,7 +101,7 @@ function MoneyRequestPreviewContent({ /* Show the merchant for IOUs and expenses only if: - the merchant is not empty, is custom, or is not related to scanning smartscan; - - the request is not a distance request with a pending route and amount = 0 - in this case, + - the expense is not a distance expense with a pending route and amount = 0 - in this case, the merchant says: "Route pending...", which is already shown in the amount field; */ const shouldShowMerchant = diff --git a/src/components/ReportActionItem/MoneyRequestPreview/types.ts b/src/components/ReportActionItem/MoneyRequestPreview/types.ts index 3b3eda4ec30a..1c036bc0fbee 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/types.ts +++ b/src/components/ReportActionItem/MoneyRequestPreview/types.ts @@ -53,7 +53,7 @@ type MoneyRequestPreviewProps = MoneyRequestPreviewOnyxProps & { /** Extra styles to pass to View wrapper */ containerStyles?: StyleProp; - /** True if this is this IOU is a split instead of a 1:1 request */ + /** True if this is this IOU is a split instead of a submit expense */ isBillSplit: boolean; /** Whether this IOU is a track expense */ diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 37d939e13868..0d3ae5d1b037 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -120,7 +120,7 @@ function MoneyRequestView({ const cardProgramName = isCardTransaction && transactionCardID !== undefined ? CardUtils.getCardDescription(transactionCardID) : ''; const isApproved = ReportUtils.isReportApproved(moneyRequestReport); - // Flags for allowing or disallowing editing a money request + // Flags for allowing or disallowing editing an expense const isSettled = ReportUtils.isSettled(moneyRequestReport?.reportID); const isCancelled = moneyRequestReport && moneyRequestReport.isCancelledIOU; @@ -205,7 +205,7 @@ function MoneyRequestView({ const getErrorForField = useCallback( (field: ViolationField, data?: OnyxTypes.TransactionViolation['data']) => { - // Checks applied when creating a new money request + // Checks applied when creating a new expense // NOTE: receipt field can return multiple violations, so we need to handle it separately const fieldChecks: Partial> = { amount: { diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 8b95474bf2fc..af0b59aa91ba 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -34,7 +34,7 @@ import type {PaymentMethodType} from '@src/types/onyx/OriginalMessage'; import ReportActionItemImages from './ReportActionItemImages'; type ReportPreviewOnyxProps = { - /** The policy tied to the money request report */ + /** The policy tied to the expense report */ policy: OnyxEntry; /** ChatReport associated with iouReport */ @@ -146,7 +146,7 @@ function ReportPreview({ // Formatted merchant can be an empty string // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing formattedMerchant || - translate('iou.requestCount', { + translate('iou.expenseCount', { count: numberOfRequests - numberOfScanningReceipts - numberOfPendingRequests, scanningReceipts: numberOfScanningReceipts, pendingReceipts: numberOfPendingRequests, @@ -221,10 +221,10 @@ function ReportPreview({ /* Show subtitle if at least one of the money requests is not being smart scanned, and either: - - There is more than one money request – in this case, the "X requests, Y scanning" subtitle is shown; - - There is only one money request, it has a receipt and is not being smart scanned – in this case, the request merchant is shown; + - There is more than one expense – in this case, the "X expenses, Y scanning" subtitle is shown; + - There is only one expense, it has a receipt and is not being smart scanned – in this case, the expense merchant is shown; - * There is an edge case when there is only one distance request with a pending route and amount = 0. + * There is an edge case when there is only one distance expense with a pending route and amount = 0. In this case, we don't want to show the merchant because it says: "Pending route...", which is already displayed in the amount field. */ const shouldShowSingleRequestMerchant = numberOfRequests === 1 && !!formattedMerchant && !(hasOnlyTransactionsWithPendingRoutes && !totalDisplaySpend); diff --git a/src/components/SettlementButton.tsx b/src/components/SettlementButton.tsx index c6d603514014..570208574f54 100644 --- a/src/components/SettlementButton.tsx +++ b/src/components/SettlementButton.tsx @@ -177,13 +177,13 @@ function SettlementButton({ }; const canUseWallet = !isExpenseReport && currency === CONST.CURRENCY.USD; - // Only show the Approve button if the user cannot pay the request + // Only show the Approve button if the user cannot pay the expense if (shouldHidePaymentOptions && shouldShowApproveButton) { return [approveButtonOption]; } // To achieve the one tap pay experience we need to choose the correct payment type as default. - // If the user has previously chosen a specific payment option or paid for some request or expense, + // If the user has previously chosen a specific payment option or paid for some expense, // let's use the last payment method or use default. const paymentMethod = nvpLastPaymentMethod?.[policyID] ?? ''; if (canUseWallet) { diff --git a/src/components/TagPicker/index.tsx b/src/components/TagPicker/index.tsx index af8acd19e8c4..64c1980dc91f 100644 --- a/src/components/TagPicker/index.tsx +++ b/src/components/TagPicker/index.tsx @@ -32,7 +32,7 @@ type TagPickerProps = TagPickerOnyxProps & { // eslint-disable-next-line react/no-unused-prop-types policyID: string; - /** The selected tag of the money request */ + /** The selected tag of the expense */ selectedTag: string; /** The name of tag list we are getting tags for */ diff --git a/src/components/transactionPropTypes.js b/src/components/transactionPropTypes.js index 7eb1b776358c..f951837503f3 100644 --- a/src/components/transactionPropTypes.js +++ b/src/components/transactionPropTypes.js @@ -39,7 +39,7 @@ export default PropTypes.shape({ /** The text of the comment */ comment: PropTypes.string, - /** The waypoints defining the distance request */ + /** The waypoints defining the distance expense */ waypoints: PropTypes.shape({ /** The latitude of the waypoint */ lat: PropTypes.number, diff --git a/src/languages/en.ts b/src/languages/en.ts index d30b62fc50b3..2a79c605120a 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -412,7 +412,7 @@ export default { }, login: { hero: { - header: 'Split bills, request payments, and chat with friends.', + header: 'Track, submit, and split expenses, and chat with friends.', body: 'Welcome to the future of Expensify, your new go-to place for financial collaboration with friends and teammates alike.', }, }, @@ -465,12 +465,12 @@ export default { markAsUnread: 'Mark as unread', markAsRead: 'Mark as read', editAction: ({action}: EditActionParams) => - `Edit ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? `${action?.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.TRACK ? 'expense' : 'request'}` : 'comment'}`, + `Edit ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}`, deleteAction: ({action}: DeleteActionParams) => - `Delete ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? `${action?.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.TRACK ? 'expense' : 'request'}` : 'comment'}`, + `Delete ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}`, deleteConfirmation: ({action}: DeleteConfirmationParams) => `Are you sure you want to delete this ${ - action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? `${action?.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.TRACK ? 'expense' : 'request'}` : 'comment' + action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment' }?`, onlyVisible: 'Only visible to', replyInThread: 'Reply in thread', @@ -499,7 +499,7 @@ export default { beginningOfChatHistory: 'This is the beginning of your chat with ', beginningOfChatHistoryPolicyExpenseChatPartOne: 'Collaboration between ', beginningOfChatHistoryPolicyExpenseChatPartTwo: ' and ', - beginningOfChatHistoryPolicyExpenseChatPartThree: ' starts here! 🎉 This is the place to chat, request money and settle up.', + beginningOfChatHistoryPolicyExpenseChatPartThree: ' starts here! 🎉 This is the place to chat, submit expense and settle up.', beginningOfChatHistorySelfDM: 'This is your personal space. Use it for notes, tasks, drafts, and reminders.', chatWithAccountManager: 'Chat with your account manager here', sayHello: 'Say hello!', @@ -507,9 +507,9 @@ export default { welcomeToRoom: ({roomName}: WelcomeToRoomParams) => `Welcome to ${roomName}!`, usePlusButton: ({additionalText}: UsePlusButtonParams) => `\nYou can also use the + button to ${additionalText}, or assign a task!`, iouTypes: { - send: 'send money', - split: 'split a bill', - request: 'request money', + send: 'pay expenses', + split: 'split an expense', + request: 'submit an expense', // eslint-disable-next-line @typescript-eslint/naming-convention 'track-expense': 'track an expense', }, @@ -589,11 +589,11 @@ export default { quickAction: { scanReceipt: 'Scan Receipt', recordDistance: 'Record Distance', - requestMoney: 'Request Money', - splitBill: 'Split Bill', + requestMoney: 'Submit Expense', + splitBill: 'Split Expense', splitScan: 'Split Receipt', splitDistance: 'Split Distance', - sendMoney: 'Send Money', + sendMoney: 'Pay Someone', assignTask: 'Assign Task', shortcut: 'Shortcut', trackManual: 'Track Manual', @@ -611,11 +611,12 @@ export default { original: 'Original', split: 'Split', addToSplit: 'Add to split', - splitBill: 'Split bill', - request: 'Request', + splitExpense: 'Split expense', + payName: ({name}: {name: string}) => `Pay ${name}`, + paySomeone: 'Pay someone', + expense: 'Expense', participants: 'Participants', - requestMoney: 'Request money', - sendMoney: 'Send money', + submitExpense: 'Submit expense', trackExpense: 'Track expense', pay: 'Pay', cancelPayment: 'Cancel payment', @@ -634,20 +635,20 @@ export default { 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.', transactionPendingText: 'It takes a few days from the date the card was used for the transaction to post.', - requestCount: ({count, scanningReceipts = 0, pendingReceipts = 0}: RequestCountParams) => - `${count} ${Str.pluralize('request', 'requests', count)}${scanningReceipts > 0 ? `, ${scanningReceipts} scanning` : ''}${ + expenseCount: ({count, scanningReceipts = 0, pendingReceipts = 0}: RequestCountParams) => + `${count} ${Str.pluralize('expense', 'expenses', count)}${scanningReceipts > 0 ? `, ${scanningReceipts} scanning` : ''}${ pendingReceipts > 0 ? `, ${pendingReceipts} pending` : '' }`, - deleteRequest: 'Delete request', - deleteConfirmation: 'Are you sure that you want to delete this request?', + deleteExpense: 'Delete expense', + deleteConfirmation: 'Are you sure that you want to delete this expense?', settledExpensify: 'Paid', settledElsewhere: 'Paid elsewhere', settleExpensify: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pay ${formattedAmount} with Expensify` : `Pay with Expensify`), payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pay ${formattedAmount} elsewhere` : `Pay elsewhere`), nextStep: 'Next Steps', finished: 'Finished', - requestAmount: ({amount}: RequestAmountParams) => `request ${amount}`, - requestedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `requested ${formattedAmount}${comment ? ` for ${comment}` : ''}`, + requestAmount: ({amount}: RequestAmountParams) => `request ${amount}`, // TODO: Need to update this + requestedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `expense of ${formattedAmount}${comment ? ` for ${comment}` : ''}`, trackedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `tracking ${formattedAmount}${comment ? ` for ${comment}` : ''}`, splitAmount: ({amount}: SplitAmountParams) => `split ${amount}`, didSplitAmount: ({formattedAmount, comment}: DidSplitAmountMessageParams) => `split ${formattedAmount}${comment ? ` for ${comment}` : ''}`, @@ -672,14 +673,14 @@ export default { paidWithExpensifyWithAmount: ({payer, amount}: PaidWithExpensifyWithAmountParams) => `${payer ? `${payer} ` : ''}paid ${amount} using Expensify`, noReimbursableExpenses: 'This report has an invalid amount', pendingConversionMessage: "Total will update when you're back online", - changedTheRequest: 'changed the request', + changedTheExpense: 'changed the expense', setTheRequest: ({valueName, newValueToDisplay}: SetTheRequestParams) => `the ${valueName} to ${newValueToDisplay}`, setTheDistance: ({newDistanceToDisplay, newAmountToDisplay}: SetTheDistanceParams) => `set the distance to ${newDistanceToDisplay}, which set the amount to ${newAmountToDisplay}`, removedTheRequest: ({valueName, oldValueToDisplay}: RemovedTheRequestParams) => `the ${valueName} (previously ${oldValueToDisplay})`, updatedTheRequest: ({valueName, newValueToDisplay, oldValueToDisplay}: UpdatedTheRequestParams) => `the ${valueName} to ${newValueToDisplay} (previously ${oldValueToDisplay})`, updatedTheDistance: ({newDistanceToDisplay, oldDistanceToDisplay, newAmountToDisplay, oldAmountToDisplay}: UpdatedTheDistanceParams) => `changed the distance to ${newDistanceToDisplay} (previously ${oldDistanceToDisplay}), which updated the amount to ${newAmountToDisplay} (previously ${oldAmountToDisplay})`, - threadRequestReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `${formattedAmount} ${comment ? `for ${comment}` : 'request'}`, + threadExpenseReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `${formattedAmount} ${comment ? `for ${comment}` : 'expense'}`, threadTrackReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `Tracking ${formattedAmount} ${comment ? `for ${comment}` : ''}`, threadSentMoneyReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} sent${comment ? ` for ${comment}` : ''}`, tagSelection: 'Select a tag to better organize your spend.', @@ -690,12 +691,12 @@ export default { invalidTaxAmount: ({amount}: RequestAmountParams) => `Maximum tax amount is ${amount}`, invalidSplit: 'Split amounts do not equal total amount', other: 'Unexpected error, please try again later', - genericCreateFailureMessage: 'Unexpected error requesting money, please try again later', + genericCreateFailureMessage: 'Unexpected error creating the expense, please try again later', receiptFailureMessage: "The receipt didn't upload. ", saveFileMessage: 'Download the file ', loseFileMessage: 'or dismiss this error and lose it', - genericDeleteFailureMessage: 'Unexpected error deleting the money request, please try again later', - genericEditFailureMessage: 'Unexpected error editing the money request, please try again later', + genericDeleteFailureMessage: 'Unexpected error deleting the expense, please try again later', + genericEditFailureMessage: 'Unexpected error editing the expense, please try again later', genericSmartscanFailureMessage: 'Transaction is missing fields', duplicateWaypointsErrorMessage: 'Please remove duplicate waypoints', atLeastTwoDifferentWaypoints: 'Please enter at least two different addresses', @@ -705,21 +706,21 @@ export default { waitingOnEnabledWallet: ({submitterDisplayName}: WaitingOnBankAccountParams) => `Started settling up, payment is held until ${submitterDisplayName} enables their Wallet`, enableWallet: 'Enable Wallet', hold: 'Hold', - holdRequest: 'Hold request', - unholdRequest: 'Unhold request', - heldRequest: 'held this request', - unheldRequest: 'unheld this request', - explainHold: "Explain why you're holding this request.", + holdExpense: 'Hold expense', + unholdExpense: 'Unhold expense', + heldExpense: 'held this expense', + unheldExpense: 'unheld this expense', + explainHold: "Explain why you're holding this expense.", reason: 'Reason', holdReasonRequired: 'A reason is required when holding.', - requestOnHold: 'This request was put on hold. Review the comments for next steps.', + expenseOnHold: 'This expense was put on hold. Review the comments for next steps.', confirmApprove: 'Confirm what to approve', confirmApprovalAmount: 'Approve the entire report total or only the amount not on hold.', confirmPay: 'Confirm what to pay', confirmPayAmount: 'Pay all out-of-pocket spend or only the amount not on hold.', payOnly: 'Pay only', approveOnly: 'Approve only', - holdEducationalTitle: 'This request is on', + holdEducationalTitle: 'This expense is on', whatIsHoldTitle: 'What is hold?', whatIsHoldExplain: 'Hold is our way of streamlining financial collaboration. "Reject" is so harsh!', holdIsTemporaryTitle: 'Hold is usually temporary', @@ -917,7 +918,7 @@ export default { enterMessageHere: 'Enter message here', closeAccountWarning: 'Closing your account cannot be undone.', closeAccountPermanentlyDeleteData: - 'This will permanently delete all of your unsubmitted expense data and will cancel and decline any outstanding money requests. Are you sure you want to delete the account?', + 'This will permanently delete all of your unsubmitted expense data and will cancel and decline any outstanding submitted expenses. Are you sure you want to delete the account?', enterDefaultContactToConfirm: 'Please type 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:', @@ -2408,7 +2409,6 @@ export default { parentReportAction: { deletedReport: '[Deleted report]', deletedMessage: '[Deleted message]', - deletedRequest: '[Deleted request]', deletedExpense: '[Deleted expense]', reversedTransaction: '[Reversed transaction]', deletedTask: '[Deleted task]', @@ -2530,15 +2530,15 @@ export default { body: `Get paid to talk to your friends! Start a chat with a new Expensify account and get $${CONST.REFERRAL_PROGRAM.REVENUE} when they become a customer.`, }, [CONST.REFERRAL_PROGRAM.CONTENT_TYPES.MONEY_REQUEST]: { - buttonText1: 'Request money, ', + buttonText1: 'Submit expense, ', buttonText2: `get $${CONST.REFERRAL_PROGRAM.REVENUE}.`, - header: `Request money, get $${CONST.REFERRAL_PROGRAM.REVENUE}`, - body: `It pays to get paid! Request money from a new Expensify account and get $${CONST.REFERRAL_PROGRAM.REVENUE} when they become a customer.`, + header: `Submit expense, get $${CONST.REFERRAL_PROGRAM.REVENUE}`, + body: `It pays to get paid! Submit expense from a new Expensify account and get $${CONST.REFERRAL_PROGRAM.REVENUE} when they become a customer.`, }, [CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SEND_MONEY]: { - buttonText1: 'Send money, ', + buttonText1: 'Pay Someone, ', buttonText2: `get $${CONST.REFERRAL_PROGRAM.REVENUE}.`, - header: `Send money, get $${CONST.REFERRAL_PROGRAM.REVENUE}`, + header: `Pay Someone, get $${CONST.REFERRAL_PROGRAM.REVENUE}`, body: `You gotta send money to make money! Send money to a new Expensify account and get $${CONST.REFERRAL_PROGRAM.REVENUE} when they become a customer.`, }, [CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: { diff --git a/src/languages/es.ts b/src/languages/es.ts index 30e4717bdf57..d673cd04381b 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -607,11 +607,12 @@ export default { original: 'Original', split: 'Dividir', addToSplit: 'Añadir para dividir', - splitBill: 'Dividir factura', - request: 'Solicitar', + splitExpense: 'Dividir factura', + expense: 'Solicitar', participants: 'Participantes', - requestMoney: 'Pedir dinero', - sendMoney: 'Enviar dinero', + submitExpense: 'Pedir dinero', + paySomeone: 'Enviar dinero', + payName: ({name}: {name: string}) => `Pay ${name}`, trackExpense: 'Seguimiento de gastos', pay: 'Pagar', cancelPayment: 'Cancelar el pago', @@ -630,11 +631,11 @@ export default { 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.', transactionPendingText: 'La transacción tarda unos días en contabilizarse desde la fecha en que se utilizó la tarjeta.', - requestCount: ({count, scanningReceipts = 0, pendingReceipts = 0}: RequestCountParams) => + expenseCount: ({count, scanningReceipts = 0, pendingReceipts = 0}: RequestCountParams) => `${count} ${Str.pluralize('solicitude', 'solicitudes', count)}${scanningReceipts > 0 ? `, ${scanningReceipts} escaneando` : ''}${ pendingReceipts > 0 ? `, ${pendingReceipts} pendiente` : '' }`, - deleteRequest: 'Eliminar solicitud', + deleteExpense: 'Eliminar solicitud', deleteConfirmation: '¿Estás seguro de que quieres eliminar esta solicitud?', settledExpensify: 'Pagado', settledElsewhere: 'Pagado de otra forma', @@ -668,7 +669,7 @@ export default { paidWithExpensifyWithAmount: ({payer, amount}: PaidWithExpensifyWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} con Expensify`, noReimbursableExpenses: 'El importe de este informe no es válido', pendingConversionMessage: 'El total se actualizará cuando estés online', - changedTheRequest: 'cambió la solicitud', + changedTheExpense: 'cambió la solicitud', setTheRequest: ({valueName, newValueToDisplay}: SetTheRequestParams) => `${valueName === 'comerciante' ? 'el' : 'la'} ${valueName} a ${newValueToDisplay}`, setTheDistance: ({newDistanceToDisplay, newAmountToDisplay}: SetTheDistanceParams) => `estableció la distancia a ${newDistanceToDisplay}, lo que estableció el importe a ${newAmountToDisplay}`, @@ -677,7 +678,7 @@ export default { `${valueName === 'comerciante' ? 'el' : 'la'} ${valueName} a ${newValueToDisplay} (previamente ${oldValueToDisplay})`, updatedTheDistance: ({newDistanceToDisplay, oldDistanceToDisplay, newAmountToDisplay, oldAmountToDisplay}: UpdatedTheDistanceParams) => `cambió la distancia a ${newDistanceToDisplay} (previamente ${oldDistanceToDisplay}), lo que cambió el importe a ${newAmountToDisplay} (previamente ${oldAmountToDisplay})`, - threadRequestReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `${comment ? `${formattedAmount} para ${comment}` : `Solicitud de ${formattedAmount}`}`, + threadExpenseReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `${comment ? `${formattedAmount} para ${comment}` : `Solicitud de ${formattedAmount}`}`, threadTrackReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `Seguimiento ${formattedAmount} ${comment ? `para ${comment}` : ''}`, threadSentMoneyReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} enviado${comment ? ` para ${comment}` : ''}`, tagSelection: 'Selecciona una etiqueta para organizar mejor tu dinero.', @@ -702,14 +703,14 @@ export default { }, waitingOnEnabledWallet: ({submitterDisplayName}: WaitingOnBankAccountParams) => `Inició el pago, pero no se procesará hasta que ${submitterDisplayName} active su Billetera`, enableWallet: 'Habilitar Billetera', - holdRequest: 'Bloquear solicitud', - unholdRequest: 'Desbloquear solicitud', - heldRequest: 'bloqueó esta solicitud', - unheldRequest: 'desbloqueó esta solicitud', + holdExpense: 'Bloquear solicitud', + unholdExpense: 'Desbloquear solicitud', + heldExpense: 'bloqueó esta solicitud', + unheldExpense: 'desbloqueó esta solicitud', explainHold: 'Explica la razón para bloquear esta solicitud.', reason: 'Razón', holdReasonRequired: 'Se requiere una razón para bloquear.', - requestOnHold: 'Este solicitud está bloqueada. Revisa los comentarios para saber como proceder.', + expenseOnHold: 'Este solicitud está bloqueada. Revisa los comentarios para saber como proceder.', confirmApprove: 'Confirma que quieres aprobar', confirmApprovalAmount: 'Aprobar el total o solo la parte no bloqueada.', confirmPay: 'Confirma que quieres pagar', @@ -2900,7 +2901,6 @@ export default { parentReportAction: { deletedReport: '[Informe eliminado]', deletedMessage: '[Mensaje eliminado]', - deletedRequest: '[Solicitud eliminada]', deletedExpense: '[Gasto eliminado]', reversedTransaction: '[Transacción anulada]', deletedTask: '[Tarea eliminada]', diff --git a/src/libs/DistanceRequestUtils.ts b/src/libs/DistanceRequestUtils.ts index 9a7e0a568627..12a240ae9041 100644 --- a/src/libs/DistanceRequestUtils.ts +++ b/src/libs/DistanceRequestUtils.ts @@ -79,7 +79,7 @@ function getRoundedDistanceInUnits(distanceInMeters: number, unit: Unit): string } /** - * @param hasRoute Whether the route exists for the distance request + * @param hasRoute Whether the route exists for the distance expense * @param distanceInMeters Distance traveled * @param unit Unit that should be used to display the distance * @param rate Expensable amount allowed per unit @@ -100,7 +100,7 @@ function getDistanceForDisplay(hasRoute: boolean, distanceInMeters: number, unit } /** - * @param hasRoute Whether the route exists for the distance request + * @param hasRoute Whether the route exists for the distance expense * @param distanceInMeters Distance traveled * @param unit Unit that should be used to display the distance * @param rate Expensable amount allowed per unit @@ -133,12 +133,12 @@ function getDistanceMerchant( } /** - * Calculates the request amount based on distance, unit, and rate. + * Calculates the expense amount based on distance, unit, and rate. * * @param distance - The distance traveled in meters * @param unit - The unit of measurement for the distance - * @param rate - Rate used for calculating the request amount - * @returns The computed request amount (rounded) in "cents". + * @param rate - Rate used for calculating the expense amount + * @returns The computed expense amount (rounded) in "cents". */ function getDistanceRequestAmount(distance: number, unit: Unit, rate: number): number { const convertedDistance = convertDistanceUnit(distance, unit); diff --git a/src/libs/IOUUtils.ts b/src/libs/IOUUtils.ts index 65390982f18c..70b44564f103 100644 --- a/src/libs/IOUUtils.ts +++ b/src/libs/IOUUtils.ts @@ -52,8 +52,8 @@ function calculateAmount(numberOfParticipants: number, total: number, currency: * For example: if user1 owes user2 $10, then we have: {ownerAccountID: user2, managerID: user1, total: $10 (a positive amount, owed to user2)} * If user1 requests $17 from user2, then we have: {ownerAccountID: user1, managerID: user2, total: $7 (still a positive amount, but now owed to user1)} * - * @param isDeleting - whether the user is deleting the request - * @param isUpdating - whether the user is updating the request + * @param isDeleting - whether the user is deleting the expense + * @param isUpdating - whether the user is updating the expense */ function updateIOUOwnerAndTotal>( iouReport: TReport, diff --git a/src/libs/ModifiedExpenseMessage.ts b/src/libs/ModifiedExpenseMessage.ts index 8f1cb89d695b..d66bf26d57f4 100644 --- a/src/libs/ModifiedExpenseMessage.ts +++ b/src/libs/ModifiedExpenseMessage.ts @@ -221,7 +221,7 @@ function getForReportAction(reportID: string | undefined, reportAction: OnyxEntr buildMessageFragmentForValue( reportActionOriginalMessage?.billable ?? '', reportActionOriginalMessage?.oldBillable ?? '', - Localize.translateLocal('iou.request'), + Localize.translateLocal('iou.expense'), true, setFragments, removalFragments, @@ -234,7 +234,7 @@ function getForReportAction(reportID: string | undefined, reportAction: OnyxEntr getMessageLine(`\n${Localize.translateLocal('iou.set')}`, setFragments) + getMessageLine(`\n${Localize.translateLocal('iou.removed')}`, removalFragments); if (message === '') { - return Localize.translateLocal('iou.changedTheRequest'); + return Localize.translateLocal('iou.changedTheExpense'); } return `${message.substring(1, message.length)}`; } diff --git a/src/libs/MoneyRequestUtils.ts b/src/libs/MoneyRequestUtils.ts index 1a573ce74628..ec934cb87888 100644 --- a/src/libs/MoneyRequestUtils.ts +++ b/src/libs/MoneyRequestUtils.ts @@ -78,14 +78,14 @@ function replaceAllDigits(text: string, convertFn: (char: string) => string): st } /** - * Check if distance request or not + * Check if distance expense or not */ function isDistanceRequest(iouType: ValueOf, selectedTab: OnyxEntry): boolean { return iouType === CONST.IOU.TYPE.REQUEST && selectedTab === CONST.TAB_REQUEST.DISTANCE; } /** - * Check if scan request or not + * Check if scan expense or not */ function isScanRequest(selectedTab: SelectedTabRequest): boolean { return selectedTab === CONST.TAB_REQUEST.SCAN; diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 7e4082bff481..2c479cac66bf 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -1493,7 +1493,7 @@ function getOptions( return; } - // In case user needs to add credit bank account, don't allow them to request more money from the workspace. + // In case user needs to add credit bank account, don't allow them to submit expense from the workspace. if (includeOwnedWorkspaceChats && ReportUtils.hasIOUWaitingOnCurrentUserBankAccount(report)) { return; } diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index c3b377783b13..d5e81316337d 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -482,7 +482,7 @@ function shouldReportActionBeVisible(reportAction: OnyxEntry, key: return false; } - // Ignore markedAsReimbursed action here since we're already display message that explains the request was paid + // Ignore markedAsReimbursed action here since we're already display message that explains the expense was paid // elsewhere in the IOU reportAction if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED) { return false; @@ -951,7 +951,7 @@ function getMemberChangeMessagePlainText(reportAction: OnyxEntry): } /** - * Helper method to determine if the provided accountID has made a request on the specified report. + * Helper method to determine if the provided accountID has made an expense on the specified report. * * @param reportID * @param currentAccountID diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 9fa28535a7a7..484b7136bf89 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -734,7 +734,7 @@ function hasParticipantInArray(report: Report, policyMemberAccountIDs: number[]) } /** - * Whether the Money Request report is settled + * Whether the Expense report is settled */ function isSettled(reportID: string | undefined): boolean { if (!allReports || !reportID) { @@ -1300,7 +1300,7 @@ function isOneOnOneChat(report: OnyxEntry): boolean { } /** - * Checks if the current user is a payer of the request + * Checks if the current user is a payer of the expense */ function isPayer(session: OnyxEntry, iouReport: OnyxEntry) { @@ -2017,7 +2017,7 @@ function isUnreadWithMention(reportOrOption: OnyxEntry | OptionData): bo * Determines if the option requires action from the current user. This can happen when it: * - is unread and the user was mentioned in one of the unread comments * - is for an outstanding task waiting on the user - * - has an outstanding child money request that is waiting for an action from the current user (e.g. pay, approve, add bank account) + * - has an outstanding child expense that is waiting for an action from the current user (e.g. pay, approve, add bank account) * * @param option (report or optionItem) * @param parentReportAction (the report action the current report is a thread of) @@ -2277,7 +2277,7 @@ function getMoneyRequestReportName(report: OnyxEntry, policy: OnyxEntry< } /** - * Gets transaction created, amount, currency, comment, and waypoints (for distance request) + * Gets transaction created, amount, currency, comment, and waypoints (for distance expense) * into a flat object. Used for displaying transactions and sending them in API commands */ @@ -2363,11 +2363,11 @@ function canEditMoneyRequest(reportAction: OnyxEntry): boolean { } /** - * Checks if the current user can edit the provided property of a money request + * Checks if the current user can edit the provided property of an expense * */ function canEditFieldOfMoneyRequest(reportAction: OnyxEntry, fieldToEdit: ValueOf): boolean { - // A list of fields that cannot be edited by anyone, once a money request has been settled + // A list of fields that cannot be edited by anyone, once an expense has been settled const restrictedFields: string[] = [ CONST.EDIT_REQUEST_FIELD.AMOUNT, CONST.EDIT_REQUEST_FIELD.CURRENCY, @@ -2421,7 +2421,7 @@ function canEditFieldOfMoneyRequest(reportAction: OnyxEntry, field * * - It was written by the current user * - It's an ADDCOMMENT that is not an attachment - * - It's money request where conditions for editability are defined in canEditMoneyRequest method + * - It's an expense where conditions for editability are defined in canEditMoneyRequest method * - It's not pending deletion */ function canEditReportAction(reportAction: OnyxEntry): boolean { @@ -2451,7 +2451,7 @@ function getTransactionsWithReceipts(iouReportID: string | undefined): Transacti * instead of the report total only when we have no report total ready to show. This is the case when * all requests are receipts that are being SmartScanned. As soon as we have a non-receipt request, * or as soon as one receipt request is done scanning, we have at least one - * "ready" money request, and we remove this indicator to show the partial report total. + * "ready" expense, and we remove this indicator to show the partial report total. */ function areAllRequestsBeingSmartScanned(iouReportID: string, reportPreviewAction: OnyxEntry): boolean { const transactionsWithReceipts = getTransactionsWithReceipts(iouReportID); @@ -2504,10 +2504,7 @@ function getTransactionReportName(reportAction: OnyxEntry, currentReportId: string): b } /** - * Checks to see if a report's parentAction is a money request that contains a violation + * Checks to see if a report's parentAction is an expense that contains a violation */ function doesTransactionThreadHaveViolations(report: OnyxEntry, transactionViolations: OnyxCollection, parentReportAction: OnyxEntry): boolean { if (parentReportAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU) { @@ -4341,7 +4338,7 @@ function doesTransactionThreadHaveViolations(report: OnyxEntry, transact } /** - * Checks if we should display violation - we display violations when the money request has violation and it is not settled + * Checks if we should display violation - we display violations when the expense has violation and it is not settled */ function shouldDisplayTransactionThreadViolations( report: OnyxEntry, @@ -4486,7 +4483,7 @@ function shouldReportBeInOptionList({ } /** - * Attempts to find a report in onyx with the provided list of participants. Does not include threads, task, money request, room, and policy expense chat. + * 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 { const sortedNewParticipantList = newParticipantList.sort(); @@ -4707,20 +4704,20 @@ function hasIOUWaitingOnCurrentUserBankAccount(chatReport: OnyxEntry): b } /** - * Users can request money: + * Users can submit expense: * - in policy expense chats only if they are in a role of a member in the chat (in other words, if it's their policy expense chat) * - in an open or submitted expense report tied to a policy expense chat the user owns - * - employee can request money in submitted expense report only if the policy has Instant Submit settings turned on + * - employee can submit expense in submitted expense report only if the policy has Instant Submit settings turned on * - in an IOU report, which is not settled yet * - in a 1:1 DM chat */ function canRequestMoney(report: OnyxEntry, policy: OnyxEntry, otherParticipants: number[]): boolean { - // User cannot request money in chat thread or in task report or in chat room + // User cannot submit expense in chat thread or in task report or in chat room if (isChatThread(report) || isTaskReport(report) || isChatRoom(report) || isSelfDM(report) || isGroupChat(report)) { return false; } - // Users can only request money in DMs if they are a 1:1 DM + // Users can only submit expense in DMs if they are a 1:1 DM if (isDM(report)) { return otherParticipants.length === 1; } @@ -4735,31 +4732,31 @@ function canRequestMoney(report: OnyxEntry, policy: OnyxEntry, o isOwnPolicyExpenseChat = Boolean(getParentReport(report)?.isOwnPolicyExpenseChat); } - // In case there are no other participants than the current user and it's not user's own policy expense chat, they can't request money from such report + // In case there are no other participants than the current user and it's not user's own policy expense chat, they can't submit expense from such report if (otherParticipants.length === 0 && !isOwnPolicyExpenseChat) { return false; } - // User can request money in any IOU report, unless paid, but user can only request money in an expense report + // User can submit expense in any IOU report, unless paid, but user can only submit expense in an expense report // which is tied to their workspace chat. if (isMoneyRequestReport(report)) { const canAddTransactions = canAddOrDeleteTransactions(report); return isGroupPolicy(report) ? isOwnPolicyExpenseChat && canAddTransactions : canAddTransactions; } - // In case of policy expense chat, users can only request money from their own policy expense chat + // In case of policy expense chat, users can only submit expense from their own policy expense chat return !isPolicyExpenseChat(report) || isOwnPolicyExpenseChat; } /** - * Helper method to define what money request options we want to show for particular method. - * There are 4 money request options: Request, Split, Send and Track expense: - * - Request option should show for: + * Helper method to define what expense options we want to show for particular method. + * There are 4 expense options: Submit, Split, Pay and Track expense: + * - Submit option should show for: * - DMs * - own policy expense chats * - open and processing expense reports tied to own policy expense chat * - unsettled IOU reports - * - Send option should show for: + * - Pay option should show for: * - DMs * - Split options should show for: * - chat/ policy rooms with more than 1 participants @@ -4773,7 +4770,7 @@ function canRequestMoney(report: OnyxEntry, policy: OnyxEntry, o * as a participant of the report. */ function getMoneyRequestOptions(report: OnyxEntry, policy: OnyxEntry, reportParticipants: number[], canUseTrackExpense = true): Array> { - // In any thread or task report, we do not allow any new money requests yet + // In any thread or task report, we do not allow any new expenses yet if (isChatThread(report) || isTaskReport(report) || (!canUseTrackExpense && isSelfDM(report))) { return []; } @@ -4794,10 +4791,10 @@ function getMoneyRequestOptions(report: OnyxEntry, policy: OnyxEntry 0) || (isDM(report) && hasMultipleOtherParticipants) || @@ -4933,7 +4930,7 @@ function getAddWorkspaceRoomOrChatReportErrors(report: OnyxEntry): Error } /** - * Return true if the Money Request report is marked for deletion. + * Return true if the Submit expense report is marked for deletion. */ function isMoneyRequestReportPendingDeletion(report: OnyxEntry | EmptyObject): boolean { if (!isMoneyRequestReport(report)) { @@ -4947,7 +4944,7 @@ function isMoneyRequestReportPendingDeletion(report: OnyxEntry | EmptyOb function canUserPerformWriteAction(report: OnyxEntry) { const reportErrors = getAddWorkspaceRoomOrChatReportErrors(report); - // If the Money Request report is marked for deletion, let us prevent any further write action. + // If the Submit Expense report is marked for deletion, let us prevent any further write action. if (isMoneyRequestReportPendingDeletion(report)) { return false; } @@ -4970,7 +4967,7 @@ function getOriginalReportID(reportID: string, reportAction: OnyxEntry): Repo } /** - * Check if the report can create the request with type is iouType + * Check if the report can create the expense with type is iouType */ function canCreateRequest(report: OnyxEntry, policy: OnyxEntry, iouType: (typeof CONST.IOU.TYPE)[keyof typeof CONST.IOU.TYPE]): boolean { const participantAccountIDs = report?.participantAccountIDs ?? []; @@ -5258,7 +5255,7 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry) * A report is a group chat if it meets the following conditions: * - Not a chat thread. * - Not a task report. - * - Not a money request / IOU report. + * - Not a expense / IOU report. * - Not an archived room. * - Not a public / admin / announce chat room (chat type doesn't match any of the specified types). * - More than 2 participants. @@ -5641,7 +5638,7 @@ function hasMissingPaymentMethod(userWallet: OnyxEntry, iouReportID: } /** - * Used from money request actions to decide if we need to build an optimistic money request report. + * Used from submit expense actions to decide if we need to build an optimistic submit expense report. Create a new report if: - we don't have an iouReport set in the chatReport - we have one, but it's waiting on the payee adding a bank account diff --git a/src/libs/TransactionUtils.ts b/src/libs/TransactionUtils.ts index 907edc208570..224026e17d63 100644 --- a/src/libs/TransactionUtils.ts +++ b/src/libs/TransactionUtils.ts @@ -33,7 +33,7 @@ Onyx.connect({ }); function isDistanceRequest(transaction: OnyxEntry): boolean { - // This is used during the request creation flow before the transaction has been saved to the server + // This is used during the expense creation flow before the transaction has been saved to the server if (lodashHas(transaction, 'iouRequestType')) { return transaction?.iouRequestType === CONST.IOU.REQUEST_TYPE.DISTANCE; } @@ -45,7 +45,7 @@ function isDistanceRequest(transaction: OnyxEntry): boolean { } function isScanRequest(transaction: Transaction): boolean { - // This is used during the request creation flow before the transaction has been saved to the server + // This is used during the expense creation flow before the transaction has been saved to the server if (lodashHas(transaction, 'iouRequestType')) { return transaction.iouRequestType === CONST.IOU.REQUEST_TYPE.SCAN; } @@ -64,7 +64,7 @@ function getRequestType(transaction: Transaction): ValueOf): boolean { } /** - * Given the edit made to the money request, return an updated transaction object. + * Given the edit made to the expnse, return an updated transaction object. */ function getUpdatedTransaction(transaction: Transaction, transactionChanges: TransactionChanges, isFromExpenseReport: boolean, shouldUpdateReceiptState = true): Transaction { // Only changing the first level fields so no need for deep clone now diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 8582e9e3f3de..93b0720da1dd 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -254,7 +254,7 @@ Onyx.connect({ }); /** - * Initialize money request info + * Initialize expense info * @param reportID to attach the transaction to * @param policy * @param isFromGlobalCreate @@ -268,7 +268,7 @@ function initMoneyRequest(reportID: string, policy: OnyxEntry, const created = currentDate || format(new Date(), 'yyyy-MM-dd'); const comment: Comment = {}; - // Add initial empty waypoints when starting a distance request + // Add initial empty waypoints when starting a distance expense if (iouRequestType === CONST.IOU.REQUEST_TYPE.DISTANCE) { comment.waypoints = { waypoint0: {}, @@ -302,7 +302,7 @@ function clearMoneyRequest(transactionID: string) { } /** - * Update money request-related pages IOU type params + * Update money expense-related pages IOU type params */ function updateMoneyRequestTypeParams(routes: StackNavigationState['routes'] | NavigationPartialRoute[], newIouType: string, tab: string) { routes.forEach((route) => { @@ -318,7 +318,7 @@ function updateMoneyRequestTypeParams(routes: StackNavigationState | EmptyO }; } -/** Builds the Onyx data for a money request */ +/** Builds the Onyx data for an expense */ function buildOnyxDataForMoneyRequest( chatReport: OnyxEntry, iouReport: OnyxTypes.Report, @@ -996,7 +996,7 @@ function buildOnyxDataForTrackExpense( } /** - * Gathers all the data needed to make a money request. It attempts to find existing reports, iouReports, and receipts. If it doesn't find them, then + * Gathers all the data needed to make an expense. It attempts to find existing reports, iouReports, and receipts. If it doesn't find them, then * it creates optimistic versions of them and uses those instead */ function getMoneyRequestInformation( @@ -1043,8 +1043,8 @@ function getMoneyRequestInformation( chatReport = ReportUtils.buildOptimisticChatReport([payerAccountID]); } - // STEP 2: Get the money request report. If the moneyRequestReportID has been provided, we want to add the transaction to this specific report. - // If no such reportID has been provided, let's use the chatReport.iouReportID property. In case that is not present, build a new optimistic money request report. + // STEP 2: Get the Expense/IOU report. If the moneyRequestReportID has been provided, we want to add the transaction to this specific report. + // If no such reportID has been provided, let's use the chatReport.iouReportID property. In case that is not present, build a new optimistic Expense/IOU report. let iouReport: OnyxEntry = null; if (moneyRequestReportID) { iouReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${moneyRequestReportID}`] ?? null; @@ -1238,7 +1238,7 @@ function getTrackExpenseInformation( return {}; } - // STEP 2: Get the money request report. + // STEP 2: Get the Expense report. // TODO: This is deferred to later as we are not sure if we create iouReport at all in future. // We can build an optimistic iouReport here if needed. @@ -1910,7 +1910,7 @@ function getUpdateTrackExpenseParams( }; } -/** Updates the created date of a money request */ +/** Updates the created date of an expense */ function updateMoneyRequestDate( transactionID: string, transactionThreadReportID: string, @@ -1933,7 +1933,7 @@ function updateMoneyRequestDate( API.write(WRITE_COMMANDS.UPDATE_MONEY_REQUEST_DATE, params, onyxData); } -/** Updates the billable field of a money request */ +/** Updates the billable field of an expense */ function updateMoneyRequestBillable( transactionID: string, transactionThreadReportID: string, @@ -1949,7 +1949,7 @@ function updateMoneyRequestBillable( API.write(WRITE_COMMANDS.UPDATE_MONEY_REQUEST_BILLABLE, params, onyxData); } -/** Updates the merchant field of a money request */ +/** Updates the merchant field of an expense */ function updateMoneyRequestMerchant( transactionID: string, transactionThreadReportID: string, @@ -1972,7 +1972,7 @@ function updateMoneyRequestMerchant( API.write(WRITE_COMMANDS.UPDATE_MONEY_REQUEST_MERCHANT, params, onyxData); } -/** Updates the tag of a money request */ +/** Updates the tag of an expense */ function updateMoneyRequestTag( transactionID: string, transactionThreadReportID: string, @@ -1988,7 +1988,7 @@ function updateMoneyRequestTag( API.write(WRITE_COMMANDS.UPDATE_MONEY_REQUEST_TAG, params, onyxData); } -/** Updates the waypoints of a distance money request */ +/** Updates the waypoints of a distance expense */ function updateMoneyRequestDistance( transactionID: string, transactionThreadReportID: string, @@ -2011,7 +2011,7 @@ function updateMoneyRequestDistance( API.write(WRITE_COMMANDS.UPDATE_MONEY_REQUEST_DISTANCE, params, onyxData); } -/** Updates the category of a money request */ +/** Updates the category of an expense */ function updateMoneyRequestCategory( transactionID: string, transactionThreadReportID: string, @@ -2027,7 +2027,7 @@ function updateMoneyRequestCategory( API.write(WRITE_COMMANDS.UPDATE_MONEY_REQUEST_CATEGORY, params, onyxData); } -/** Updates the description of a money request */ +/** Updates the description of an expense */ function updateMoneyRequestDescription( transactionID: string, transactionThreadReportID: string, @@ -2050,7 +2050,7 @@ function updateMoneyRequestDescription( API.write(WRITE_COMMANDS.UPDATE_MONEY_REQUEST_DESCRIPTION, params, onyxData); } -/** Edits an existing distance request */ +/** Edits an existing distance expense */ function updateDistanceRequest( transactionID: string, transactionThreadReportID: string, @@ -2064,7 +2064,7 @@ function updateDistanceRequest( } /** - * Request money from another user + * Submit expense to another user */ function requestMoney( report: OnyxTypes.Report, @@ -2315,7 +2315,7 @@ function createSplitsAndOnyxData( created, '', '', - merchant || Localize.translateLocal('iou.request'), + merchant || Localize.translateLocal('iou.expense'), undefined, undefined, undefined, @@ -2529,7 +2529,7 @@ function createSplitsAndOnyxData( created, CONST.IOU.TYPE.SPLIT, splitTransaction.transactionID, - merchant || Localize.translateLocal('iou.request'), + merchant || Localize.translateLocal('iou.expense'), undefined, undefined, undefined, @@ -2767,7 +2767,7 @@ function splitBillAndOpenReport( Report.notifyNewAction(splitData.chatReportID, currentUserAccountID); } -/** Used exclusively for starting a split bill request that contains a receipt, the split request will be completed once the receipt is scanned +/** Used exclusively for starting a split expense request that contains a receipt, the split request will be completed once the receipt is scanned * or user enters details manually. * * @param existingSplitChatReportID - Either a group DM or a workspace chat @@ -3573,7 +3573,7 @@ function editMoneyRequest( } } -/** Updates the amount and currency fields of a money request */ +/** Updates the amount and currency fields of an expense */ function updateMoneyRequestAmountAndCurrency( transactionID: string, transactionThreadReportID: string, @@ -3607,7 +3607,7 @@ function deleteMoneyRequest(transactionID: string, reportAction: OnyxTypes.Repor // STEP 2: Decide if we need to: // 1. Delete the transactionThread - delete if there are no visible comments in the thread - // 2. Update the moneyRequestPreview to show [Deleted request] - update if the transactionThread exists AND it isn't being deleted + // 2. Update the moneyRequestPreview to show [Deleted expense] - update if the transactionThread exists AND it isn't being deleted const shouldDeleteTransactionThread = transactionThreadID ? (reportAction?.childVisibleActionCount ?? 0) === 0 : false; const shouldShowDeletedRequestMessage = !!transactionThreadID && !shouldDeleteTransactionThread; @@ -3906,7 +3906,7 @@ function deleteTrackExpense(chatReportID: string, transactionID: string, reportA // STEP 2: Decide if we need to: // 1. Delete the transactionThread - delete if there are no visible comments in the thread - // 2. Update the moneyRequestPreview to show [Deleted request] - update if the transactionThread exists AND it isn't being deleted + // 2. Update the moneyRequestPreview to show [Deleted expense] - update if the transactionThread exists AND it isn't being deleted const shouldDeleteTransactionThread = transactionThreadID ? (reportAction?.childVisibleActionCount ?? 0) === 0 : false; const shouldShowDeletedRequestMessage = !!transactionThreadID && !shouldDeleteTransactionThread; @@ -5006,7 +5006,7 @@ function replaceReceipt(transactionID: string, file: File, source: string) { * @param report attached to the transaction */ function setMoneyRequestParticipantsFromReport(transactionID: string, report: OnyxTypes.Report) { - // If the report is iou or expense report, we should get the chat report to set participant for request money + // If the report is iou or expense report, we should get the chat report to set participant for expense const chatReport = ReportUtils.isMoneyRequestReport(report) ? ReportUtils.getReport(report.chatReportID) : report; const currentUserAccountID = currentUserPersonalDetails.accountID; const shouldAddAsReport = !isEmptyObject(chatReport) && ReportUtils.isSelfDM(chatReport); @@ -5055,8 +5055,8 @@ function navigateToNextPage(iou: OnyxEntry, iouType: string, repo const moneyRequestID = `${iouType}${report?.reportID ?? ''}`; const shouldReset = iou?.id !== moneyRequestID && !!report?.reportID; - // If the money request ID in Onyx does not match the ID from params, we want to start a new request - // with the ID from params. We need to clear the participants in case the new request is initiated from FAB. + // If the expense ID in Onyx does not match the ID from params, we want to start a new expense + // with the ID from params. We need to clear the participants in case the new expense is initiated from FAB. if (shouldReset) { resetMoneyRequestInfo(moneyRequestID); } @@ -5069,9 +5069,9 @@ function navigateToNextPage(iou: OnyxEntry, iouType: string, repo // If a request is initiated on a report, skip the participants selection step and navigate to the confirmation page. if (report?.reportID) { - // If the report is iou or expense report, we should get the chat report to set participant for request money + // If the report is iou or expense report, we should get the chat report to set participant for submit expense const chatReport = ReportUtils.isMoneyRequestReport(report) ? ReportUtils.getReport(report.chatReportID) : report; - // Reinitialize the participants when the money request ID in Onyx does not match the ID from params + // Reinitialize the participants when the expense ID in Onyx does not match the ID from params if (!iou?.participants?.length || shouldReset) { const currentUserAccountID = currentUserPersonalDetails.accountID; const participants: Participant[] = ReportUtils.isPolicyExpenseChat(chatReport) @@ -5086,7 +5086,7 @@ function navigateToNextPage(iou: OnyxEntry, iouType: string, repo } /** - * When the money request or split bill creation flow is initialized via FAB, the reportID is not passed as a navigation + * When the submit or split expense creation flow is initialized via FAB, the reportID is not passed as a navigation * parameter. * Gets a report id from the first participant of the IOU object stored in Onyx. */ @@ -5097,7 +5097,7 @@ function getIOUReportID(iou?: OnyxTypes.IOU, route?: MoneyRequestRoute): string } /** - * Put money request on HOLD + * Put expense on HOLD */ function putOnHold(transactionID: string, comment: string, reportID: string) { const createdReportAction = ReportUtils.buildOptimisticHoldReportAction(); @@ -5160,7 +5160,7 @@ function putOnHold(transactionID: string, comment: string, reportID: string) { } /** - * Remove money request from HOLD + * Remove expense from HOLD */ function unholdRequest(transactionID: string, reportID: string) { const createdReportAction = ReportUtils.buildOptimisticUnHoldReportAction(); diff --git a/src/libs/actions/Transaction.ts b/src/libs/actions/Transaction.ts index 123614f2e0bb..6d2fbec54132 100644 --- a/src/libs/actions/Transaction.ts +++ b/src/libs/actions/Transaction.ts @@ -67,7 +67,7 @@ function saveWaypoint(transactionID: string, index: string, waypoint: RecentWayp [`waypoint${index}`]: waypoint, }, }, - // We want to reset the amount only for draft transactions (when creating the request). + // We want to reset the amount only for draft transactions (when creating the expense). // When modifying an existing transaction, the amount will be updated on the actual IOU update operation. ...(isDraft && {amount: CONST.IOU.DEFAULT_AMOUNT}), // Empty out errors when we're saving a new waypoint as this indicates the user is updating their input @@ -141,7 +141,7 @@ function removeWaypoint(transaction: OnyxEntry, currentIndex: strin ...transaction?.comment, waypoints: reIndexedWaypoints, }, - // We want to reset the amount only for draft transactions (when creating the request). + // We want to reset the amount only for draft transactions (when creating the expense). // When modifying an existing transaction, the amount will be updated on the actual IOU update operation. ...(isDraft && {amount: CONST.IOU.DEFAULT_AMOUNT}), }; @@ -239,7 +239,7 @@ function updateWaypoints(transactionID: string, waypoints: WaypointCollection, i comment: { waypoints, }, - // We want to reset the amount only for draft transactions (when creating the request). + // We want to reset the amount only for draft transactions (when creating the expense). // When modifying an existing transaction, the amount will be updated on the actual IOU update operation. ...(isDraft && {amount: CONST.IOU.DEFAULT_AMOUNT}), // Empty out errors when we're saving new waypoints as this indicates the user is updating their input diff --git a/src/libs/actions/User.ts b/src/libs/actions/User.ts index 2d23edfba93f..5ebaa6b9f630 100644 --- a/src/libs/actions/User.ts +++ b/src/libs/actions/User.ts @@ -524,7 +524,7 @@ function playSoundForMessageType(pushJSON: OnyxServerUpdate[]) { const types = flatten.map((data) => data?.originalMessage).filter(Boolean) as OriginalMessage[]; for (const message of types) { - // someone sent money + // someone paid money if ('IOUDetails' in message) { return playSound(SOUNDS.SUCCESS); } @@ -544,12 +544,12 @@ function playSoundForMessageType(pushJSON: OnyxServerUpdate[]) { return playSound(SOUNDS.ATTENTION); } - // request money + // submit expense if ('IOUTransactionID' in message) { return playSound(SOUNDS.ATTENTION); } - // Someone completes a money request + // Someone completes an expense if ('IOUReportID' in message) { return playSound(SOUNDS.SUCCESS); } diff --git a/src/libs/migrations/TransactionBackupsToCollection.ts b/src/libs/migrations/TransactionBackupsToCollection.ts index 407bc70e1f38..a7167492007a 100644 --- a/src/libs/migrations/TransactionBackupsToCollection.ts +++ b/src/libs/migrations/TransactionBackupsToCollection.ts @@ -8,7 +8,7 @@ import type {Transaction} from '@src/types/onyx'; * This migration moves all the transaction backups stored in the transaction collection, ONYXKEYS.COLLECTION.TRANSACTION, to a reserved collection that only * stores draft transactions, ONYXKEYS.COLLECTION.TRANSACTION_DRAFT. The purpose of the migration is that there is a possibility that transaction backups are * not filtered by most functions, e.g, getAllReportTransactions (src/libs/TransactionUtils.ts). One problem that arose from storing transaction backups with - * the other transactions is that for every distance request which have their waypoints updated offline, we expect the ReportPreview component to display the + * the other transactions is that for every distance expense which have their waypoints updated offline, we expect the ReportPreview component to display the * default image of a pending map. However, due to the presence of the transaction backup, the previous map image will be displayed alongside the pending map. * The problem was further discussed in this PR. https://github.com/Expensify/App/pull/30232#issuecomment-178110172 */ diff --git a/src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx b/src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx index 3c7520b850b4..65fbd4185cef 100644 --- a/src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx +++ b/src/pages/OnboardEngagement/PurposeForUsingExpensifyPage.tsx @@ -32,7 +32,7 @@ const messageCopy = { '\n' + 'Next, start adding expenses to your workspace:\n' + '\n' + - '1. Click the green *+* > *Request money*.\n' + + '1. Click the green *+* > *Submit expense*.\n' + '2. Add an expense or scan a receipt.\n' + '3. Choose your workspace as the destination.\n' + '\n' + @@ -40,7 +40,7 @@ const messageCopy = { [CONST.INTRO_CHOICES.SUBMIT]: "Here's how to submit expenses for reimbursement:\n" + '\n' + - '1. Click the green *+* > *Request money*.\n' + + '1. Click the green *+* > *Submit expense*.\n' + '2. Add an expense or scan a receipt.\n' + "3. Enter your reimburser's email or phone number.\n" + '\n' + @@ -49,15 +49,15 @@ const messageCopy = { [CONST.INTRO_CHOICES.CHAT_SPLIT]: "Here's how to split expenses with friends:\n" + '\n' + - '1. Tap the green *+* > *Request money*.\n' + + '1. Tap the green *+* > *Split expense*.\n' + '2. Add an expense or scan a receipt.\n' + "3. Enter your friend's email or phone number.\n" + - '4. Tap *Split* next to their contact info.\n' + + '4. Select the option.\n' + '5. Repeat for any additional friends.\n' + "6. Tap *Add to split* when you're done.\n" + - '7. Review and tap *Split* to send your request(s).\n' + + '7. Review and tap *Split* to split your expense(s).\n' + '\n' + - "We'll send a money request to each of your friends and make sure you get paid back. Let me know how it goes!", + "We'll send an expense to each of your friends and make sure you get paid back. Let me know how it goes!", }; const menuIcons = { diff --git a/src/pages/home/HeaderView.tsx b/src/pages/home/HeaderView.tsx index 8aa2b855176c..47b1f511a5e9 100644 --- a/src/pages/home/HeaderView.tsx +++ b/src/pages/home/HeaderView.tsx @@ -65,7 +65,7 @@ type HeaderViewProps = HeaderViewOnyxProps & { /** The report action the transaction is tied to from the parent report */ parentReportAction: OnyxEntry; - /** The reportID of the request */ + /** The reportID of the current report */ reportID: string; }; diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index f1f8eb8047c7..679cd926f07c 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -467,7 +467,7 @@ function ReportScreen({ Navigation.goBack(undefined, false, true); } if (prevReport.parentReportID) { - // Prevent navigation to the Money Request Report if it is pending deletion. + // Prevent navigation to the IOU/Expense Report if it is pending deletion. const parentReport = ReportUtils.getReport(prevReport.parentReportID); if (ReportUtils.isMoneyRequestReportPendingDeletion(parentReport)) { return; diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx index ea65ab40ac0a..9cbbf9795518 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx @@ -379,9 +379,9 @@ const ContextMenuActions: ContextMenuAction[] = [ const mentionWhisperMessage = ReportActionsUtils.getActionableMentionWhisperMessage(reportAction); setClipboardMessage(mentionWhisperMessage); } else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.HOLD) { - Clipboard.setString(Localize.translateLocal('iou.heldRequest')); + Clipboard.setString(Localize.translateLocal('iou.heldExpense')); } else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.UNHOLD) { - Clipboard.setString(Localize.translateLocal('iou.unheldRequest')); + Clipboard.setString(Localize.translateLocal('iou.unheldExpense')); } else if (content) { setClipboardMessage(content); } else if (messageText) { diff --git a/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx b/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx index 11a84c17f9ee..bf09f39d3f87 100644 --- a/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx +++ b/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx @@ -125,17 +125,17 @@ function AttachmentPickerWithMenuItems({ const options: MoneyRequestOptions = { [CONST.IOU.TYPE.SPLIT]: { icon: Expensicons.Receipt, - text: translate('iou.splitBill'), + text: translate('iou.splitExpense'), onSelected: () => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, report?.reportID ?? ''), }, [CONST.IOU.TYPE.REQUEST]: { icon: Expensicons.MoneyCircle, - text: translate('iou.requestMoney'), + text: translate('iou.submitExpense'), onSelected: () => IOU.startMoneyRequest(CONST.IOU.TYPE.REQUEST, report?.reportID ?? ''), }, [CONST.IOU.TYPE.SEND]: { icon: Expensicons.Send, - text: translate('iou.sendMoney'), + text: translate('iou.payName', {name: report?.reportName ?? ''}), onSelected: () => IOU.startMoneyRequest(CONST.IOU.TYPE.SEND, report?.reportID ?? ''), }, [CONST.IOU.TYPE.TRACK_EXPENSE]: { diff --git a/src/pages/home/report/ReportActionItem.tsx b/src/pages/home/report/ReportActionItem.tsx index 2716fedcf59a..a3e5eff39dc5 100644 --- a/src/pages/home/report/ReportActionItem.tsx +++ b/src/pages/home/report/ReportActionItem.tsx @@ -419,7 +419,7 @@ function ReportActionItem({ const renderItemContent = (hovered = false, isWhisper = false, hasErrors = false): React.JSX.Element => { let children; - // Show the MoneyRequestPreview for when request was created, bill was split or money was sent + // Show the MoneyRequestPreview for when expense is present if ( isIOUReport(action) && action.originalMessage && @@ -433,7 +433,7 @@ function ReportActionItem({ const iouReportID = action.originalMessage.IOUReportID ? action.originalMessage.IOUReportID.toString() : '0'; children = ( ; } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.HOLD) { - children = ; + children = ; } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.HOLDCOMMENT) { children = ; } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.UNHOLD) { - children = ; + children = ; } else { const hasBeenFlagged = ![CONST.MODERATION.MODERATOR_DECISION_APPROVED, CONST.MODERATION.MODERATOR_DECISION_PENDING].some((item) => item === moderationDecision) && @@ -685,10 +685,8 @@ function ReportActionItem({ let message: TranslationPaths; if (isReversedTransaction) { message = 'parentReportAction.reversedTransaction'; - } else if (ReportActionsUtils.isTrackExpenseAction(parentReportAction)) { - message = 'parentReportAction.deletedExpense'; } else { - message = 'parentReportAction.deletedRequest'; + message = 'parentReportAction.deletedExpense'; } return ( diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index 1b6a9614a466..ed05b6849ff5 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -476,11 +476,11 @@ function ReportActionsView({ }; }, [isTheFirstReportActionIsLinked]); - // When we are offline before opening a money request report, - // the total of the report and sometimes the money request aren't displayed because these actions aren't returned until `OpenReport` API is complete. + // 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 a money request action if the number of money requests in reportActions is less than the total number of money requests - // to display at least one money request action to match the total data. + // and we also generate an expense action if the number of expenses in reportActions is less than the total number of money requests + // to display at least one expense action to match the total data. const reportActionsToDisplay = useMemo(() => { if (!ReportUtils.isMoneyRequestReport(report) || !reportActions.length) { return reportActions; diff --git a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js index be8a43b1a483..e41983e68dff 100644 --- a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js +++ b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js @@ -282,12 +282,12 @@ function FloatingActionButtonAndPopover(props) { }, { icon: Expensicons.MoneyCircle, - text: translate('iou.requestMoney'), + text: translate('iou.submitExpense'), onSelected: () => interceptAnonymousUser(() => IOU.startMoneyRequest( CONST.IOU.TYPE.REQUEST, - // When starting to create a money request from the global FAB, there is not an existing report yet. A random optimistic reportID is generated and used + // When starting to create an expense from the global FAB, there is not an existing report yet. A random optimistic reportID is generated and used // for all of the routes in the creation flow. ReportUtils.generateReportID(), ), @@ -295,12 +295,12 @@ function FloatingActionButtonAndPopover(props) { }, { icon: Expensicons.Send, - text: translate('iou.sendMoney'), + text: translate('iou.paySomeone'), onSelected: () => interceptAnonymousUser(() => IOU.startMoneyRequest( CONST.IOU.TYPE.SEND, - // When starting to create a send money request from the global FAB, there is not an existing report yet. A random optimistic reportID is generated and used + // When starting to pay someone from the global FAB, there is not an existing report yet. A random optimistic reportID is generated and used // for all of the routes in the creation flow. ReportUtils.generateReportID(), ), diff --git a/src/pages/iou/HoldReasonPage.tsx b/src/pages/iou/HoldReasonPage.tsx index 2a5cba810759..8f016ec0d8d9 100644 --- a/src/pages/iou/HoldReasonPage.tsx +++ b/src/pages/iou/HoldReasonPage.tsx @@ -91,12 +91,12 @@ function HoldReasonPage({route}: HoldReasonPageProps) { testID={HoldReasonPage.displayName} > { // Do not dismiss the modal, when it is not the edit flow. if (!threadReportID) { @@ -84,12 +84,12 @@ function IOUCurrencySelection(props) { const report = ReportUtils.getReport(threadReportID); const parentReportAction = ReportActionsUtils.getReportAction(report.parentReportID, report.parentReportActionID); - // Do not dismiss the modal, when a current user can edit this currency of this money request. + // Do not dismiss the modal, when a current user can edit this currency of this expense. if (ReportUtils.canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.CURRENCY)) { return; } - // Dismiss the modal when a current user cannot edit a money request. + // Dismiss the modal when a current user cannot edit an expense. Navigation.isNavigationReady().then(() => { Navigation.dismissModal(); }); @@ -99,7 +99,7 @@ function IOUCurrencySelection(props) { (option) => { Keyboard.dismiss(); - // When we refresh the web, the money request route gets cleared from the navigation stack. + // When we refresh the web, the expense route gets cleared from the navigation stack. // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. // To prevent any negative experience, we have made the decision to simply close the currency selection page. if (_.isEmpty(backTo) || props.navigation.getState().routes.length === 1) { diff --git a/src/pages/iou/propTypes/index.js b/src/pages/iou/propTypes/index.js index a03ed65dda9c..46abafac23e4 100644 --- a/src/pages/iou/propTypes/index.js +++ b/src/pages/iou/propTypes/index.js @@ -3,16 +3,16 @@ import participantPropTypes from '@components/participantPropTypes'; import CONST from '@src/CONST'; const iouPropTypes = PropTypes.shape({ - /** ID (iouType + reportID) of the request */ + /** ID (iouType + reportID) of the expense */ id: PropTypes.string, - /** Amount of the request */ + /** Amount of the expense */ amount: PropTypes.number, - /** Currency of the request */ + /** Currency of the expense */ currency: PropTypes.string, - /** Description of the request */ + /** Description of the expense */ comment: PropTypes.string, /** The merchant name */ @@ -21,16 +21,16 @@ const iouPropTypes = PropTypes.shape({ /** The category name */ category: PropTypes.string, - /** Whether the request is billable */ + /** Whether the expense is billable */ billable: PropTypes.bool, /** The tag */ tag: PropTypes.string, - /** Date that the request was created */ + /** Date that the expense was created */ created: PropTypes.string, - /** The path to an image of the receipt attached to the request */ + /** The path to an image of the receipt attached to the expense */ receiptPath: PropTypes.string, /** List of the participants */ diff --git a/src/pages/iou/request/IOURequestRedirectToStartPage.js b/src/pages/iou/request/IOURequestRedirectToStartPage.js index 2da235743705..19b9dddb8d2d 100644 --- a/src/pages/iou/request/IOURequestRedirectToStartPage.js +++ b/src/pages/iou/request/IOURequestRedirectToStartPage.js @@ -13,10 +13,10 @@ const propTypes = { route: PropTypes.shape({ /** Route specific parameters used on this screen */ params: PropTypes.shape({ - /** The type of IOU report, i.e. bill, request, send */ + /** The type of IOU report, i.e. split, request, send, track */ iouType: PropTypes.oneOf(_.values(CONST.IOU.TYPE)).isRequired, - /** The type of IOU Request, i.e. manual, scan, distance */ + /** The type of IOU Expense, i.e. manual, scan, distance */ iouRequestType: PropTypes.oneOf(_.values(CONST.IOU.REQUEST_TYPE)).isRequired, }), }).isRequired, diff --git a/src/pages/iou/request/IOURequestStartPage.js b/src/pages/iou/request/IOURequestStartPage.js index cb078fac133c..1aba56a1e3d9 100644 --- a/src/pages/iou/request/IOURequestStartPage.js +++ b/src/pages/iou/request/IOURequestStartPage.js @@ -75,9 +75,9 @@ function IOURequestStartPage({ const navigation = useNavigation(); const [isDraggingOver, setIsDraggingOver] = useState(false); const tabTitles = { - [CONST.IOU.TYPE.REQUEST]: translate('iou.requestMoney'), - [CONST.IOU.TYPE.SEND]: translate('iou.sendMoney'), - [CONST.IOU.TYPE.SPLIT]: translate('iou.splitBill'), + [CONST.IOU.TYPE.REQUEST]: translate('iou.submitExpense'), + [CONST.IOU.TYPE.SEND]: translate('iou.paySomeone'), + [CONST.IOU.TYPE.SPLIT]: translate('iou.splitExpense'), [CONST.IOU.TYPE.TRACK_EXPENSE]: translate('iou.trackExpense'), }; const transactionRequestType = useRef(TransactionUtils.getRequestType(transaction)); @@ -100,7 +100,7 @@ function IOURequestStartPage({ }, []), ); - // Clear out the temporary money request if the reportID in the URL has changed from the transaction's reportID + // Clear out the temporary expense if the reportID in the URL has changed from the transaction's reportID useEffect(() => { if (transaction.reportID === reportID) { return; @@ -112,7 +112,7 @@ function IOURequestStartPage({ const isExpenseReport = ReportUtils.isExpenseReport(report); const shouldDisplayDistanceRequest = iouType !== CONST.IOU.TYPE.TRACK_EXPENSE && (canUseP2PDistanceRequests || isExpenseChat || isExpenseReport || isFromGlobalCreate); - // Allow the user to create the request if we are creating the request in global menu or the report can create the request + // Allow the user to submit the request if we are creating the submitting in global menu or the report can submit the request const isAllowedToCreateRequest = _.isEmpty(report.reportID) || ReportUtils.canCreateRequest(report, policy, iouType); const navigateBack = () => { diff --git a/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js b/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js index e0a570e334d5..30289d45b0be 100644 --- a/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js +++ b/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js @@ -55,10 +55,10 @@ const propTypes = { /** Padding bottom style of safe area */ safeAreaPaddingBottomStyle: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]), - /** The type of IOU report, i.e. bill, request, send */ + /** The type of IOU report, i.e. split, request, send, track */ iouType: PropTypes.oneOf(_.values(CONST.IOU.TYPE)).isRequired, - /** The request type, ie. manual, scan, distance */ + /** The expense type, ie. manual, scan, distance */ iouRequestType: PropTypes.oneOf(_.values(CONST.IOU.REQUEST_TYPE)).isRequired, /** Whether the parent screen transition has ended */ @@ -120,8 +120,8 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({ participants, CONST.EXPENSIFY_EMAILS, - // If we are using this component in the "Request money" flow then we pass the includeOwnedWorkspaceChats argument so that the current user - // sees the option to request money from their admin on their own Workspace Chat. + // If we are using this component in the "Submit expense" flow then we pass the includeOwnedWorkspaceChats argument so that the current user + // sees the option to submit expense from their admin on their own Workspace Chat. iouType === CONST.IOU.TYPE.REQUEST, canUseP2PDistanceRequests || iouRequestType !== CONST.IOU.REQUEST_TYPE.DISTANCE, @@ -178,7 +178,7 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({ }, [didScreenTransitionEnd, reports, personalDetails, betas, debouncedSearchTerm, participants, iouType, canUseP2PDistanceRequests, iouRequestType, maxParticipantsReached, translate]); /** - * Adds a single participant to the request + * Adds a single participant to the expense * * @param {Object} option */ @@ -248,7 +248,7 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({ [maxParticipantsReached, newChatOptions, participants, debouncedSearchTerm], ); - // Right now you can't split a request with a workspace and other additional participants + // Right now you can't split an expense with a workspace and other additional participants // This is getting properly fixed in https://github.com/Expensify/App/issues/27508, but as a stop-gap to prevent // the app from crashing on native when you try to do this, we'll going to hide the button if you have a workspace and other participants const hasPolicyExpenseChatParticipant = _.some(participants, (participant) => participant.isPolicyExpenseChat); diff --git a/src/pages/iou/request/step/IOURequestStepAmount.js b/src/pages/iou/request/step/IOURequestStepAmount.js index 9fdd2bea24f4..7416895950b3 100644 --- a/src/pages/iou/request/step/IOURequestStepAmount.js +++ b/src/pages/iou/request/step/IOURequestStepAmount.js @@ -150,7 +150,7 @@ function IOURequestStepAmount({ } // If there was no reportID, then that means the user started this flow from the global + menu - // and an optimistic reportID was generated. In that case, the next step is to select the participants for this request. + // and an optimistic reportID was generated. In that case, the next step is to select the participants for this expense. Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, transactionID, reportID)); }; diff --git a/src/pages/iou/request/step/IOURequestStepCategory.js b/src/pages/iou/request/step/IOURequestStepCategory.js index 4f0c77480c04..d4dbef878caf 100644 --- a/src/pages/iou/request/step/IOURequestStepCategory.js +++ b/src/pages/iou/request/step/IOURequestStepCategory.js @@ -32,7 +32,7 @@ const propTypes = { route: IOURequestStepRoutePropTypes.isRequired, /* Onyx Props */ - /** Holds data related to Money Request view state, rather than the underlying Money Request data. */ + /** Holds data related to Expense view state, rather than the underlying Expense data. */ transaction: transactionPropTypes, /** The draft transaction that holds data to be persisted on the current transaction */ diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.js b/src/pages/iou/request/step/IOURequestStepConfirmation.js index 435121a76028..7d08b71a866b 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -344,7 +344,7 @@ function IOURequestStepConfirmation({ return; } - // If the request is created from the global create menu, we also navigate the user to the group report + // If the split expense is created from the global create menu, we also navigate the user to the group report if (iouType === CONST.IOU.TYPE.SPLIT) { IOU.splitBillAndOpenReport( selectedParticipants, diff --git a/src/pages/iou/request/step/IOURequestStepCurrency.js b/src/pages/iou/request/step/IOURequestStepCurrency.js index ba1354b4a2e6..6414b7310e47 100644 --- a/src/pages/iou/request/step/IOURequestStepCurrency.js +++ b/src/pages/iou/request/step/IOURequestStepCurrency.js @@ -61,7 +61,7 @@ function IOURequestStepCurrency({ const optionsSelectorRef = useRef(); const navigateBack = () => { - // If the currency selection was done from the confirmation step (eg. + > request money > manual > confirm > amount > currency) + // If the currency selection was done from the confirmation step (eg. + > submit expense > manual > confirm > amount > currency) // then the user needs taken back to the confirmation page instead of the initial amount page. This is because the route params // are only able to handle one backTo param at a time and the user needs to go back to the amount page before going back // to the confirmation page diff --git a/src/pages/iou/request/step/IOURequestStepDate.js b/src/pages/iou/request/step/IOURequestStepDate.js index f7b8b1ca3869..594192182780 100644 --- a/src/pages/iou/request/step/IOURequestStepDate.js +++ b/src/pages/iou/request/step/IOURequestStepDate.js @@ -30,7 +30,7 @@ const propTypes = { route: IOURequestStepRoutePropTypes.isRequired, /** Onyx Props */ - /** Holds data related to Money Request view state, rather than the underlying Money Request data. */ + /** Holds data related to Expense view state, rather than the underlying Expense data. */ transaction: transactionPropTypes, /** The draft transaction that holds data to be persisted on the current transaction */ diff --git a/src/pages/iou/request/step/IOURequestStepDescription.js b/src/pages/iou/request/step/IOURequestStepDescription.js index 8c3327a5ee5c..dbffd5f5ece7 100644 --- a/src/pages/iou/request/step/IOURequestStepDescription.js +++ b/src/pages/iou/request/step/IOURequestStepDescription.js @@ -36,7 +36,7 @@ const propTypes = { route: IOURequestStepRoutePropTypes.isRequired, /** Onyx Props */ - /** Holds data related to Money Request view state, rather than the underlying Money Request data. */ + /** Holds data related to Expense view state, rather than the underlying Expense data. */ transaction: transactionPropTypes, /** The draft transaction that holds data to be persisted on the current transaction */ diff --git a/src/pages/iou/request/step/IOURequestStepDistance.js b/src/pages/iou/request/step/IOURequestStepDistance.js index 94b59970b9f3..7b8c3d4cf4bd 100644 --- a/src/pages/iou/request/step/IOURequestStepDistance.js +++ b/src/pages/iou/request/step/IOURequestStepDistance.js @@ -139,8 +139,8 @@ function IOURequestStepDistance({ return; } - // If there was no reportID, then that means the user started this flow from the global + menu - // and an optimistic reportID was generated. In that case, the next step is to select the participants for this request. + // If there was no reportID, then that means the user started this flow from the global menu + // and an optimistic reportID was generated. In that case, the next step is to select the participants for this expense. Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, transactionID, reportID)); }, [report, iouType, reportID, transactionID, backTo]); diff --git a/src/pages/iou/request/step/IOURequestStepMerchant.js b/src/pages/iou/request/step/IOURequestStepMerchant.js index 98caea625981..7de0bca2d54f 100644 --- a/src/pages/iou/request/step/IOURequestStepMerchant.js +++ b/src/pages/iou/request/step/IOURequestStepMerchant.js @@ -33,7 +33,7 @@ const propTypes = { route: IOURequestStepRoutePropTypes.isRequired, /** Onyx Props */ - /** Holds data related to Money Request view state, rather than the underlying Money Request data. */ + /** Holds data related to Expense view state, rather than the underlying Expense data. */ transaction: transactionPropTypes, /** The draft transaction that holds data to be persisted on the current transaction */ diff --git a/src/pages/iou/request/step/IOURequestStepParticipants.js b/src/pages/iou/request/step/IOURequestStepParticipants.js index 5ca465d8fb78..17ed57f240a2 100644 --- a/src/pages/iou/request/step/IOURequestStepParticipants.js +++ b/src/pages/iou/request/step/IOURequestStepParticipants.js @@ -59,8 +59,8 @@ function IOURequestStepParticipants({ const newIouType = useRef(); // When the component mounts, if there is a receipt, see if the image can be read from the disk. If not, redirect the user to the starting step of the flow. - // This is because until the request is saved, the receipt file is only stored in the browsers memory as a blob:// and if the browser is refreshed, then - // the image ceases to exist. The best way for the user to recover from this is to start over from the start of the request process. + // This is because until the expense is saved, the receipt file is only stored in the browsers memory as a blob:// and if the browser is refreshed, then + // the image ceases to exist. The best way for the user to recover from this is to start over from the start of the expense process. useEffect(() => { IOU.navigateToStartStepIfScanFileCannotBeRead(receiptFilename, receiptPath, () => {}, iouRequestType, iouType, transactionID, reportID, receiptType); }, [receiptType, receiptPath, receiptFilename, iouRequestType, iouType, transactionID, reportID]); @@ -74,7 +74,7 @@ function IOURequestStepParticipants({ return; } // Participants can be added as normal or split participants. We want to wait for the participants' data to be updated before - // updating the money request type route params reducing the overhead of the thread and preventing possible jitters in UI. + // updating the expense type route params reducing the overhead of the thread and preventing possible jitters in UI. updateRouteParams(); newIouType.current = null; }, [participants, updateRouteParams]); diff --git a/src/pages/iou/request/step/IOURequestStepRoutePropTypes.js b/src/pages/iou/request/step/IOURequestStepRoutePropTypes.js index 8b191fa0b58e..f69e2b122c24 100644 --- a/src/pages/iou/request/step/IOURequestStepRoutePropTypes.js +++ b/src/pages/iou/request/step/IOURequestStepRoutePropTypes.js @@ -8,7 +8,7 @@ export default PropTypes.shape({ /** What action is being performed, ie. create, edit */ action: PropTypes.oneOf(_.values(CONST.IOU.ACTION)), - /** The type of IOU report, i.e. bill, request, send */ + /** The type of IOU report, i.e. split, request, send, track */ iouType: PropTypes.oneOf(_.values(CONST.IOU.TYPE)).isRequired, /** The ID of the transaction being configured */ diff --git a/src/pages/iou/request/step/IOURequestStepTag.js b/src/pages/iou/request/step/IOURequestStepTag.js index ed55628ecaa9..f3edad1b674e 100644 --- a/src/pages/iou/request/step/IOURequestStepTag.js +++ b/src/pages/iou/request/step/IOURequestStepTag.js @@ -34,7 +34,7 @@ const propTypes = { route: IOURequestStepRoutePropTypes.isRequired, /* Onyx props */ - /** Holds data related to Money Request view state, rather than the underlying Money Request data. */ + /** Holds data related to Expense view state, rather than the underlying Expense data. */ transaction: transactionPropTypes, /** The draft transaction that holds data to be persisted on the current transaction */ diff --git a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.js b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.js index 7a75e9f48805..c8380e7d3981 100644 --- a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.js +++ b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.js @@ -109,8 +109,8 @@ function IOURequestStepTaxAmountPage({ }; const navigateToCurrencySelectionPage = () => { - // If the money request being created is a distance request, don't allow the user to choose the currency. - // Only USD is allowed for distance requests. + // If the expense being created is a distance expense, don't allow the user to choose the currency. + // Only USD is allowed for distance expenses. // Remove query from the route and encode it. Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CURRENCY.getRoute(iouType, transactionID, reportID, backTo ? 'confirm' : '', Navigation.getActiveRouteWithoutParams())); }; @@ -138,7 +138,7 @@ function IOURequestStepTaxAmountPage({ } // If there was no reportID, then that means the user started this flow from the global + menu - // and an optimistic reportID was generated. In that case, the next step is to select the participants for this request. + // and an optimistic reportID was generated. In that case, the next step is to select the participants for this expense. Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, transactionID, reportID)); }; diff --git a/src/pages/iou/steps/MoneyRequestAmountForm.tsx b/src/pages/iou/steps/MoneyRequestAmountForm.tsx index a010e13ff496..b314c700dda6 100644 --- a/src/pages/iou/steps/MoneyRequestAmountForm.tsx +++ b/src/pages/iou/steps/MoneyRequestAmountForm.tsx @@ -40,7 +40,7 @@ type MoneyRequestAmountFormProps = { /** Fired when submit button pressed, saves the given amount and navigates to the next page */ onSubmitButtonPress: ({amount, currency}: {amount: string; currency: string}) => void; - /** The current tab we have navigated to in the request modal. String that corresponds to the request type. */ + /** The current tab we have navigated to in the expense modal. String that corresponds to the expense type. */ selectedTab?: SelectedTabRequest; }; diff --git a/src/types/onyx/Report.ts b/src/types/onyx/Report.ts index ce20462df372..58c2e558b1f3 100644 --- a/src/types/onyx/Report.ts +++ b/src/types/onyx/Report.ts @@ -38,7 +38,7 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback< /** The specific type of chat */ chatType?: ValueOf; - /** Whether the report has a child that is an outstanding money request that is awaiting action from the current user */ + /** Whether the report has a child that is an outstanding expense that is awaiting action from the current user */ hasOutstandingChildRequest?: boolean; /** List of icons for report participants */ diff --git a/src/types/onyx/Transaction.ts b/src/types/onyx/Transaction.ts index 4c1d154fc1ad..d4cdb96c062f 100644 --- a/src/types/onyx/Transaction.ts +++ b/src/types/onyx/Transaction.ts @@ -102,7 +102,7 @@ type Transaction = OnyxCommon.OnyxValueWithOfflineFeedback< /** The original transaction amount */ amount: number; - /** Whether the request is billable */ + /** Whether the expense is billable */ billable?: boolean; /** The category name */ @@ -111,7 +111,7 @@ type Transaction = OnyxCommon.OnyxValueWithOfflineFeedback< /** The comment object on the transaction */ comment: Comment; - /** Date that the request was created */ + /** Date that the expense was created */ created: string; /** The original currency of the transaction */ @@ -144,7 +144,7 @@ type Transaction = OnyxCommon.OnyxValueWithOfflineFeedback< /** The edited merchant name */ modifiedMerchant?: string; - /** The edited waypoints for the distance request */ + /** The edited waypoints for the distance expense */ modifiedWaypoints?: WaypointCollection; /** diff --git a/tests/actions/IOUTest.ts b/tests/actions/IOUTest.ts index 2ce72a58aead..1df10f72e4cf 100644 --- a/tests/actions/IOUTest.ts +++ b/tests/actions/IOUTest.ts @@ -190,7 +190,7 @@ describe('actions/IOU', () => { // The transaction should be attached to the IOU report expect(transaction?.reportID).toBe(iouReportID); - // Its amount should match the amount of the request + // Its amount should match the amount of the expense expect(transaction?.amount).toBe(amount); // The comment should be correct @@ -355,7 +355,7 @@ describe('actions/IOU', () => { // The transaction should be attached to the IOU report expect(transaction?.reportID).toBe(iouReportID); - // Its amount should match the amount of the request + // Its amount should match the amount of the expense expect(transaction?.amount).toBe(amount); // The comment should be correct @@ -1595,7 +1595,7 @@ describe('actions/IOU', () => { }); }); - describe('edit money request', () => { + describe('edit expense', () => { const amount = 10000; const comment = '💸💸💸💸'; const merchant = 'NASDAQ'; @@ -2148,7 +2148,7 @@ describe('actions/IOU', () => { await waitForBatchedUpdates(); await TestHelper.setPersonalDetails(TEST_USER_LOGIN, TEST_USER_ACCOUNT_ID); - // When an IOU request for money is made + // When a submit IOU expense is made IOU.requestMoney({reportID: ''}, amount, CONST.CURRENCY.USD, '', '', TEST_USER_LOGIN, TEST_USER_ACCOUNT_ID, {login: RORY_EMAIL, accountID: RORY_ACCOUNT_ID}, comment, {}); await waitForBatchedUpdates(); @@ -2231,13 +2231,13 @@ describe('actions/IOU', () => { afterEach(PusherHelper.teardown); - it('delete a money request (IOU Action and transaction) successfully', async () => { - // Given the fetch operations are paused and a money request is initiated + it('delete an expense (IOU Action and transaction) successfully', async () => { + // Given the fetch operations are paused and an expense is initiated // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. fetch.pause(); if (transaction && createIOUAction) { - // When the money request is deleted + // When the expense is deleted IOU.deleteMoneyRequest(transaction?.transactionID, createIOUAction, true); } await waitForBatchedUpdates(); @@ -2313,7 +2313,7 @@ describe('actions/IOU', () => { fetch.pause(); if (transaction && createIOUAction) { - // When the IOU money request is deleted + // When the IOU expense is deleted IOU.deleteMoneyRequest(transaction?.transactionID, createIOUAction, true); } await waitForBatchedUpdates(); @@ -2348,7 +2348,7 @@ describe('actions/IOU', () => { }); }); - // Then the report should be falsy so that there is no trace of the money request. + // Then the report should be falsy so that there is no trace of the expense. expect(report).toBeFalsy(); }); @@ -2385,7 +2385,7 @@ describe('actions/IOU', () => { const resultActionAfterUpdate = reportActions?.[reportActionID]; expect(resultActionAfterUpdate?.pendingAction).toBeUndefined(); - // When we attempt to delete a money request from the IOU report + // When we attempt to delete an expense from the IOU report // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. fetch.pause(); if (transaction && createIOUAction) { @@ -2482,7 +2482,7 @@ describe('actions/IOU', () => { jest.advanceTimersByTime(10); if (transaction && createIOUAction) { - // When Deleting a money request + // When Deleting an expense IOU.deleteMoneyRequest(transaction?.transactionID, createIOUAction, false); } await waitForBatchedUpdates(); @@ -2597,7 +2597,7 @@ describe('actions/IOU', () => { }); if (transaction && createIOUAction) { - // When Deleting a money request + // When Deleting an expense IOU.deleteMoneyRequest(transaction?.transactionID, createIOUAction, false); } await waitForBatchedUpdates(); @@ -2672,7 +2672,7 @@ describe('actions/IOU', () => { fetch.pause(); if (transaction && createIOUAction) { - // When deleting money request + // When deleting expense IOU.deleteMoneyRequest(transaction?.transactionID, createIOUAction, false); } await waitForBatchedUpdates(); @@ -2707,7 +2707,7 @@ describe('actions/IOU', () => { }); }); - it('update the moneyRequestPreview to show [Deleted request] when appropriate', async () => { + it('update the moneyRequestPreview to show [Deleted expense] when appropriate', async () => { await waitForBatchedUpdates(); // Given a thread report @@ -2819,12 +2819,12 @@ describe('actions/IOU', () => { // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. fetch.pause(); if (transaction && createIOUAction) { - // When we delete the money request + // When we delete the expense IOU.deleteMoneyRequest(transaction.transactionID, createIOUAction, false); } await waitForBatchedUpdates(); - // Then we expect the moneyRequestPreview to show [Deleted request] + // Then we expect the moneyRequestPreview to show [Deleted expense] await new Promise((resolve) => { const connectionID = Onyx.connect({ @@ -2843,7 +2843,7 @@ describe('actions/IOU', () => { // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. fetch.resume(); - // Then we expect the moneyRequestPreview to show [Deleted request] + // Then we expect the moneyRequestPreview to show [Deleted expense] await new Promise((resolve) => { const connectionID = Onyx.connect({ @@ -2867,7 +2867,7 @@ describe('actions/IOU', () => { }); await waitForBatchedUpdates(); - // Given a second money request in addition to the first one + // Given a second expense in addition to the first one jest.advanceTimersByTime(10); const amount2 = 20000; @@ -2889,7 +2889,7 @@ describe('actions/IOU', () => { expect(ioupreview).toBeTruthy(); expect(ioupreview?.message?.[0].text).toBe('rory@expensifail.com owes $300.00'); - // When we delete the first money request + // When we delete the first expense // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. fetch.pause(); jest.advanceTimersByTime(10); @@ -2980,7 +2980,7 @@ describe('actions/IOU', () => { await waitForBatchedUpdates(); - // When we delete the money request in SingleTransactionView and we should not delete the IOU report + // When we delete the expense in SingleTransactionView and we should not delete the IOU report // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. fetch.pause(); @@ -3034,7 +3034,7 @@ describe('actions/IOU', () => { it('navigate the user correctly to the chat Report when appropriate', () => { if (transaction && createIOUAction) { - // When we delete the money request and we should delete the IOU report + // When we delete the expense and we should delete the IOU report IOU.deleteMoneyRequest(transaction.transactionID, createIOUAction, false); } // Then we expect to navigate to the chat report diff --git a/tests/perf-test/ReportActionCompose.perf-test.tsx b/tests/perf-test/ReportActionCompose.perf-test.tsx index 8d6cb1ac7e57..c61293e4c83d 100644 --- a/tests/perf-test/ReportActionCompose.perf-test.tsx +++ b/tests/perf-test/ReportActionCompose.perf-test.tsx @@ -162,7 +162,7 @@ test('[ReportActionCompose] render composer with attachement modal interactions' const scenario = async () => { const hintAddAttachmentButtonText = Localize.translateLocal('reportActionCompose.addAttachment'); const hintAssignTaskButtonText = Localize.translateLocal('newTaskPage.assignTask'); - const hintSplitBillButtonText = Localize.translateLocal('iou.splitBill'); + const hintSplitBillButtonText = Localize.translateLocal('iou.splitExpense'); // Query for the attachment modal items const addAttachmentButton = await screen.findByLabelText(hintAddAttachmentButtonText); diff --git a/tests/unit/ModifiedExpenseMessageTest.ts b/tests/unit/ModifiedExpenseMessageTest.ts index 5880f028d216..dd4e4368ed55 100644 --- a/tests/unit/ModifiedExpenseMessageTest.ts +++ b/tests/unit/ModifiedExpenseMessageTest.ts @@ -347,7 +347,7 @@ describe('ModifiedExpenseMessage', () => { }; it('returns the correct text message', () => { - const expectedResult = 'changed the request'; + const expectedResult = 'changed the expense'; const result = ModifiedExpenseMessage.getForReportAction(report.reportID, reportAction); diff --git a/tests/unit/ReportUtilsTest.js b/tests/unit/ReportUtilsTest.js index ffd5c9147dc0..4bd7213879e6 100644 --- a/tests/unit/ReportUtilsTest.js +++ b/tests/unit/ReportUtilsTest.js @@ -312,7 +312,7 @@ describe('ReportUtils', () => { }; expect(ReportUtils.requiresAttentionFromCurrentUser(report)).toBe(true); }); - it('returns true when the report has oustanding child request', () => { + it('returns true when the report has oustanding child expense', () => { const report = { ...LHNTestUtils.getFakeReport(), ownerAccountID: 99, @@ -486,7 +486,7 @@ describe('ReportUtils', () => { }); }); - describe('return only money request option if', () => { + describe('return only submit expense option if', () => { it("it is an expense report tied to user's own policy expense chat", () => { Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}102`, { reportID: '102', @@ -578,7 +578,7 @@ describe('ReportUtils', () => { }); }); - describe('return multiple money request option if', () => { + describe('return multiple expense options if', () => { it("it is user's own policy expense chat", () => { const report = { ...LHNTestUtils.getFakeReport(), From 30eaee6e5a608abc763c90eca2f1a10b71280777 Mon Sep 17 00:00:00 2001 From: Shubham Agrawal Date: Wed, 3 Apr 2024 16:11:02 +0530 Subject: [PATCH 02/29] Fix translation after merge --- src/components/MoneyReportHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 487e1778062e..1ed8f1c24e75 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -288,7 +288,7 @@ function MoneyReportHeader({session, policy, chatReport, nextStep, report: money danger /> setIsDeleteRequestModalVisible(false)} From d2ee607a35ea9cfd3ecb2c7dc6527eda4dc5ddcc Mon Sep 17 00:00:00 2001 From: Shubham Agrawal Date: Wed, 3 Apr 2024 16:46:27 +0530 Subject: [PATCH 03/29] More translation fix --- ...neyTemporaryForRefactorRequestConfirmationList.js | 6 +++--- src/languages/en.ts | 12 +++--------- src/languages/es.ts | 1 - src/pages/home/report/ReportActionItemSingle.tsx | 2 +- ...emporaryForRefactorRequestParticipantsSelector.js | 2 +- .../iou/request/step/IOURequestStepConfirmation.js | 4 ++-- .../iou/request/step/IOURequestStepParticipants.js | 4 ++-- .../MoneyRequestParticipantsSelector.js | 2 +- 8 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js index 72d2d132726b..aa300ba39e3b 100755 --- a/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js +++ b/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js @@ -404,9 +404,9 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ if (isTypeTrackExpense) { text = translate('iou.trackExpense'); } else if (isTypeSplit && iouAmount === 0) { - text = translate('iou.split'); + text = translate('iou.splitExpense'); } else if ((receiptPath && isTypeRequest) || isDistanceRequestWithPendingRoute) { - text = translate('iou.expense'); + text = translate('iou.submitExpense'); if (iouAmount !== 0) { text = translate('iou.requestAmount', {amount: formattedAmount}); } @@ -592,7 +592,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ Log.info(`[IOU] Sending money via: ${paymentMethod}`); onSendMoney(paymentMethod); } else { - // validate the amount for distance requests + // validate the amount for distance expenses const decimals = CurrencyUtils.getCurrencyDecimals(iouCurrencyCode); if (isDistanceRequest && !isDistanceRequestWithPendingRoute && !MoneyRequestUtils.validateAmount(String(iouAmount), decimals)) { setFormError('common.error.invalidAmount'); diff --git a/src/languages/en.ts b/src/languages/en.ts index f32756302007..c48f04f5f1de 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -470,14 +470,9 @@ export default { copyEmailToClipboard: 'Copy email to clipboard', markAsUnread: 'Mark as unread', markAsRead: 'Mark as read', - editAction: ({action}: EditActionParams) => - `Edit ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}`, - deleteAction: ({action}: DeleteActionParams) => - `Delete ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}`, - deleteConfirmation: ({action}: DeleteConfirmationParams) => - `Are you sure you want to delete this ${ - action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment' - }?`, + editAction: ({action}: EditActionParams) => `Edit ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}`, + deleteAction: ({action}: DeleteActionParams) => `Delete ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}`, + deleteConfirmation: ({action}: DeleteConfirmationParams) => `Are you sure you want to delete this ${action?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? 'expense' : 'comment'}?`, onlyVisible: 'Only visible to', replyInThread: 'Reply in thread', joinThread: 'Join thread', @@ -616,7 +611,6 @@ export default { card: 'Card', original: 'Original', split: 'Split', - addToSplit: 'Add to split', splitExpense: 'Split expense', payName: ({name}: {name: string}) => `Pay ${name}`, paySomeone: 'Pay someone', diff --git a/src/languages/es.ts b/src/languages/es.ts index 93e913c84178..a7acaa2d767b 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -612,7 +612,6 @@ export default { card: 'Tarjeta', original: 'Original', split: 'Dividir', - addToSplit: 'Añadir para dividir', splitExpense: 'Dividir factura', expense: 'Solicitar', participants: 'Participantes', diff --git a/src/pages/home/report/ReportActionItemSingle.tsx b/src/pages/home/report/ReportActionItemSingle.tsx index 696cd7a7d850..e3ec0fae5282 100644 --- a/src/pages/home/report/ReportActionItemSingle.tsx +++ b/src/pages/home/report/ReportActionItemSingle.tsx @@ -105,7 +105,7 @@ function ReportActionItemSingle({ let secondaryAvatar: Icon; const primaryDisplayName = displayName; if (displayAllActors) { - // The ownerAccountID and actorAccountID can be the same if the a user requests money back from the IOU's original creator, in that case we need to use managerID to avoid displaying the same user twice + // The ownerAccountID and actorAccountID can be the same if the a user submits expense back from the IOU's original creator, in that case we need to use managerID to avoid displaying the same user twice const secondaryAccountId = iouReport?.ownerAccountID === actorAccountID ? iouReport?.managerID : iouReport?.ownerAccountID; const secondaryUserAvatar = personalDetails?.[secondaryAccountId ?? -1]?.avatar ?? ''; const secondaryDisplayName = ReportUtils.getDisplayNameForParticipant(secondaryAccountId); diff --git a/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js b/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js index a67c828adac4..2e5cc966fa5c 100644 --- a/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js +++ b/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js @@ -306,7 +306,7 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({ {!!participants.length && (