Skip to content

Commit

Permalink
Merge pull request #53004 from c3024/rename-IOU-step-header-names
Browse files Browse the repository at this point in the history
Rename Money Request/Split/Pay step header names
  • Loading branch information
thienlnam authored Nov 25, 2024
2 parents e1c6ba4 + 7700226 commit f97808a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,8 @@ const translations = {
submitExpense: 'Submit expense',
createExpense: 'Create expense',
trackExpense: 'Track expense',
chooseRecipient: 'Choose recipient',
confirmDetails: 'Confirm details',
pay: 'Pay',
cancelPayment: 'Cancel payment',
cancelPaymentConfirmation: 'Are you sure that you want to cancel this payment?',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,8 @@ const translations = {
createExpense: 'Crear gasto',
paySomeone: ({name}: PaySomeoneParams = {}) => `Pagar a ${name ?? 'alguien'}`,
trackExpense: 'Seguimiento de gastos',
chooseRecipient: 'Elige destinatario',
confirmDetails: 'Confirma los detalles',
pay: 'Pagar',
cancelPayment: 'Cancelar el pago',
cancelPaymentConfirmation: '¿Estás seguro de que quieres cancelar este pago?',
Expand Down
4 changes: 2 additions & 2 deletions src/pages/iou/request/IOURequestStartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ function IOURequestStartPage({
const {canUseCombinedTrackSubmit} = usePermissions();

const tabTitles = {
[CONST.IOU.TYPE.REQUEST]: translate('iou.submitExpense'),
[CONST.IOU.TYPE.REQUEST]: translate('iou.createExpense'),
[CONST.IOU.TYPE.SUBMIT]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.submitExpense'),
[CONST.IOU.TYPE.SEND]: translate('iou.paySomeone', {name: ReportUtils.getPayeeName(report)}),
[CONST.IOU.TYPE.PAY]: translate('iou.paySomeone', {name: ReportUtils.getPayeeName(report)}),
[CONST.IOU.TYPE.SPLIT]: translate('iou.splitExpense'),
[CONST.IOU.TYPE.SPLIT]: translate('iou.createExpense'),
[CONST.IOU.TYPE.TRACK]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),
[CONST.IOU.TYPE.INVOICE]: translate('workspace.invoices.sendInvoice'),
[CONST.IOU.TYPE.CREATE]: translate('iou.createExpense'),
Expand Down
17 changes: 2 additions & 15 deletions src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function IOURequestStepConfirmation({
const transactionTaxAmount = transaction?.taxAmount ?? 0;
const isSharingTrackExpense = action === CONST.IOU.ACTION.SHARE;
const isCategorizingTrackExpense = action === CONST.IOU.ACTION.CATEGORIZE;
const isSubmittingFromTrackExpense = action === CONST.IOU.ACTION.SUBMIT;
const isMovingTransactionFromTrackExpense = IOUUtils.isMovingTransactionFromTrackExpense(action);
const payeePersonalDetails = useMemo(() => {
if (personalDetails?.[transaction?.splitPayerAccountIDs?.at(0) ?? -1]) {
Expand All @@ -113,26 +112,14 @@ function IOURequestStepConfirmation({
if (isCategorizingTrackExpense) {
return translate('iou.categorize');
}
if (isSubmittingFromTrackExpense) {
return translate('iou.submitExpense');
}
if (isSharingTrackExpense) {
return translate('iou.share');
}
if (iouType === CONST.IOU.TYPE.SPLIT) {
return translate('iou.splitExpense');
}
if (iouType === CONST.IOU.TYPE.TRACK) {
return translate('iou.trackExpense');
}
if (iouType === CONST.IOU.TYPE.PAY) {
return translate('iou.paySomeone', {name: ReportUtils.getPayeeName(report)});
}
if (iouType === CONST.IOU.TYPE.INVOICE) {
return translate('workspace.invoices.sendInvoice');
}
return translate('iou.submitExpense');
}, [iouType, report, translate, isSharingTrackExpense, isCategorizingTrackExpense, isSubmittingFromTrackExpense]);
return translate('iou.confirmDetails');
}, [iouType, translate, isSharingTrackExpense, isCategorizingTrackExpense]);

const participants = useMemo(
() =>
Expand Down
5 changes: 1 addition & 4 deletions src/pages/iou/request/step/IOURequestStepParticipants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ function IOURequestStepParticipants({
if (action === CONST.IOU.ACTION.CATEGORIZE) {
return translate('iou.categorize');
}
if (action === CONST.IOU.ACTION.SUBMIT) {
return translate('iou.submitExpense');
}
if (action === CONST.IOU.ACTION.SHARE) {
return translate('iou.share');
}
Expand All @@ -63,7 +60,7 @@ function IOURequestStepParticipants({
if (iouType === CONST.IOU.TYPE.INVOICE) {
return translate('workspace.invoices.sendInvoice');
}
return translate('iou.submitExpense');
return translate('iou.chooseRecipient');
}, [iouType, translate, isSplitRequest, action]);

const selfDMReportID = useMemo(() => ReportUtils.findSelfDMReportID(), []);
Expand Down

0 comments on commit f97808a

Please sign in to comment.