Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix month in the ECard statement header title #31843

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,7 @@ export default {
genericCreateTaskFailureMessage: 'Unexpected error create task, please try again later.',
},
statementPage: {
title: (year, monthName) => `${monthName} ${year} statement`,
generatingPDF: "We're generating your PDF right now. Please come back later!",
},
keyboardShortcutsPage: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,7 @@ export default {
genericCreateTaskFailureMessage: 'Error inesperado al crear el tarea, por favor, inténtalo más tarde.',
},
statementPage: {
title: (year, monthName) => `Estado de cuenta de ${monthName} ${year}`,
generatingPDF: 'Estamos generando tu PDF ahora mismo. ¡Por favor, vuelve más tarde!',
},
keyboardShortcutsPage: {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/wallet/WalletStatementPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function WalletStatementPage(props) {

const year = yearMonth.substring(0, 4) || getYear(new Date());
const month = yearMonth.substring(4) || getMonth(new Date());
const monthName = format(new Date(year, month), CONST.DATE.MONTH_FORMAT);
const title = `${monthName} ${year} statement`;
const monthName = format(new Date(year, month - 1), CONST.DATE.MONTH_FORMAT);
const title = props.translate('statementPage.title', year, monthName);
const url = `${CONFIG.EXPENSIFY.EXPENSIFY_URL}statement.php?period=${yearMonth}`;

return (
Expand Down
Loading