Skip to content

Commit

Permalink
Merge pull request #41268 from Expensify/aldo_fix-export-translations
Browse files Browse the repository at this point in the history
Update exportDate translations
  • Loading branch information
aldo-expensify authored Apr 30, 2024
2 parents 4c1e8b8 + 087f3dd commit a14a3e6
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4698,9 +4698,9 @@ const CONST = {
},

QUICKBOOKS_EXPORT_DATE: {
LAST_EXPENSE: 'lastExpense',
EXPORTED_DATE: 'exportedDate',
SUBMITTED_DATA: 'submittedData',
LAST_EXPENSE: 'LAST_EXPENSE',
REPORT_EXPORTED: 'REPORT_EXPORTED',
REPORT_SUBMITTED: 'REPORT_SUBMITTED',
},

QUICKBOOKS_EXPORT_COMPANY_CARD: {
Expand Down
23 changes: 18 additions & 5 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1913,11 +1913,24 @@ export default {
exportExpensifyCard: 'Export Expensify Card transactions as',
deepDiveExpensifyCard: 'Expensify Card transactions automatically export to a "Expensify Card Liability Account" created with',
deepDiveExpensifyCardIntegration: 'our integration.',
exportDate: 'Export date',
exportDateDescription: 'Use this date when exporting reports to QuickBooks Online.',
lastExpense: {label: 'Date of last expense', description: 'The date of the most recent expense on the report'},
exportedDate: {label: 'Export date', description: 'The date the report was exported to QuickBooks Online'},
submittedData: {label: 'Submitted date', description: 'The date the report was submitted for approval'},
exportDate: {
label: 'Export date',
description: 'Use this date when exporting reports to QuickBooks Online.',
values: {
[CONST.QUICKBOOKS_EXPORT_DATE.LAST_EXPENSE]: {
label: 'Date of last expense',
description: 'The date of the most recent expense on the report',
},
[CONST.QUICKBOOKS_EXPORT_DATE.REPORT_EXPORTED]: {
label: 'Export date',
description: 'The date the report was exported to QuickBooks Online',
},
[CONST.QUICKBOOKS_EXPORT_DATE.REPORT_SUBMITTED]: {
label: 'Submitted date',
description: 'The date the report was submitted for approval',
},
},
},
receivable: 'Accounts receivable', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS.
archive: 'Accounts receivable archive', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS.
exportInvoicesDescription: 'Invoices will be exported to this account in QuickBooks Online.',
Expand Down
23 changes: 18 additions & 5 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1937,11 +1937,24 @@ export default {
deepDiveExpensifyCard: 'Las transacciones de la Tarjeta Expensify se exportan automáticamente a una "Cuenta de Responsabilidad de la Tarjeta Expensify" creada con',
deepDiveExpensifyCardIntegration: 'nuestra integración.',
exportExpensifyCard: 'Exportar las transacciones de las tarjetas Expensify como',
exportDate: 'Fecha de exportación',
exportDateDescription: 'Use this date when exporting reports to QuickBooks Online.',
lastExpense: {label: 'Date of last expense', description: 'The date of the most recent expense on the report'},
exportedDate: {label: 'Fecha de exportación', description: 'Fecha de exportación del informe a QuickBooks Online'},
submittedData: {label: 'Fecha de envío', description: 'Fecha en la que el informe se envió para su aprobación'},
exportDate: {
label: 'Fecha de exportación',
description: 'Usa esta fecha al exportar informe a QuickBooks Online.',
values: {
[CONST.QUICKBOOKS_EXPORT_DATE.LAST_EXPENSE]: {
label: 'Fecha del último gasto',
description: 'Fecha del gasto mas reciente en el informe',
},
[CONST.QUICKBOOKS_EXPORT_DATE.REPORT_EXPORTED]: {
label: 'Fecha de exportación',
description: 'Fecha de exportación del informe a QuickBooks Online',
},
[CONST.QUICKBOOKS_EXPORT_DATE.REPORT_SUBMITTED]: {
label: 'Fecha de envío',
description: 'Fecha en la que el informe se envió para su aprobación',
},
},
},
receivable: 'Cuentas por cobrar', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS.
archive: 'Archivo de cuentas por cobrar', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS.
exportInvoicesDescription: 'Las facturas se exportarán a esta cuenta en QuickBooks Online.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function QuickbooksExportConfigurationPage({policy}: WithPolicyConnectionsProps)
description: translate('workspace.qbo.date'),
onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT_DATE_SELECT.getRoute(policyID)),
brickRoadIndicator: errorFields?.exportDate ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined,
title: exportDate ? translate(`workspace.qbo.${exportDate}.label`) : undefined,
title: exportDate ? translate(`workspace.qbo.exportDate.values.${exportDate}.label`) : undefined,
pendingAction: pendingFields?.exportDate,
error: errorFields?.exportDate ? translate('common.genericErrorMessage') : undefined,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function QuickbooksExportDateSelectPage({policy}: WithPolicyConnectionsProps) {
const {exportDate} = policy?.connections?.quickbooksOnline?.config ?? {};
const data: CardListItem[] = Object.values(CONST.QUICKBOOKS_EXPORT_DATE).map((dateType) => ({
value: dateType,
text: translate(`workspace.qbo.${dateType}.label`),
alternateText: translate(`workspace.qbo.${dateType}.description`),
text: translate(`workspace.qbo.exportDate.values.${dateType}.label`),
alternateText: translate(`workspace.qbo.exportDate.values.${dateType}.description`),
keyForList: dateType,
isSelected: exportDate === dateType,
}));
Expand All @@ -52,9 +52,9 @@ function QuickbooksExportDateSelectPage({policy}: WithPolicyConnectionsProps) {
includeSafeAreaPaddingBottom={false}
testID={QuickbooksExportDateSelectPage.displayName}
>
<HeaderWithBackButton title={translate('workspace.qbo.exportDate')} />
<HeaderWithBackButton title={translate('workspace.qbo.exportDate.label')} />
<SelectionList
headerContent={<Text style={[styles.ph5, styles.pb5]}>{translate('workspace.qbo.exportDateDescription')}</Text>}
headerContent={<Text style={[styles.ph5, styles.pb5]}>{translate('workspace.qbo.exportDate.description')}</Text>}
sections={[{data}]}
ListItem={RadioListItem}
onSelectRow={selectExportDate}
Expand Down

0 comments on commit a14a3e6

Please sign in to comment.