Skip to content

Commit

Permalink
rename IOU request step header names
Browse files Browse the repository at this point in the history
  • Loading branch information
c3024 committed Nov 23, 2024
1 parent 3ebe852 commit 45dfede
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 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
10 changes: 5 additions & 5 deletions src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,24 @@ function IOURequestStepConfirmation({
return translate('iou.categorize');
}
if (isSubmittingFromTrackExpense) {
return translate('iou.submitExpense');
return translate('iou.confirmDetails');
}
if (isSharingTrackExpense) {
return translate('iou.share');
}
if (iouType === CONST.IOU.TYPE.SPLIT) {
return translate('iou.splitExpense');
return translate('iou.confirmDetails');
}
if (iouType === CONST.IOU.TYPE.TRACK) {
return translate('iou.trackExpense');
return translate('iou.confirmDetails');
}
if (iouType === CONST.IOU.TYPE.PAY) {
return translate('iou.paySomeone', {name: ReportUtils.getPayeeName(report)});
return translate('iou.confirmDetails');
}
if (iouType === CONST.IOU.TYPE.INVOICE) {
return translate('workspace.invoices.sendInvoice');
}
return translate('iou.submitExpense');
return translate('iou.confirmDetails');
}, [iouType, report, translate, isSharingTrackExpense, isCategorizingTrackExpense, isSubmittingFromTrackExpense]);

Check warning on line 134 in src/pages/iou/request/step/IOURequestStepConfirmation.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

React Hook useMemo has an unnecessary dependency: 'report'. Either exclude it or remove the dependency array

const participants = useMemo(
Expand Down
4 changes: 2 additions & 2 deletions src/pages/iou/request/step/IOURequestStepParticipants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function IOURequestStepParticipants({
return translate('iou.categorize');
}
if (action === CONST.IOU.ACTION.SUBMIT) {
return translate('iou.submitExpense');
return translate('iou.chooseRecipient');
}
if (action === CONST.IOU.ACTION.SHARE) {
return translate('iou.share');
Expand All @@ -63,7 +63,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 45dfede

Please sign in to comment.