A local-first personal finance app
translate import transactions (#5565)
milanalexandrea74da119043e
diff --git a/packages/desktop-client/src/components/App.tsx b/packages/desktop-client/src/components/App.tsxindex 412620ff6e..c2add500fc 100644--- a/packages/desktop-client/src/components/App.tsx+++ b/packages/desktop-client/src/components/App.tsx@@ -147,7 +147,7 @@ function AppInner() {sticky: true,message: t('Login expired, please log in again.'),button: {- title: t('Go to log in'),+ title: t('Go to login'),action: () => {dispatch(signOut());},diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsxindex 34cf00eb9e..aa614842cb 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx@@ -718,10 +718,10 @@ export function ImportTransactionsModal({]);const headers = [- { name: 'Date', width: 200 },- { name: 'Payee', width: 'flex' },- { name: 'Notes', width: 'flex' },- { name: 'Category', width: 'flex' },+ { name: t('Date'), width: 200 },+ { name: t('Payee'), width: 'flex' },+ { name: t('Notes'), width: 'flex' },+ { name: t('Category'), width: 'flex' },];if (reconcile) {diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsxindex 7c777ae31d..5d4440735b 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx@@ -1,4 +1,5 @@import React from 'react';+import { useTranslation } from 'react-i18next';import { Input } from '@actual-app/components/input';import { View } from '@actual-app/components/view';@@ -20,6 +21,8 @@ export function InOutOption({onToggle,onChangeText,}: InOutOptionProps) {+ const { t } = useTranslation();+return (<View style={{ flexDirection: 'row', gap: 10, height: 28 }}><CheckboxOption@@ -29,15 +32,15 @@ export function InOutOption({onChange={onToggle}>{inOutMode- ? 'In/Out outflow value'- : 'Select column to specify if amount goes in/out'}+ ? t('In/Out outflow value')+ : t('Select column to specify if amount goes in/out')}</CheckboxOption>{inOutMode && (<Inputtype="text"value={outValue}onChangeValue={onChangeText}- placeholder="Value for out rows, e.g: ‘Credit’"+ placeholder={t('Value for out rows, e.g: ‘Credit’')}/>)}</View>diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsxindex ba5bfed934..74de3182c3 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx@@ -1,4 +1,5 @@import React, { type ComponentProps, useMemo } from 'react';+import { useTranslation } from 'react-i18next';import { SvgDownAndRightArrow } from '@actual-app/components/icons/v2';import { Stack } from '@actual-app/components/stack';@@ -53,6 +54,8 @@ export function Transaction({onCheckTransaction,reconcile,}: TransactionProps) {+ const { t } = useTranslation();+const categoryList = categories.map(category => category.name);const transaction = useMemo(() =>@@ -108,11 +111,15 @@ export function Transaction({<Tooltipcontent={!transaction.existing && !transaction.ignored- ? 'New transaction. You can import it, or skip it.'+ ? t('New transaction. You can import it, or skip it.'): transaction.ignored- ? 'Already imported transaction. You can skip it, or import it again.'+ ? t(+ 'Already imported transaction. You can skip it, or import it again.',+ ): transaction.existing- ? 'Updated transaction. You can update it, import it again, or skip it.'+ ? t(+ 'Updated transaction. You can update it, import it again, or skip it.',+ ): ''}placement="right top"@@ -234,7 +241,7 @@ export function Transaction({}}title={outflow === null- ? 'Invalid: unable to parse the value'+ ? t('Invalid: unable to parse the value'): amountToCurrency(outflow)}>@@ -251,7 +258,7 @@ export function Transaction({}}title={inflow === null- ? 'Invalid: unable to parse the value'+ ? t('Invalid: unable to parse the value'): amountToCurrency(inflow)}>@@ -268,7 +275,9 @@ export function Transaction({}}title={amount === null- ? `Invalid: unable to parse the value (${transaction.amount})`+ ? t('Invalid: unable to parse the value ({{amount}})', {+ amount: transaction.amount,+ }): amountToCurrency(amount)}>diff --git a/upcoming-release-notes/5565.md b/upcoming-release-notes/5565.mdnew file mode 100644index 0000000000..9c273aabb9--- /dev/null+++ b/upcoming-release-notes/5565.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [milanalexandre]+---++Translate import transactions (modal)