A local-first personal finance app
Marked files for translation (#3752)
Awais Alee0c94214a8ff5
diff --git a/packages/desktop-client/src/components/ManageRules.tsx b/packages/desktop-client/src/components/ManageRules.tsxindex bb9ce717ae..24fb6ccc38 100644--- a/packages/desktop-client/src/components/ManageRules.tsx+++ b/packages/desktop-client/src/components/ManageRules.tsx@@ -7,6 +7,7 @@ import React, {type SetStateAction,type Dispatch,} from 'react';+import { useTranslation } from 'react-i18next';import { useDispatch } from 'react-redux';import { pushModal } from 'loot-core/src/client/actions/modals';@@ -196,7 +197,9 @@ export function ManageRules({]);if (someDeletionsFailed) {- alert('Some rules were not deleted because they are linked to schedules');+ alert(+ t('Some rules were not deleted because they are linked to schedules'),+ );}await loadRules();@@ -259,6 +262,7 @@ export function ManageRules({const onHover = useCallback(id => {setHoveredRule(id);}, []);+ const { t } = useTranslation();return (<SelectedProvider instance={selectedInst}>@@ -280,19 +284,19 @@ export function ManageRules({}}><Text>- Rules are always run in the order that you see them.{' '}+ {t('Rules are always run in the order that you see them.')}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/budgeting/rules/"linkColor="muted">- Learn more+ {t('Learn more')}</Link></Text></View><View style={{ flex: 1 }} /><Search- placeholder="Filter rules..."+ placeholder={t('Filter rules...')}value={filter}onChange={onSearchChange}/>@@ -305,7 +309,7 @@ export function ManageRules({style={{ marginBottom: -1 }}>{filteredRules.length === 0 ? (- <EmptyMessage text="No rules" style={{ marginTop: 15 }} />+ <EmptyMessage text={t('No rules')} style={{ marginTop: 15 }} />) : (<RulesListrules={filteredRules}@@ -333,7 +337,7 @@ export function ManageRules({</Button>)}<Button variant="primary" onPress={onCreateRule}>- Create new rule+ {t('Create new rule')}</Button></Stack></View>diff --git a/packages/desktop-client/src/components/ManageRulesPage.tsx b/packages/desktop-client/src/components/ManageRulesPage.tsxindex efb6832513..12f76823d9 100644--- a/packages/desktop-client/src/components/ManageRulesPage.tsx+++ b/packages/desktop-client/src/components/ManageRulesPage.tsx@@ -1,11 +1,13 @@import React from 'react';+import { t } from 'i18next';+import { ManageRules } from './ManageRules';import { Page } from './Page';export function ManageRulesPage() {return (- <Page header="Rules">+ <Page header={t('Rules')}><ManageRules isModal={false} payeeId={null} /></Page>);diff --git a/packages/desktop-client/src/components/Notes.tsx b/packages/desktop-client/src/components/Notes.tsxindex ea78c6b851..28a1ca6f8f 100644--- a/packages/desktop-client/src/components/Notes.tsx+++ b/packages/desktop-client/src/components/Notes.tsx@@ -3,6 +3,7 @@ import React, { useEffect, useRef, type CSSProperties } from 'react';import ReactMarkdown from 'react-markdown';import { css } from '@emotion/css';+import { t } from 'i18next';import remarkGfm from 'remark-gfm';import { theme } from '../style';@@ -122,7 +123,7 @@ export function Notes({value={notes || ''}onChange={e => onChange?.(e.target.value)}onBlur={e => onBlur?.(e.target.value)}- placeholder="Notes (markdown supported)"+ placeholder={t('Notes (markdown supported)')}/>) : (<Text className={css([markdownStyles, getStyle?.(editable)])}>diff --git a/packages/desktop-client/src/components/NotesButton.tsx b/packages/desktop-client/src/components/NotesButton.tsxindex 966fe0395f..80b2c2492d 100644--- a/packages/desktop-client/src/components/NotesButton.tsx+++ b/packages/desktop-client/src/components/NotesButton.tsx@@ -6,6 +6,8 @@ import React, {type CSSProperties,} from 'react';+import { t } from 'i18next';+import { send } from 'loot-core/src/platform/client/fetch';import { useNotes } from '../hooks/useNotes';@@ -59,7 +61,7 @@ export function NotesButton({<Buttonref={triggerRef}variant="bare"- aria-label="View notes"+ aria-label={t('View notes')}className={!hasNotes && !isOpen ? 'hover-visible' : ''}style={{color: defaultColor,diff --git a/packages/desktop-client/src/components/Notifications.tsx b/packages/desktop-client/src/components/Notifications.tsxindex 370cb1f22c..b7805d376c 100644--- a/packages/desktop-client/src/components/Notifications.tsx+++ b/packages/desktop-client/src/components/Notifications.tsx@@ -9,6 +9,7 @@ import React, {import { useDispatch, useSelector } from 'react-redux';import { css } from '@emotion/css';+import { t } from 'i18next';import { removeNotification } from 'loot-core/client/actions';import { type State } from 'loot-core/src/client/state-types';@@ -231,7 +232,7 @@ function Notification({</Stack><Buttonvariant="bare"- aria-label="Close"+ aria-label={t('Close')}style={{ flexShrink: 0, color: 'currentColor' }}onPress={onRemove}>diff --git a/packages/desktop-client/src/components/ThemeSelector.tsx b/packages/desktop-client/src/components/ThemeSelector.tsxindex a2694de4d1..7993957790 100644--- a/packages/desktop-client/src/components/ThemeSelector.tsx+++ b/packages/desktop-client/src/components/ThemeSelector.tsx@@ -1,5 +1,7 @@import React, { useRef, useState, type CSSProperties } from 'react';+import { t } from 'i18next';+import type { Theme } from 'loot-core/src/types/prefs';import { SvgMoonStars, SvgSun, SvgSystem } from '../icons/v2';@@ -45,7 +47,7 @@ export function ThemeSelector({ style }: ThemeSelectorProps) {<Buttonref={triggerRef}variant="bare"- aria-label="Switch theme"+ aria-label={t('Switch theme')}onPress={() => setMenuOpen(true)}style={style}>diff --git a/packages/desktop-client/src/components/Titlebar.tsx b/packages/desktop-client/src/components/Titlebar.tsxindex d0cf56a152..d430b8ceaa 100644--- a/packages/desktop-client/src/components/Titlebar.tsx+++ b/packages/desktop-client/src/components/Titlebar.tsx@@ -3,6 +3,7 @@ import { useHotkeys } from 'react-hotkeys-hook';import { Routes, Route, useLocation } from 'react-router-dom';import { css } from '@emotion/css';+import { t } from 'i18next';import * as Platform from 'loot-core/src/client/platform';import * as queries from 'loot-core/src/client/queries';@@ -206,7 +207,7 @@ function SyncButton({ style, isMobile = false }: SyncButtonProps) {return (<Buttonvariant="bare"- aria-label="Sync"+ aria-label={t('Sync')}className={css({...(isMobile? {@@ -290,7 +291,7 @@ export function Titlebar({ style }: TitlebarProps) {>{(floatingSidebar || sidebar.alwaysFloats) && (<Button- aria-label="Sidebar menu"+ aria-label={t('Sidebar menu')}variant="bare"style={{ marginRight: 8 }}onHoverStart={e => {@@ -322,7 +323,7 @@ export function Titlebar({ style }: TitlebarProps) {height={10}style={{ marginRight: 5, color: 'currentColor' }}/>{' '}- Back+ {t('Back')}</Button>) : null}diff --git a/packages/desktop-client/src/components/UpdateNotification.tsx b/packages/desktop-client/src/components/UpdateNotification.tsxindex e2f9e60b7d..acbb6ea238 100644--- a/packages/desktop-client/src/components/UpdateNotification.tsx+++ b/packages/desktop-client/src/components/UpdateNotification.tsx@@ -1,4 +1,5 @@import React from 'react';+import { useTranslation } from 'react-i18next';import { useSelector } from 'react-redux';import { type State } from 'loot-core/src/client/state-types';@@ -13,6 +14,7 @@ import { Text } from './common/Text';import { View } from './common/View';export function UpdateNotification() {+ const { t } = useTranslation();const updateInfo = useSelector((state: State) => state.app.updateInfo);const showUpdateNotification = useSelector((state: State) => state.app.showUpdateNotification,@@ -40,7 +42,9 @@ export function UpdateNotification() {><View style={{ flexDirection: 'row', alignItems: 'center' }}><View style={{ marginRight: 10, fontWeight: 700 }}>- <Text>App updated to {updateInfo.version}</Text>+ <Text>+ {t('App updated to {{version}}', { version: updateInfo.version })}+ </Text></View><View style={{ flex: 1 }} /><View style={{ marginTop: -1 }}>@@ -53,7 +57,7 @@ export function UpdateNotification() {textDecoration: 'underline',}}>- Restart+ {t('Restart')}</Link>{' '}(<Link@@ -68,12 +72,12 @@ export function UpdateNotification() {)}>- notes+ {t('notes')}</Link>)<Buttonvariant="bare"- aria-label="Close"+ aria-label={t('Close')}style={{ display: 'inline', padding: '1px 7px 2px 7px' }}onPress={() => {// Set a flag to never show an update notification again for this sessiondiff --git a/packages/desktop-client/src/components/budget/SidebarGroup.tsx b/packages/desktop-client/src/components/budget/SidebarGroup.tsxindex 6230f35b3b..20a81eba98 100644--- a/packages/desktop-client/src/components/budget/SidebarGroup.tsx+++ b/packages/desktop-client/src/components/budget/SidebarGroup.tsx@@ -149,7 +149,7 @@ export function SidebarGroup({{ name: 'rename', text: t('Rename') },!group.is_income && {name: 'toggle-visibility',- text: group.hidden ? t('Show') : t('Hide'),+ text: group.hidden ? 'Show' : 'Hide',},onDelete && { name: 'delete', text: t('Delete') },...(isGoalTemplatesEnableddiff --git a/packages/desktop-client/src/components/common/Modal.tsx b/packages/desktop-client/src/components/common/Modal.tsxindex b9286933f7..8606c21d70 100644--- a/packages/desktop-client/src/components/common/Modal.tsx+++ b/packages/desktop-client/src/components/common/Modal.tsx@@ -17,6 +17,7 @@ import { useHotkeysContext } from 'react-hotkeys-hook';import { css } from '@emotion/css';import { AutoTextSize } from 'auto-text-size';+import { t } from 'i18next';import { useModalState } from '../../hooks/useModalState';import { AnimatedLoading } from '../../icons/AnimatedLoading';@@ -100,7 +101,7 @@ export const Modal = ({<ReactAriaModal>{modalProps => (<Dialog- aria-label="Modal dialog"+ aria-label={t('Modal dialog')}className={css(styles.lightScrollbar)}style={{outline: 'none', // remove focus outline@@ -329,7 +330,7 @@ export function ModalHeader({>{showLogo && (<SvgLogo- aria-label="Modal logo"+ aria-label={t('Modal logo')}width={30}height={30}style={{ justifyContent: 'center', alignSelf: 'center' }}@@ -472,7 +473,7 @@ export function ModalCloseButton({ onPress, style }: ModalCloseButtonProps) {variant="bare"onPress={onPress}style={{ padding: '10px 10px' }}- aria-label="Close"+ aria-label={t('Close')}><SvgDelete width={10} style={style} /></Button>diff --git a/packages/desktop-client/src/components/mobile/MobileBackButton.tsx b/packages/desktop-client/src/components/mobile/MobileBackButton.tsxindex 7e1c5bd638..1338d153d9 100644--- a/packages/desktop-client/src/components/mobile/MobileBackButton.tsx+++ b/packages/desktop-client/src/components/mobile/MobileBackButton.tsx@@ -1,5 +1,7 @@import React, { type ComponentPropsWithoutRef } from 'react';+import { t } from 'i18next';+import { useNavigate } from '../../hooks/useNavigate';import { SvgCheveronLeft } from '../../icons/v1';import { styles } from '../../style';@@ -35,7 +37,7 @@ export function MobileBackButton({marginRight: 5,}}>- Back+ {t('Back')}</Text></Button>);diff --git a/packages/desktop-client/src/components/mobile/accounts/Accounts.jsx b/packages/desktop-client/src/components/mobile/accounts/Accounts.jsxindex 6084b3713d..a386fc5add 100644--- a/packages/desktop-client/src/components/mobile/accounts/Accounts.jsx+++ b/packages/desktop-client/src/components/mobile/accounts/Accounts.jsx@@ -1,6 +1,8 @@import React from 'react';import { useDispatch, useSelector } from 'react-redux';+import { t } from 'i18next';+import { replaceModal, syncAndDownload } from 'loot-core/src/client/actions';import * as queries from 'loot-core/src/client/queries';@@ -137,9 +139,9 @@ function EmptyMessage() {return (<View style={{ flex: 1, padding: 30 }}><Text style={styles.text}>- For Actual to be useful, you need to add an account. You can link an- account to automatically download transactions, or manage it locally- yourself.+ {t(+ 'For Actual to be useful, you need to add an account. You can link an account to automatically download transactions, or manage it locally yourself.',+ )}</Text></View>);@@ -164,11 +166,11 @@ function AccountList({<Pageheader={<MobilePageHeader- title="Accounts"+ title={t('Accounts')}rightContent={<Buttonvariant="bare"- aria-label="Add account"+ aria-label={t('Add account')}style={{ margin: 10 }}onPress={onAddAccount}>diff --git a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsxindex 4709d8e2b9..28ce9be58a 100644--- a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx+++ b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx@@ -3,6 +3,7 @@ import { useDispatch } from 'react-redux';import { css } from '@emotion/css';import { AutoTextSize } from 'auto-text-size';+import { t } from 'i18next';import memoizeOne from 'memoize-one';import { collapseModals, pushModal } from 'loot-core/client/actions';@@ -82,7 +83,7 @@ function ToBudget({ toBudget, onPress, show3Cols }) {<Button variant="bare" onPress={onPress}><View><Label- title={amount < 0 ? 'Overbudgeted' : 'To Budget'}+ title={amount < 0 ? t('Overbudgeted') : t('To Budget')}style={{...(amount < 0 ? styles.smallText : {}),color: theme.formInputText,@@ -165,7 +166,7 @@ function Saved({ projected, onPress, show3Cols }) {</View>) : (<Label- title={isNegative ? 'Overspent' : 'Saved'}+ title={isNegative ? t('Overspent') : t('Saved')}style={{color: theme.formInputText,textAlign: 'left',@@ -287,7 +288,9 @@ function BudgetCell({<CellValuebinding={binding}type="financial"- aria-label={`Budgeted amount for ${category.name} category`}+ aria-label={t('Budgeted amount for {{categoryName}} category', {+ categoryName: category.name,+ })}{...props}>{({ type, name, value }) =>@@ -305,7 +308,9 @@ function BudgetCell({...makeAmountGrey(value),}}onPress={onOpenCategoryBudgetMenu}- aria-label={`Open budget menu for ${category.name} category`}+ aria-label={t('Open budget menu for {{categoryName}} category', {+ categoryName: category.name,+ })}><View><PrivacyFilter>@@ -609,7 +614,9 @@ const ExpenseCategory = memo(function ExpenseCategory({<CellValuebinding={spent}type="financial"- aria-label={`Spent amount for ${category.name} category`}+ aria-label={t('Spent amount for {{categoryName}} category', {+ categoryName: category.name,+ })} // Translated aria-label>{({ type, value }) => (<Button@@ -618,7 +625,10 @@ const ExpenseCategory = memo(function ExpenseCategory({...PILL_STYLE,}}onPress={onShowActivity}- aria-label={`Show transactions for ${category.name} category`}+ aria-label={t(+ 'Show transactions for {{categoryName}} category',+ { categoryName: category.name },+ )} // Translated aria-label><PrivacyFilter><AutoTextSize@@ -649,7 +659,9 @@ const ExpenseCategory = memo(function ExpenseCategory({}}><BalanceWithCarryover- aria-label={`Balance for ${category.name} category`}+ aria-label={t('Balance for {{categoryName}} category', {+ categoryName: category.name,+ })} // Translated aria-labeltype="financial"carryover={carryover}balance={balance}@@ -682,7 +694,10 @@ const ExpenseCategory = memo(function ExpenseCategory({maxWidth: columnWidth,}}onPress={onOpenBalanceMenu}- aria-label={`Open balance menu for ${category.name} category`}+ aria-label={t(+ 'Open balance menu for {{categoryName}} category',+ { categoryName: category.name },+ )} // Translated aria-label><PrivacyFilter><AutoTextSize@@ -1211,7 +1226,9 @@ const IncomeCategory = memo(function IncomeCategory({<CellValuebinding={balance}type="financial"- aria-label={`Balance for ${category.name} category`}+ aria-label={t('Balance for {{categoryName}} category', {+ categoryName: category.name,+ })} // Translated aria-label>{({ type, value }) => (<View>@@ -1410,9 +1427,9 @@ function IncomeGroup({}}>{type === 'report' && (- <Label title="Budgeted" style={{ width: columnWidth }} />+ <Label title={t('Budgeted')} style={{ width: columnWidth }} />)}- <Label title="Received" style={{ width: columnWidth }} />+ <Label title={t('Received')} style={{ width: columnWidth }} /></View><Card style={{ marginTop: 0 }}>@@ -1652,7 +1669,7 @@ export function BudgetTable({variant="bare"style={{ margin: 10 }}onPress={onOpenBudgetPageMenu}- aria-label="Budget page menu"+ aria-label={t('Budget page menu')}><SvgLogostyle={{ color: theme.mobileHeaderText }}@@ -1813,7 +1830,7 @@ function BudgetTableHeader({/>)}<Label- title="Budgeted"+ title={t('Budgeted')}style={{ color: theme.formInputText, paddingRight: 4 }}/></View>@@ -1872,7 +1889,7 @@ function BudgetTableHeader({/>)}<Label- title="Spent"+ title={t('Spent')}style={{ color: theme.formInputText, paddingRight: 4 }}/></View>@@ -1909,7 +1926,10 @@ function BudgetTableHeader({{({ type, value }) => (<View style={{ width: columnWidth }}><View style={{ flex: 1, alignItems: 'flex-end' }}>- <Label title="Balance" style={{ color: theme.formInputText }} />+ <Label+ title={t('Balance')}+ style={{ color: theme.formInputText }}+ /><View><PrivacyFilter><AutoTextSize@@ -1960,7 +1980,7 @@ function MonthSelector({}}><Button- aria-label="Previous month"+ aria-label={t('Previous month')}variant="bare"onPress={() => {if (prevEnabled) {@@ -1989,7 +2009,7 @@ function MonthSelector({</Text></Button><Button- aria-label="Next month"+ aria-label={t('Next month')}variant="bare"onPress={() => {if (nextEnabled) {diff --git a/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx b/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsxindex 7b1ca2a949..814fa6263f 100644--- a/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx+++ b/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx@@ -1,5 +1,7 @@import React from 'react';+import { t } from 'i18next';+import { useNavigate } from '../../../hooks/useNavigate';import { SvgAdd } from '../../../icons/v1';import { Button } from '../../common/Button2';@@ -19,7 +21,7 @@ export function AddTransactionButton({return (<Buttonvariant="bare"- aria-label="Add transaction"+ aria-label={t('Add transaction')}style={{ margin: 10 }}onPress={() => {navigate(to, { state: { accountId, categoryId } });diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsxindex e151d15b0f..e91756aa48 100644--- a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx@@ -16,6 +16,7 @@ import {parseISO,isValid as isValidDate,} from 'date-fns';+import { t } from 'i18next';import { pushModal, setLastTransaction } from 'loot-core/client/actions';import { runQuery } from 'loot-core/src/client/query-helpers';@@ -318,7 +319,7 @@ const ChildTransactionEdit = forwardRef(><View style={{ flexDirection: 'row' }}><View style={{ flexBasis: '75%' }}>- <FieldLabel title="Payee" />+ <FieldLabel title={t('Payee')} /><TapFielddisabled={editingField &&@@ -334,7 +335,7 @@ const ChildTransactionEdit = forwardRef(flexBasis: '25%',}}>- <FieldLabel title="Amount" style={{ padding: 0 }} />+ <FieldLabel title={t('Amount')} style={{ padding: 0 }} /><AmountInputdisabled={editingField &&@@ -366,7 +367,7 @@ const ChildTransactionEdit = forwardRef(</View><View>- <FieldLabel title="Category" />+ <FieldLabel title={t('Category')} /><TapFieldtextStyle={{...((isOffBudget || isBudgetTransfer(transaction)) && {@@ -388,7 +389,7 @@ const ChildTransactionEdit = forwardRef(</View><View>- <FieldLabel title="Notes" />+ <FieldLabel title={t('Notes')} /><InputFielddisabled={editingField &&@@ -428,7 +429,7 @@ const ChildTransactionEdit = forwardRef(userSelect: 'none',}}>- Delete split+ {t('Delete split')}</Text></Button></View>@@ -806,7 +807,7 @@ const TransactionEditInner = memo(function TransactionEditInner({alignItems: 'center',}}>- <FieldLabel title="Amount" flush style={{ marginBottom: 0 }} />+ <FieldLabel title={t('Amount')} flush style={{ marginBottom: 0 }} /><FocusableAmountInputvalue={transaction.amount}zeroSign="-"@@ -825,7 +826,7 @@ const TransactionEditInner = memo(function TransactionEditInner({</View><View>- <FieldLabel title="Payee" />+ <FieldLabel title={t('Payee')} /><TapFieldtextStyle={{...(transaction.is_parent && {@@ -845,7 +846,7 @@ const TransactionEditInner = memo(function TransactionEditInner({{!transaction.is_parent && (<View>- <FieldLabel title="Category" />+ <FieldLabel title={t('Category')} /><TapFieldstyle={{...((isOffBudget || isBudgetTransfer(transaction)) && {@@ -916,14 +917,14 @@ const TransactionEditInner = memo(function TransactionEditInner({color: theme.formLabelText,}}>- Split+ {t('Split')}</Text></Button></View>)}<View>- <FieldLabel title="Account" />+ <FieldLabel title={t('Account')} /><TapFielddisabled={editingField &&@@ -937,7 +938,7 @@ const TransactionEditInner = memo(function TransactionEditInner({<View style={{ flexDirection: 'row' }}><View style={{ flex: 1 }}>- <FieldLabel title="Date" />+ <FieldLabel title={t('Date')} /><InputFieldtype="date"disabled={@@ -961,12 +962,12 @@ const TransactionEditInner = memo(function TransactionEditInner({</View>{transaction.reconciled ? (<View style={{ alignItems: 'center' }}>- <FieldLabel title="Reconciled" />+ <FieldLabel title={t('Reconciled')} /><Toggle id="Reconciled" isOn isDisabled /></View>) : (<View style={{ alignItems: 'center' }}>- <FieldLabel title="Cleared" />+ <FieldLabel title={t('Cleared')} /><ToggleFieldid="cleared"isOn={transaction.cleared}@@ -977,7 +978,7 @@ const TransactionEditInner = memo(function TransactionEditInner({</View><View>- <FieldLabel title="Notes" />+ <FieldLabel title={t('Notes')} /><InputFielddisabled={editingField &&@@ -1017,7 +1018,7 @@ const TransactionEditInner = memo(function TransactionEditInner({userSelect: 'none',}}>- Delete transaction+ {t('Delete transaction')}</Text></Button></View>diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionList.jsx b/packages/desktop-client/src/components/mobile/transactions/TransactionList.jsxindex 195fa4cb32..63bf6cf0b4 100644--- a/packages/desktop-client/src/components/mobile/transactions/TransactionList.jsx+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionList.jsx@@ -8,6 +8,8 @@ import React, {import { useDispatch } from 'react-redux';import { Item, Section } from 'react-stately';+import { t } from 'i18next';+import { setNotificationInset } from 'loot-core/client/actions';import { groupById, integerToCurrency } from 'loot-core/shared/util';import * as monthUtils from 'loot-core/src/shared/months';@@ -91,7 +93,7 @@ export function TransactionList({if (isLoading) {return (<View- aria-label="Loading..."+ aria-label={t('Loading...')}style={{flex: 1,justifyContent: 'center',diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.jsx b/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.jsxindex 4a03b2c8fe..3880fd0685 100644--- a/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.jsx+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.jsx@@ -1,6 +1,8 @@import React, { useState } from 'react';import { useSelector } from 'react-redux';+import { t } from 'i18next';+import { SelectedProvider, useSelected } from '../../../hooks/useSelected';import { SvgSearchAlternate } from '../../../icons/v2';import { styles, theme } from '../../../style';@@ -129,7 +131,10 @@ function BalanceWithCleared({ balanceUncleared, balanceCleared, balance }) {flexBasis: '33%',}}>- <Label title="Cleared" style={{ textAlign: 'center', fontSize: 12 }} />+ <Label+ title={t('Cleared')}+ style={{ textAlign: 'center', fontSize: 12 }}+ /><CellValue binding={balanceCleared} type="financial">{props => (<CellValueText@@ -152,7 +157,7 @@ function BalanceWithCleared({ balanceUncleared, balanceCleared, balance }) {}}><Label- title="Uncleared"+ title={t('Uncleared')}style={{ textAlign: 'center', fontSize: 12 }}/><CellValue binding={balanceUncleared} type="financial">@@ -176,7 +181,7 @@ function BalanceWithCleared({ balanceUncleared, balanceCleared, balance }) {function Balance({ balance }) {return (<View style={{ flexBasis: '33%' }}>- <Label title="Balance" style={{ textAlign: 'center' }} />+ <Label title={t('Balance')} style={{ textAlign: 'center' }} /><CellValue binding={balance} type="financial">{props => (<CellValueTextdiff --git a/packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx b/packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsxindex 971aee302c..6e3b317023 100644--- a/packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx+++ b/packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx@@ -1,4 +1,5 @@import React, { type ComponentPropsWithoutRef } from 'react';+import { useTranslation } from 'react-i18next';import { theme } from '../../style';import { AccountAutocomplete } from '../autocomplete/AccountAutocomplete';@@ -21,6 +22,7 @@ export function AccountAutocompleteModal({autocompleteProps,onClose,}: AccountAutocompleteModalProps) {+ const { t } = useTranslation();const { isNarrowWidth } = useResponsive();const defaultAutocompleteProps = {containerProps: { style: { height: isNarrowWidth ? '90vh' : 275 } },@@ -44,7 +46,7 @@ export function AccountAutocompleteModal({<ModalHeadertitle={<ModalTitle- title="Account"+ title={t('Account')}getStyle={() => ({ color: theme.menuAutoCompleteText })}/>}@@ -59,7 +61,7 @@ export function AccountAutocompleteModal({<View>{!isNarrowWidth && (<SectionLabel- title="Account"+ title={t('Account')}style={{alignSelf: 'center',color: theme.menuAutoCompleteText,diff --git a/packages/desktop-client/src/components/modals/AccountMenuModal.tsx b/packages/desktop-client/src/components/modals/AccountMenuModal.tsxindex b64d9637ae..a7553c384c 100644--- a/packages/desktop-client/src/components/modals/AccountMenuModal.tsx+++ b/packages/desktop-client/src/components/modals/AccountMenuModal.tsx@@ -184,7 +184,7 @@ export function AccountMenuModal({height={20}style={{ paddingRight: 5 }}/>- Edit notes+ {t('Edit notes')}</Button></View></View>diff --git a/packages/desktop-client/src/components/modals/BudgetListModal.tsx b/packages/desktop-client/src/components/modals/BudgetListModal.tsxindex c2c8d4d2a1..d7e26cfb93 100644--- a/packages/desktop-client/src/components/modals/BudgetListModal.tsx+++ b/packages/desktop-client/src/components/modals/BudgetListModal.tsx@@ -1,6 +1,8 @@import React from 'react';import { useSelector } from 'react-redux';+import { t } from 'i18next';+import { useMetadataPref } from '../../hooks/useMetadataPref';import { Modal, ModalHeader, ModalCloseButton } from '../common/Modal';import { Text } from '../common/Text';@@ -18,7 +20,7 @@ export function BudgetListModal() {{({ state: { close } }) => (<><ModalHeader- title="Switch Budget File"+ title={t('Switch Budget File')}rightContent={<ModalCloseButton onPress={close} />}/><View@@ -29,7 +31,7 @@ export function BudgetListModal() {}}><Text style={{ fontSize: 17, fontWeight: 400 }}>- Switching from:+ {t('Switching from:')}</Text><Text style={{ fontSize: 17, fontWeight: 700 }}>{currentFile?.name}diff --git a/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx b/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsxindex 45d997cde1..18ff718f71 100644--- a/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx+++ b/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx@@ -1,5 +1,7 @@import React, { type ComponentPropsWithoutRef } from 'react';+import { t } from 'i18next';+import * as monthUtils from 'loot-core/src/shared/months';import { theme } from '../../style';@@ -50,7 +52,7 @@ export function CategoryAutocompleteModal({<ModalHeadertitle={<ModalTitle- title="Category"+ title={t('Category')}getStyle={() => ({ color: theme.menuAutoCompleteText })}/>}@@ -65,7 +67,7 @@ export function CategoryAutocompleteModal({<View>{!isNarrowWidth && (<SectionLabel- title="Category"+ title={t('Category')}style={{alignSelf: 'center',color: theme.menuAutoCompleteText,diff --git a/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx b/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsxindex 2b64dbe1c7..edd835f27a 100644--- a/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx+++ b/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx@@ -6,6 +6,8 @@ import React, {type CSSProperties,} from 'react';+import { t } from 'i18next';+import { type CategoryGroupEntity } from 'loot-core/src/types/models';import { useCategories } from '../../hooks/useCategories';@@ -151,7 +153,7 @@ export function CategoryGroupMenuModal({><Button style={buttonStyle} onPress={_onAddCategory}><SvgAdd width={17} height={17} style={{ paddingRight: 5 }} />- Add category+ {t('Add category')}</Button><Button style={buttonStyle} onPress={_onEditNotes}><SvgNotesPaper@@ -159,7 +161,7 @@ export function CategoryGroupMenuModal({height={20}style={{ paddingRight: 5 }}/>- Edit notes+ {t('Edit notes')}</Button></View></View>@@ -188,7 +190,7 @@ function AdditionalCategoryGroupMenu({ group, onDelete, onToggleVisibility }) {<Buttonref={triggerRef}variant="bare"- aria-label="Menu"+ aria-label={t('Menu')}onPress={() => {setMenuOpen(true);}}diff --git a/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx b/packages/desktop-client/src/components/modals/CategoryMenuModal.tsxindex 10955013da..765a5caf06 100644--- a/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx+++ b/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx@@ -1,6 +1,8 @@// @ts-strict-ignoreimport React, { useRef, useState, type CSSProperties } from 'react';+import { t } from 'i18next';+import { type CategoryEntity } from 'loot-core/src/types/models';import { useCategory } from '../../hooks/useCategory';@@ -140,7 +142,7 @@ export function CategoryMenuModal({height={20}style={{ paddingRight: 5 }}/>- Edit notes+ {t('Edit notes')}</Button></View></View>@@ -173,7 +175,7 @@ function AdditionalCategoryMenu({<Buttonref={triggerRef}variant="bare"- aria-label="Menu"+ aria-label={t('Menu')}onPress={() => {setMenuOpen(true);}}diff --git a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx b/packages/desktop-client/src/components/modals/CloseAccountModal.tsxindex 22412ed3c4..d947b81c9c 100644--- a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx+++ b/packages/desktop-client/src/components/modals/CloseAccountModal.tsx@@ -1,6 +1,7 @@// @ts-strict-ignoreimport React, { type FormEvent, useState, type CSSProperties } from 'react';import { Form } from 'react-aria-components';+import { useTranslation } from 'react-i18next'; // Import useTranslationimport { useDispatch } from 'react-redux';import {@@ -49,6 +50,7 @@ export function CloseAccountModal({balance,canDelete,}: CloseAccountModalProps) {+ const { t } = useTranslation(); // Initialize translation hookconst accounts = useAccounts().filter(a => a.closed === 0);const { grouped: categoryGroups, list: categories } = useCategories();const [loading, setLoading] = useState(false);@@ -112,12 +114,13 @@ export function CloseAccountModal({{({ state: { close } }) => (<><ModalHeader- title="Close Account"+ title={t('Close Account')}rightContent={<ModalCloseButton onPress={close} />}/><View><Paragraph>- Are you sure you want to close <strong>{account.name}</strong>?{' '}+ {t('Are you sure you want to close ')}+ <strong>{account.name}</strong>?{' '}{canDelete ? (<span>This account has no transactions so it will be permanently@@ -150,7 +153,7 @@ export function CloseAccountModal({includeClosedAccounts={false}value={transferAccountId}inputProps={{- placeholder: 'Select account...',+ placeholder: t('Select account...'),autoFocus: true,...(isNarrowWidth && {value: transferAccount?.name || '',@@ -173,7 +176,7 @@ export function CloseAccountModal({{transferError && (<FormError style={{ marginBottom: 15 }}>- Transfer is required+ {t('Transfer is required')}</FormError>)}@@ -189,7 +192,7 @@ export function CloseAccountModal({categoryGroups={categoryGroups}value={categoryId}inputProps={{- placeholder: 'Select category...',+ placeholder: t('Select category...'),...(isNarrowWidth && {value: category?.name || '',style: {@@ -210,7 +213,7 @@ export function CloseAccountModal({/>{categoryError && (- <FormError>Category is required</FormError>+ <FormError>{t('Category is required')}</FormError>)}</View>)}@@ -220,7 +223,7 @@ export function CloseAccountModal({{!canDelete && (<View style={{ marginBottom: 15 }}><Text style={{ fontSize: 12 }}>- You can also{' '}+ {t('You can also')}{' '}<Linkvariant="text"onClick={() => {@@ -231,7 +234,7 @@ export function CloseAccountModal({}}style={{ color: theme.errorText }}>- force close+ {t('force close')}</Link>{' '}the account which will delete it and all its transactionspermanently. Doing so may change your budget unexpectedly@@ -253,7 +256,7 @@ export function CloseAccountModal({}}onPress={close}>- Cancel+ {t('Cancel')}</Button><Buttontype="submit"@@ -262,7 +265,7 @@ export function CloseAccountModal({height: isNarrowWidth ? styles.mobileMinHeight : undefined,}}>- Close Account+ {t('Close Account')}</Button></View></Form>diff --git a/packages/desktop-client/src/components/modals/ConfirmCategoryDeleteModal.tsx b/packages/desktop-client/src/components/modals/ConfirmCategoryDeleteModal.tsxindex 21a0a6f25b..ddb4cffa0a 100644--- a/packages/desktop-client/src/components/modals/ConfirmCategoryDeleteModal.tsx+++ b/packages/desktop-client/src/components/modals/ConfirmCategoryDeleteModal.tsx@@ -1,5 +1,6 @@// @ts-strict-ignoreimport React, { useState } from 'react';+import { useTranslation } from 'react-i18next'; // Import useTranslationimport { useCategories } from '../../hooks/useCategories';import { theme } from '../../style';@@ -21,6 +22,7 @@ export function ConfirmCategoryDeleteModal({category: categoryId,onDelete,}: ConfirmCategoryDeleteProps) {+ const { t } = useTranslation(); // Initialize translation hookconst [transferCategory, setTransferCategory] = useState<string | null>(null);const [error, setError] = useState<string | null>(null);const { grouped: categoryGroups, list: categories } = useCategories();@@ -60,7 +62,7 @@ export function ConfirmCategoryDeleteModal({{({ state: { close } }) => (<><ModalHeader- title="Confirm Delete"+ title={t('Confirm Delete')} // Use translation for titlerightContent={<ModalCloseButton onPress={close} />}/><View style={{ lineHeight: 1.5 }}>@@ -76,8 +78,7 @@ export function ConfirmCategoryDeleteModal({</Block>) : (<Block>- <strong>{category.name}</strong> is used by existing- transactions+ <strong>{category.name}</strong>is used by existing transactions{!isIncome &&' or it has a positive leftover balance currently'}. <strong>Are you sure you want to delete it?</strong> If so,@@ -96,7 +97,7 @@ export function ConfirmCategoryDeleteModal({alignItems: 'center',}}>- <Text>Transfer to:</Text>+ <Text>{t('Transfer to:')}</Text><View style={{ flex: 1, marginLeft: 10, marginRight: 30 }}><CategoryAutocomplete@@ -117,7 +118,7 @@ export function ConfirmCategoryDeleteModal({value={transferCategory}focused={true}inputProps={{- placeholder: 'Select category...',+ placeholder: t('Select category...'),}}onSelect={category => setTransferCategory(category)}showHiddenCategories={true}@@ -135,7 +136,7 @@ export function ConfirmCategoryDeleteModal({}}}>- Delete+ {t('Delete')}</Button></View></View>diff --git a/packages/desktop-client/src/components/modals/ConfirmTransactionDeleteModal.tsx b/packages/desktop-client/src/components/modals/ConfirmTransactionDeleteModal.tsxindex 6f1bf2ffda..5b5315df73 100644--- a/packages/desktop-client/src/components/modals/ConfirmTransactionDeleteModal.tsx+++ b/packages/desktop-client/src/components/modals/ConfirmTransactionDeleteModal.tsx@@ -1,4 +1,5 @@import React from 'react';+import { useTranslation } from 'react-i18next';import { styles } from '../../style';import { Button } from '../common/Button2';@@ -17,6 +18,7 @@ export function ConfirmTransactionDeleteModal({message = 'Are you sure you want to delete the transaction?',onConfirm,}: ConfirmTransactionDeleteProps) {+ const { t } = useTranslation();const { isNarrowWidth } = useResponsive();const narrowButtonStyle = isNarrowWidth? {@@ -29,7 +31,7 @@ export function ConfirmTransactionDeleteModal({{({ state: { close } }) => (<><ModalHeader- title="Confirm Delete"+ title={t('Confirm Delete')}rightContent={<ModalCloseButton onPress={close} />}/><View style={{ lineHeight: 1.5 }}>@@ -47,7 +49,7 @@ export function ConfirmTransactionDeleteModal({}}onPress={close}>- Cancel+ {t('Cancel')}</Button><InitialFocus><Button@@ -58,7 +60,7 @@ export function ConfirmTransactionDeleteModal({close();}}>- Delete+ {t('Delete')}</Button></InitialFocus></View>diff --git a/packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx b/packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsxindex dd642b8b32..2177502e88 100644--- a/packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx+++ b/packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx@@ -1,5 +1,6 @@// @ts-strict-ignoreimport React from 'react';+import { useTranslation } from 'react-i18next'; // Import useTranslationimport { Block } from '../common/Block';import { Button } from '../common/Button2';@@ -18,6 +19,8 @@ export function ConfirmTransactionEditModal({onConfirm,confirmReason,}: ConfirmTransactionEditProps) {+ const { t } = useTranslation(); // Initialize translation hook+return (<Modalname="confirm-transaction-edit"@@ -26,43 +29,50 @@ export function ConfirmTransactionEditModal({{({ state: { close } }) => (<><ModalHeader- title="Reconciled Transaction"+ title={t('Reconciled Transaction')} // Use translation for titlerightContent={<ModalCloseButton onPress={close} />}/><View style={{ lineHeight: 1.5 }}>{confirmReason === 'batchDeleteWithReconciled' ? (<Block>- Deleting reconciled transactions may bring your reconciliation- out of balance.+ {t(+ 'Deleting reconciled transactions may bring your reconciliation out of balance.',+ )}</Block>) : confirmReason === 'batchEditWithReconciled' ? (<Block>- Editing reconciled transactions may bring your reconciliation- out of balance.+ {t(+ 'Editing reconciled transactions may bring your reconciliation out of balance.',+ )}</Block>) : confirmReason === 'batchDuplicateWithReconciled' ? (<Block>- Duplicating reconciled transactions may bring your- reconciliation out of balance.+ {t(+ 'Duplicating reconciled transactions may bring your reconciliation out of balance.',+ )}</Block>) : confirmReason === 'editReconciled' ? (<Block>- Saving your changes to this reconciled transaction may bring- your reconciliation out of balance.+ {t(+ 'Saving your changes to this reconciled transaction may bring your reconciliation out of balance.',+ )}</Block>) : confirmReason === 'unlockReconciled' ? (<Block>- Unlocking this transaction means you won‘t be warned about- changes that can impact your reconciled balance. (Changes to- amount, account, payee, etc).+ {t(+ 'Unlocking this transaction means you won‘t be warned about changes that can impact your reconciled balance. (Changes to amount, account, payee, etc).',+ )}</Block>) : confirmReason === 'deleteReconciled' ? (<Block>- Deleting this reconciled transaction may bring your- reconciliation out of balance.+ {t(+ 'Deleting this reconciled transaction may bring your reconciliation out of balance.',+ )}</Block>) : (- <Block>Are you sure you want to edit this transaction?</Block>+ <Block>+ {t('Are you sure you want to edit this transaction?')}+ </Block>)}<View@@ -80,25 +90,25 @@ export function ConfirmTransactionEditModal({}}><Button- aria-label="Cancel"+ aria-label={t('Cancel')} // Use translation for aria-labelstyle={{ marginRight: 10 }}onPress={() => {close();onCancel();}}>- Cancel+ {t('Cancel')} {/* Use translation for Cancel */}</Button><InitialFocus><Button- aria-label="Confirm"+ aria-label={t('Confirm')} // Use translation for aria-labelvariant="primary"onPress={() => {close();onConfirm();}}>- Confirm+ {t('Confirm')} {/* Use translation for Confirm */}</Button></InitialFocus></View>diff --git a/packages/desktop-client/src/components/modals/ConfirmUnlinkAccountModal.tsx b/packages/desktop-client/src/components/modals/ConfirmUnlinkAccountModal.tsxindex e83d91cb23..d77fee203b 100644--- a/packages/desktop-client/src/components/modals/ConfirmUnlinkAccountModal.tsx+++ b/packages/desktop-client/src/components/modals/ConfirmUnlinkAccountModal.tsx@@ -1,4 +1,5 @@import React from 'react';+import { useTranslation } from 'react-i18next';import { Button } from '../common/Button2';import { InitialFocus } from '../common/InitialFocus';@@ -15,6 +16,8 @@ export function ConfirmUnlinkAccountModal({accountName,onUnlink,}: ConfirmUnlinkAccountProps) {+ const { t } = useTranslation();+return (<Modalname="confirm-unlink-account"@@ -23,7 +26,7 @@ export function ConfirmUnlinkAccountModal({{({ state: { close } }) => (<><ModalHeader- title="Confirm Unlink"+ title={t('Confirm Unlink')} // Use translation for titlerightContent={<ModalCloseButton onPress={close} />}/><View style={{ lineHeight: 1.5 }}>@@ -32,8 +35,9 @@ export function ConfirmUnlinkAccountModal({</Paragraph><Paragraph>- Transactions will no longer be synchronized with this account and- must be manually entered.+ {t(+ 'Transactions will no longer be synchronized with this account and must be manually entered.',+ )}</Paragraph><View@@ -43,7 +47,7 @@ export function ConfirmUnlinkAccountModal({}}><Button style={{ marginRight: 10 }} onPress={close}>- Cancel+ {t('Cancel')}</Button><InitialFocus><Button@@ -53,7 +57,7 @@ export function ConfirmUnlinkAccountModal({close();}}>- Unlink+ {t('Unlink')}</Button></InitialFocus></View>diff --git a/packages/desktop-client/src/components/modals/CreateAccountModal.tsx b/packages/desktop-client/src/components/modals/CreateAccountModal.tsxindex 70c808d34a..8f62089c91 100644--- a/packages/desktop-client/src/components/modals/CreateAccountModal.tsx+++ b/packages/desktop-client/src/components/modals/CreateAccountModal.tsx@@ -1,5 +1,6 @@// @ts-strict-ignoreimport React, { useEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';import { useDispatch } from 'react-redux';import { pushModal } from 'loot-core/client/actions';@@ -26,6 +27,7 @@ type CreateAccountProps = {};export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {+ const { t } = useTranslation();const syncServerStatus = useSyncServerStatus();const dispatch = useDispatch();const [isGoCardlessSetupComplete, setIsGoCardlessSetupComplete] =@@ -171,12 +173,12 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {setIsSimpleFinSetupComplete(configuredSimpleFin);}, [configuredSimpleFin]);- let title = 'Add Account';+ let title = t('Add Account');const [loadingSimpleFinAccounts, setLoadingSimpleFinAccounts] =useState(false);if (upgradingAccountId != null) {- title = 'Link Account';+ title = t('Link Account');}return (@@ -200,19 +202,21 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {}}onPress={onCreateLocalAccount}>- Create local account+ {t('Create local account')}</Button></InitialFocus><View style={{ lineHeight: '1.4em', fontSize: 15 }}><Text>- <strong>Create a local account</strong> if you want to add- transactions manually. You can also{' '}+ <strong>{t('Create a local account')}</strong>+ {t(+ 'if you want to add transactions manually. You can also',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/transactions/importing"linkColor="muted">- import QIF/OFX/QFX files into a local account+ {t('import QIF/OFX/QFX files into a local account')}</Link>.</Text>@@ -240,8 +244,8 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {onPress={onConnectGoCardless}>{isGoCardlessSetupComplete- ? 'Link bank account with GoCardless'- : 'Set up GoCardless for bank sync'}+ ? t('Link bank account with GoCardless')+ : t('Set up GoCardless for bank sync')}</ButtonWithLoading>{isGoCardlessSetupComplete && (<>@@ -272,7 +276,7 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {items={[{name: 'reconfigure',- text: 'Reset GoCardless credentials',+ text: t('Reset GoCardless credentials'),},]}/>@@ -282,10 +286,11 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {</View><Text style={{ lineHeight: '1.4em', fontSize: 15 }}><strong>- Link a <em>European</em> bank account+ {t('Link a')} <em>{t('European')}</em> {t('bank account')}</strong>{' '}- to automatically download transactions. GoCardless provides- reliable, up-to-date information from hundreds of banks.+ {t(+ 'to automatically download transactions. GoCardless provides reliable, up-to-date information from hundreds of banks.',+ )}</Text><View@@ -308,8 +313,8 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {onPress={onConnectSimpleFin}>{isSimpleFinSetupComplete- ? 'Link bank account with SimpleFIN'- : 'Set up SimpleFIN for bank sync'}+ ? t('Link bank account with SimpleFIN')+ : t('Set up SimpleFIN for bank sync')}</ButtonWithLoading>{isSimpleFinSetupComplete && (<>@@ -339,7 +344,7 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {items={[{name: 'reconfigure',- text: 'Reset SimpleFIN credentials',+ text: t('Reset SimpleFIN credentials'),},]}/>@@ -349,10 +354,12 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {</View><Text style={{ lineHeight: '1.4em', fontSize: 15 }}><strong>- Link a <em>North American</em> bank account+ {t('Link a')} <em>{t('North American')}</em>+ {t(' bank account')}</strong>{' '}- to automatically download transactions. SimpleFIN provides- reliable, up-to-date information from hundreds of banks.+ {t(+ 'to automatically download transactions. SimpleFIN provides reliable, up-to-date information from hundreds of banks.',+ )}{' '}</Text></>) : (@@ -365,16 +372,16 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {fontWeight: 600,}}>- Set up bank sync+ {t('Set up bank sync')}</Button><Paragraph style={{ fontSize: 15 }}>- Connect to an Actual server to set up{' '}+ {t('Connect to an Actual server to set up')}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/advanced/bank-sync"linkColor="muted">- automatic syncing+ {t('automatic syncing')}</Link>.</Paragraph>diff --git a/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx b/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsxindex d2695c0398..536b114543 100644--- a/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx+++ b/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx@@ -4,6 +4,7 @@ import { Form } from 'react-aria-components';import { useDispatch } from 'react-redux';import { css } from '@emotion/css';+import { t } from 'i18next';import { loadAllFiles, loadGlobalPrefs, sync } from 'loot-core/client/actions';import { send } from 'loot-core/src/platform/client/fetch';@@ -69,7 +70,9 @@ export function CreateEncryptionKeyModal({{({ state: { close } }) => (<><ModalHeader- title={isRecreating ? 'Generate new key' : 'Enable encryption'}+ title={+ isRecreating ? t('Generate new key') : t('Enable encryption')+ }rightContent={<ModalCloseButton onPress={close} />}/><View@@ -93,7 +96,7 @@ export function CreateEncryptionKeyModal({to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- Learn more+ {t('Learn more')}</Link></Paragraph><Paragraph>@@ -110,18 +113,19 @@ export function CreateEncryptionKeyModal({decrypted without the password.</li><li>- This key only applies to this file. You will need to- generate a new key for each file you want to encrypt.+ {t(+ 'This key only applies to this file. You will need to generate a new key for each file you want to encrypt.',+ )}</li><li>- If you’ve already downloaded your data on other devices,- you will need to reset them. Actual will automatically- take you through this process.+ {t(+ 'If you’ve already downloaded your data on other devices, you will need to reset them. Actual will automatically take you through this process.',+ )}</li><li>- It is recommended for the encryption password to be- different than the log-in password in order to better- protect your data.+ {t(+ 'It is recommended for the encryption password to be different than the log-in password in order to better protect your data.',+ )}</li></ul></Paragraph>@@ -129,22 +133,23 @@ export function CreateEncryptionKeyModal({) : (<><Paragraph style={{ marginTop: 5 }}>- This will generate a new key for encrypting your data.{' '}- <strong>This requires a sync reset</strong> and all other- devices will have to revert to this version of your data.- Actual will take you through that process on those devices.{' '}+ {t('This will generate a new key for encrypting your data.')}{' '}+ <strong>{t('This requires a sync reset')}</strong>+ {t(+ ' and all other devices will have to revert to this version of your data. Actual will take you through that process on those devices.',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- Learn more+ {t('Learn more')}</Link></Paragraph><Paragraph>- Key generation is randomized. The same password will create- different keys, so this will change your key regardless of the- password being different.+ {t(+ 'Key generation is randomized. The same password will create different keys, so this will change your key regardless of the password being different.',+ )}</Paragraph></>)}@@ -156,7 +161,9 @@ export function CreateEncryptionKeyModal({}}><View style={{ alignItems: 'center' }}>- <Text style={{ fontWeight: 600, marginBottom: 3 }}>Password</Text>+ <Text style={{ fontWeight: 600, marginBottom: 3 }}>+ {t('Password')}+ </Text>{error && (<View@@ -187,7 +194,7 @@ export function CreateEncryptionKeyModal({type="checkbox"onClick={() => setShowPassword(!showPassword)}/>{' '}- Show password+ {t('Show password')}</label></Text></View>@@ -201,7 +208,7 @@ export function CreateEncryptionKeyModal({isLoading={loading}variant="primary">- Enable+ {t('Enable')}</ButtonWithLoading></ModalButtons></Form>diff --git a/packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx b/packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsxindex 9b93c54a37..594d3d1120 100644--- a/packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx+++ b/packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx@@ -3,6 +3,8 @@ import { type FormEvent, useState } from 'react';import { Form } from 'react-aria-components';import { useDispatch } from 'react-redux';+import { t } from 'i18next';+import { closeModal, createAccount } from 'loot-core/client/actions';import { toRelaxedNumber } from 'loot-core/src/shared/util';@@ -71,7 +73,9 @@ export function CreateLocalAccountModal() {{({ state: { close } }) => (<><ModalHeader- title={<ModalTitle title="Create Local Account" shrinkOnOverflow />}+ title={+ <ModalTitle title={t('Create Local Account')} shrinkOnOverflow />+ }rightContent={<ModalCloseButton onPress={close} />}/><View>@@ -123,7 +127,7 @@ export function CreateLocalAccountModal() {verticalAlign: 'center',}}>- Off-budget+ {t('Off-budget')}</label></View><div@@ -135,16 +139,16 @@ export function CreateLocalAccountModal() {}}><Text>- This cannot be changed later. <br /> {'\n'}- See{' '}+ {t('This cannot be changed later.')} <br /> {'\n'}+ {t('See')}{' '}<Linkvariant="external"linkColor="muted"to="https://actualbudget.org/docs/accounts/#off-budget-accounts">- Accounts Overview+ {t('Accounts Overview')}</Link>{' '}- for more information.+ {t('for more information.')}</Text></div></View>@@ -168,18 +172,18 @@ export function CreateLocalAccountModal() {</InlineField>{balanceError && (<FormError style={{ marginLeft: 75 }}>- Balance must be a number+ {t('Balance must be a number')}</FormError>)}<ModalButtons>- <Button onPress={close}>Back</Button>+ <Button onPress={close}>{t('Back')}</Button><Buttontype="submit"variant="primary"style={{ marginLeft: 10 }}>- Create+ {t('Create')}</Button></ModalButtons></Form>diff --git a/packages/desktop-client/src/components/modals/EditFieldModal.jsx b/packages/desktop-client/src/components/modals/EditFieldModal.jsxindex 449af0253f..017a6443c8 100644--- a/packages/desktop-client/src/components/modals/EditFieldModal.jsx+++ b/packages/desktop-client/src/components/modals/EditFieldModal.jsx@@ -1,6 +1,7 @@import React, { useState } from 'react';import { parseISO, format as formatDate, parse as parseDate } from 'date-fns';+import { t } from 'i18next';import { currentDay, dayFromDate } from 'loot-core/src/shared/months';import { amountToInteger } from 'loot-core/src/shared/util';@@ -54,7 +55,7 @@ export function EditFieldModal({ name, onSubmit, onClose }) {switch (name) {case 'date':const today = currentDay();- label = 'Date';+ label = t('Date');minWidth = 350;editor = ({ close }) => (<DateSelect@@ -72,7 +73,7 @@ export function EditFieldModal({ name, onSubmit, onClose }) {break;case 'notes':- label = 'Notes';+ label = t('Notes');editor = ({ close }) => (<><View@@ -116,7 +117,7 @@ export function EditFieldModal({ name, onSubmit, onClose }) {document.getElementById('noteInput').focus();}}>- Prepend+ {t('Prepend')}</Button><Buttonselected={noteAmend === 'replace'}@@ -148,7 +149,7 @@ export function EditFieldModal({ name, onSubmit, onClose }) {document.getElementById('noteInput').focus();}}>- Replace+ {t('Replace')}</Button><Buttonselected={noteAmend === 'append'}@@ -180,7 +181,7 @@ export function EditFieldModal({ name, onSubmit, onClose }) {document.getElementById('noteInput').focus();}}>- Append+ {t('Append')}</Button></View><Input@@ -198,7 +199,7 @@ export function EditFieldModal({ name, onSubmit, onClose }) {break;case 'amount':- label = 'Amount';+ label = t('Amount');editor = ({ close }) => (<Inputfocused={true}diff --git a/packages/desktop-client/src/components/modals/EditRuleModal.jsx b/packages/desktop-client/src/components/modals/EditRuleModal.jsxindex abd673d130..947926aff2 100644--- a/packages/desktop-client/src/components/modals/EditRuleModal.jsx+++ b/packages/desktop-client/src/components/modals/EditRuleModal.jsx@@ -8,6 +8,7 @@ import React, {import { useDispatch } from 'react-redux';import { css } from '@emotion/css';+import { t } from 'i18next';import { v4 as uuid } from 'uuid';import {@@ -334,7 +335,7 @@ function ScheduleDescription({ id }) {textOverflow: 'ellipsis',}}>- Payee:{' '}+ {t('Payee')}:{' '}<DisplayIdtype="payees"id={schedule._payee}@@ -343,11 +344,11 @@ function ScheduleDescription({ id }) {</Text><Text style={{ margin: '0 5px' }}> — </Text><Text style={{ flexShrink: 0 }}>- Amount: {formatAmount(schedule._amount)}+ {t('Amount')}: {formatAmount(schedule._amount)}</Text><Text style={{ margin: '0 5px' }}> — </Text><Text style={{ flexShrink: 0 }}>- Next: {monthUtils.format(schedule.next_date, dateFormat)}+ {t('Next')}: {monthUtils.format(schedule.next_date, dateFormat)}</Text></View><StatusBadge status={status} />@@ -427,7 +428,7 @@ function ActionEditor({ action, editorStyle, onChange, onDelete, onAdd }) {padding: 5,}}aria-label={- templated ? 'Disable templating' : 'Enable templating'+ templated ? t('Disable templating') : t('Enable templating')}onPress={() => onChange('template', !templated)}>@@ -446,7 +447,7 @@ function ActionEditor({ action, editorStyle, onChange, onDelete, onAdd }) {) : op === 'set-split-amount' ? (<><View style={{ padding: '5px 10px', lineHeight: '1em' }}>- allocate+ {t('allocate')}</View><SplitAmountMethodSelect@@ -1017,7 +1018,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {{({ state: { close } }) => (<><ModalHeader- title="Rule"+ title={t('Rule')}rightContent={<ModalCloseButton onPress={close} />}/><View@@ -1040,26 +1041,26 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {padding: '0 20px',}}>- <Text style={{ marginRight: 15 }}>Stage of rule:</Text>+ <Text style={{ marginRight: 15 }}>{t('Stage of rule:')}</Text><Stack direction="row" align="center" spacing={1}><StageButtonselected={stage === 'pre'}onSelect={() => onChangeStage('pre')}>- Pre+ {t('Pre')}</StageButton><StageButtonselected={stage === null}onSelect={() => onChangeStage(null)}>- Default+ {t('Default')}</StageButton><StageButtonselected={stage === 'post'}onSelect={() => onChangeStage('post')}>- Post+ {t('Post')}</StageButton><StageInfo />@@ -1078,7 +1079,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {<View style={{ flexShrink: 0 }}><View style={{ marginBottom: 30 }}><Text style={{ marginBottom: 15 }}>- If+ {t('If')}<FieldSelectdata-testid="conditions-op"style={{ display: 'inline-flex' }}@@ -1089,7 +1090,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {value={conditionsOp}onChange={onChangeConditionsOp}/>- of these conditions match:+ {t('of these conditions match:')}</Text><ConditionsList@@ -1102,7 +1103,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {</View><Text style={{ marginBottom: 15 }}>- Then apply these actions:+ {t('Then apply these actions:')}</Text><View style={{ flex: 1 }}>{actionSplits.length === 0 && (@@ -1110,7 +1111,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {style={{ alignSelf: 'flex-start' }}onPress={addInitialAction}>- Add action+ {t('Add action')}</Button>)}<Stack spacing={2} data-testid="action-split-list">@@ -1141,8 +1142,8 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {}}>{splitIndex === 0- ? 'Apply to all'- : `Split ${splitIndex}`}+ ? t('Apply to all')+ : `${t('Split')} ${splitIndex}`}</Text>{splitIndex && (<Button@@ -1152,7 +1153,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {width: 20,height: 20,}}- aria-label="Delete split"+ aria-label={t('Delete split')}><SvgDeletestyle={{@@ -1199,7 +1200,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {addActionToSplitAfterIndex(splitIndex, -1)}>- Add action+ {t('Add action')}</Button>)}</View>@@ -1214,8 +1215,8 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {data-testid="add-split-transactions">{actionSplits.length > 1- ? 'Add another split'- : 'Split into multiple transactions'}+ ? t('Add another split')+ : t('Split into multiple transactions')}</Button>)}</View>@@ -1232,7 +1233,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {}}><Text style={{ color: theme.pageTextLight, marginBottom: 0 }}>- This rule applies to these transactions:+ {t('This rule applies to these transactions:')}</Text><View style={{ flex: 1 }} />@@ -1240,7 +1241,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {isDisabled={selectedInst.items.size === 0}onPress={onApply}>- Apply actions ({selectedInst.items.size})+ {t('Apply actions')} ({selectedInst.items.size})</Button></View>@@ -1261,9 +1262,9 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {justify="flex-end"style={{ marginTop: 20 }}>- <Button onClick={close}>Cancel</Button>+ <Button onClick={close}>{t('Cancel')}</Button><Button variant="primary" onPress={() => onSave(close)}>- Save+ {t('Save')}</Button></Stack></View>diff --git a/packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx b/packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsxindex de82638560..ce04880901 100644--- a/packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx+++ b/packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx@@ -2,6 +2,8 @@import React, { useState } from 'react';import { Form } from 'react-aria-components';+import { t } from 'i18next';+import { type FinanceModals } from 'loot-core/src/client/state-types/modals';import { send } from 'loot-core/src/platform/client/fetch';import { getTestKeyError } from 'loot-core/src/shared/errors';@@ -64,8 +66,8 @@ export function FixEncryptionKeyModal({<ModalHeadertitle={hasExistingKey- ? 'Unable to decrypt file'- : 'This file is encrypted'+ ? t('Unable to decrypt file')+ : t('This file is encrypted')}rightContent={<ModalCloseButton onPress={close} />}/>@@ -79,25 +81,26 @@ export function FixEncryptionKeyModal({>{hasExistingKey ? (<Paragraph>- This file was encrypted with a different key than you are- currently using. This probably means you changed your password.- Enter your current password to update your key.{' '}+ {t(+ 'This file was encrypted with a different key than you are currently using. This probably means you changed your password. Enter your current password to update your key.',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption">- Learn more+ {t('Learn more')}</Link></Paragraph>) : (<Paragraph>- We don’t have a key that encrypts or decrypts this file. Enter- the password for this file to create the key for encryption.{' '}+ {t(+ 'We don’t have a key that encrypts or decrypts this file. Enter the password for this file to create the key for encryption.',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption">- Learn more+ {t('Learn more')}</Link></Paragraph>)}@@ -115,7 +118,9 @@ export function FixEncryptionKeyModal({alignItems: 'center',}}>- <Text style={{ fontWeight: 600, marginBottom: 5 }}>Password</Text>{' '}+ <Text style={{ fontWeight: 600, marginBottom: 5 }}>+ {t('Password')}+ </Text>{' '}{error && (<Viewstyle={{@@ -144,7 +149,7 @@ export function FixEncryptionKeyModal({type="checkbox"onClick={() => setShowPassword(!showPassword)}/>{' '}- Show password+ {t('Show password')}</label></Text></View>@@ -158,7 +163,7 @@ export function FixEncryptionKeyModal({}}onPress={close}>- Back+ {t('Back')}</Button><ButtonWithLoadingtype="submit"@@ -168,7 +173,7 @@ export function FixEncryptionKeyModal({}}isLoading={loading}>- {hasExistingKey ? 'Update key' : 'Create key'}+ {hasExistingKey ? t('Update key') : t('Create key')}</ButtonWithLoading></ModalButtons></Form>diff --git a/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx b/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsxindex a6ee77b513..188b5d5733 100644--- a/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx+++ b/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx@@ -1,6 +1,8 @@// @ts-strict-ignoreimport React, { useState } from 'react';+import { t } from 'i18next'; // Ensure this import is correct+import { send } from 'loot-core/src/platform/client/fetch';import { Error } from '../alerts';@@ -59,26 +61,26 @@ export const GoCardlessInitialiseModal = ({{({ state: { close } }) => (<><ModalHeader- title="Set-up GoCardless"+ title={t('Set-up GoCardless')} // Translated titlerightContent={<ModalCloseButton onPress={close} />}/><View style={{ display: 'flex', gap: 10 }}><Text>- In order to enable bank-sync via GoCardless (only for EU banks)- you will need to create access credentials. This can be done by- creating an account with{' '}+ {t(+ 'In order to enable bank-sync via GoCardless (only for EU banks) you will need to create access credentials. This can be done by creating an account with',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/advanced/bank-sync/"linkColor="purple">- GoCardless+ {t('GoCardless')}</Link>.</Text><FormField>- <FormLabel title="Secret ID:" htmlFor="secret-id-field" />+ <FormLabel title={t('Secret ID:')} htmlFor="secret-id-field" /><InitialFocus><Inputid="secret-id-field"@@ -93,7 +95,7 @@ export const GoCardlessInitialiseModal = ({</FormField><FormField>- <FormLabel title="Secret Key:" htmlFor="secret-key-field" />+ <FormLabel title={t('Secret Key:')} htmlFor="secret-key-field" /><Inputid="secret-key-field"type="password"@@ -107,7 +109,9 @@ export const GoCardlessInitialiseModal = ({{!isValid && (<Error>- It is required to provide both the secret id and secret key.+ {t(+ 'It is required to provide both the secret id and secret key.',+ )}</Error>)}</View>@@ -120,7 +124,7 @@ export const GoCardlessInitialiseModal = ({onSubmit(close);}}>- Save and continue+ {t('Save and continue')}</ButtonWithLoading></ModalButtons></>diff --git a/packages/desktop-client/src/components/modals/HoldBufferModal.tsx b/packages/desktop-client/src/components/modals/HoldBufferModal.tsxindex 9006780ab0..5aeb352e22 100644--- a/packages/desktop-client/src/components/modals/HoldBufferModal.tsx+++ b/packages/desktop-client/src/components/modals/HoldBufferModal.tsx@@ -1,4 +1,5 @@import React, { useState } from 'react';+import { useTranslation } from 'react-i18next';import { envelopeBudget } from 'loot-core/client/queries';@@ -17,6 +18,7 @@ type HoldBufferModalProps = {};export function HoldBufferModal({ onSubmit }: HoldBufferModalProps) {+ const { t } = useTranslation(); // Initialize i18nextconst available = useEnvelopeSheetValue(envelopeBudget.toBudget) ?? 0;const [amount, setAmount] = useState<number>(0);@@ -31,11 +33,11 @@ export function HoldBufferModal({ onSubmit }: HoldBufferModalProps) {{({ state: { close } }) => (<><ModalHeader- title="Hold Buffer"+ title={t('Hold Buffer')}rightContent={<ModalCloseButton onPress={close} />}/><View>- <FieldLabel title="Hold this amount:" />+ <FieldLabel title={t('Hold this amount:')} />{' '}<InitialFocus><AmountInputvalue={available}@@ -71,7 +73,7 @@ export function HoldBufferModal({ onSubmit }: HoldBufferModalProps) {}}onPress={() => _onSubmit(amount)}>- Hold+ {t('Hold')}</Button></View></>diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsxindex b65187279f..7ed84edca8 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx@@ -1,6 +1,7 @@import React, { useState, useEffect, useCallback } from 'react';import deepEqual from 'deep-equal';+import { t } from 'i18next';import { amountToInteger } from 'loot-core/src/shared/util';@@ -726,7 +727,7 @@ export function ImportTransactionsModal({ options }) {<><ModalHeadertitle={- 'Import transactions' ++ t('Import transactions') +(filetype ? ` (${filetype.toUpperCase()})` : '')}rightContent={<ModalCloseButton onPress={close} />}@@ -767,7 +768,7 @@ export function ImportTransactionsModal({ options }) {fontStyle: 'italic',}}>- No transactions found+ {t('No transactions found')}</View>);}}@@ -805,7 +806,9 @@ export function ImportTransactionsModal({ options }) {<strong>Error:</strong> {error.message}</Text>{error.parsed && (- <Button onPress={() => onNewFile()}>Select new file...</Button>+ <Button onPress={() => onNewFile()}>+ {t('Select new file...')}+ </Button>)}</View>)}@@ -837,7 +840,7 @@ export function ImportTransactionsModal({ options }) {);}}>- Use Memo as a fallback for empty Payees+ {t('Use Memo as a fallback for empty Payees')}</CheckboxOption>)}{(isOfxFile(filetype) || isCamtFile(filetype)) && (@@ -848,7 +851,7 @@ export function ImportTransactionsModal({ options }) {setReconcile(!reconcile);}}>- Merge with existing transactions+ {t('Merge with existing transactions')}</CheckboxOption>)}@@ -879,7 +882,7 @@ export function ImportTransactionsModal({ options }) {{/* CSV Options */}{filetype === 'csv' && (<View style={{ marginLeft: 10, gap: 5 }}>- <SectionLabel title="CSV OPTIONS" />+ <SectionLabel title={t('CSV OPTIONS')} /><labelstyle={{display: 'flex',@@ -888,7 +891,7 @@ export function ImportTransactionsModal({ options }) {alignItems: 'baseline',}}>- Delimiter:+ {t('Delimiter:')}<Selectoptions={[[',', ','],@@ -919,7 +922,7 @@ export function ImportTransactionsModal({ options }) {alignItems: 'baseline',}}>- Skip lines:+ {t('Skip lines:')}<Inputtype="number"value={skipLines}@@ -953,7 +956,7 @@ export function ImportTransactionsModal({ options }) {);}}>- File has header row+ {t('File has header row')}</CheckboxOption><CheckboxOptionid="clear_on_import"@@ -962,7 +965,7 @@ export function ImportTransactionsModal({ options }) {setClearOnImport(!clearOnImport);}}>- Clear transactions on import+ {t('Clear transactions on import')}</CheckboxOption><CheckboxOptionid="form_dont_reconcile"@@ -971,7 +974,7 @@ export function ImportTransactionsModal({ options }) {setReconcile(!reconcile);}}>- Merge with existing transactions+ {t('Merge with existing transactions')}</CheckboxOption></View>)}@@ -979,7 +982,7 @@ export function ImportTransactionsModal({ options }) {<View style={{ flex: 1 }} /><View style={{ marginRight: 10, gap: 5 }}>- <SectionLabel title="AMOUNT OPTIONS" />+ <SectionLabel title={t('AMOUNT OPTIONS')} /><CheckboxOptionid="form_flip"checked={flipAmount}@@ -989,7 +992,7 @@ export function ImportTransactionsModal({ options }) {runImportPreview();}}>- Flip amount+ {t('Flip amount')}</CheckboxOption>{filetype === 'csv' && (<>@@ -1002,7 +1005,7 @@ export function ImportTransactionsModal({ options }) {runImportPreview();}}>- Split amount into separate inflow/outflow columns+ {t('Split amount into separate inflow/outflow columns')}</CheckboxOption><InOutOptioninOutMode={inOutMode}@@ -1060,7 +1063,7 @@ export function ImportTransactionsModal({ options }) {trans => !trans.isMatchedTransaction && trans.selected,).length}{' '}- transactions+ {t('transactions')}</ButtonWithLoading></View></View>diff --git a/packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx b/packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsxindex a7607bf93c..95d3262c25 100644--- a/packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx+++ b/packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx@@ -1,4 +1,5 @@import { type CSSProperties } from 'react';+import { useTranslation } from 'react-i18next'; // Import useTranslation from i18nextimport { useLocation } from 'react-router-dom';import * as Platform from 'loot-core/src/client/platform';@@ -150,6 +151,7 @@ function Shortcut({export function KeyboardShortcutModal() {const location = useLocation();+ const { t } = useTranslation(); // Initialize useTranslationconst onBudget = location.pathname.startsWith('/budget');const onAccounts = location.pathname.startsWith('/accounts');const ctrl = Platform.OS === 'mac' ? '⌘' : 'Ctrl';@@ -158,7 +160,7 @@ export function KeyboardShortcutModal() {{({ state: { close } }) => (<><ModalHeader- title="Keyboard Shortcuts"+ title={t('Keyboard Shortcuts')} // Translate titlerightContent={<ModalCloseButton onPress={close} />}/><View@@ -168,22 +170,22 @@ export function KeyboardShortcutModal() {}}><View>- <Shortcut shortcut="?" description="Open the help menu" />+ <Shortcut shortcut="?" description={t('Open the help menu')} /><Shortcutshortcut="O"- description="Close the current budget and open another"+ description={t('Close the current budget and open another')}meta={ctrl}/><Shortcutshortcut="P"- description="Toggle the privacy filter"+ description={t('Toggle the privacy filter')}meta={ctrl}shift={true}/>{onBudget && (<Shortcutshortcut="0"- description="View current month"+ description={t('View current month')}style={{fontVariantNumeric: 'slashed-zero',}}@@ -193,51 +195,57 @@ export function KeyboardShortcutModal() {<><Shortcutshortcut="Enter"- description="Move down when editing"+ description={t('Move down when editing')}/><Shortcutshortcut="Enter"- description="Move up when editing"+ description={t('Move up when editing')}shift={true}/><Shortcutshortcut="I"- description="Import transactions"+ description={t('Import transactions')}meta={ctrl}/>- <Shortcut shortcut="B" description="Bank sync" meta={ctrl} />- <GroupHeading group="With transaction(s) selected" />+ <Shortcut+ shortcut="B"+ description={t('Bank sync')}+ meta={ctrl}+ />+ <GroupHeading group={t('With transaction(s) selected')} /><Shortcutshortcut="F"- description="Filter to the selected transactions"+ description={t('Filter to the selected transactions')}/><Shortcutshortcut="D"- description="Delete selected transactions"+ description={t('Delete selected transactions')}/><Shortcutshortcut="A"- description="Set account for selected transactions"+ description={t('Set account for selected transactions')}/><Shortcutshortcut="P"- description="Set payee for selected transactions"+ description={t('Set payee for selected transactions')}/><Shortcutshortcut="N"- description="Set notes for selected transactions"+ description={t('Set notes for selected transactions')}/><Shortcutshortcut="C"- description="Set category for selected transactions"+ description={t('Set category for selected transactions')}/><Shortcutshortcut="L"- description="Toggle cleared for selected transactions"+ description={t('Toggle cleared for selected transactions')}/><Shortcutshortcut="S"- description="Link or view schedule for selected transactions"+ description={t(+ 'Link or view schedule for selected transactions',+ )}/></>)}@@ -249,12 +257,12 @@ export function KeyboardShortcutModal() {><Shortcutshortcut="Z"- description="Undo the last change"+ description={t('Undo the last change')}meta={ctrl}/><Shortcutshortcut="Z"- description="Redo the last undone change"+ description={t('Redo the last undone change')}shift={true}meta={ctrl}/>@@ -262,71 +270,82 @@ export function KeyboardShortcutModal() {<><Shortcutshortcut="Enter"- description="Move up when editing"+ description={t('Move up when editing')}shift={true}/><Shortcutshortcut="Tab"- description="Move left when editing"+ description={t('Move left when editing')}shift={true}/>{onBudget && (<><Shortcutshortcut="←"- description="View previous month"+ description={t('View previous month')}+ />+ <Shortcut+ shortcut="→"+ description={t('View next month')}/>- <Shortcut shortcut="→" description="View next month" /></>)}{onAccounts && (<><Shortcutshortcut="A"- description="Select all transactions"+ description={t('Select all transactions')}meta={ctrl}/><Shortcutshortcut="Tab"- description="Move right when editing"+ description={t('Move right when editing')}/><Shortcutshortcut="Tab"- description="Move left when editing"+ description={t('Move left when editing')}shift={true}/><Shortcutshortcut="T"- description="Add a new transaction"+ description={t('Add a new transaction')}/><Shortcutshortcut="F"- description="Filter transactions"+ description={t('Filter transactions')}/>- <GroupHeading group="Select a transaction, then" />+ <GroupHeading group={t('Select a transaction, then')} /><Shortcutshortcut="J"- description="Move to the next transaction down"+ description={t('Move to the next transaction down')}/><Shortcutshortcut="K"- description="Move to the next transaction up"+ description={t('Move to the next transaction up')}/><Shortcutshortcut="↑"- description="Move to the next transaction down and scroll"+ description={t(+ 'Move to the next transaction down and scroll',+ )}/><Shortcutshortcut="↓"- description="Move to the next transaction up and scroll"+ description={t(+ 'Move to the next transaction up and scroll',+ )}/><Shortcutshortcut="Space"- description="Toggle selection of current transaction"+ description={t(+ 'Toggle selection of current transaction',+ )}/><Shortcutshortcut="Space"- description="Toggle all transactions between current and most recently selected transaction"+ description={t(+ 'Toggle all transactions between current and most recently selected transaction',+ )}shift={true}/></>diff --git a/packages/desktop-client/src/components/modals/ManageRulesModal.tsx b/packages/desktop-client/src/components/modals/ManageRulesModal.tsxindex dcf6d3d7fa..9b52fda9bc 100644--- a/packages/desktop-client/src/components/modals/ManageRulesModal.tsx+++ b/packages/desktop-client/src/components/modals/ManageRulesModal.tsx@@ -2,6 +2,8 @@import React, { useState } from 'react';import { useLocation } from 'react-router-dom';+import { t } from 'i18next';+import { isNonProductionEnvironment } from 'loot-core/src/shared/environment';import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';@@ -23,11 +25,11 @@ export function ManageRulesModal({ payeeId }: ManageRulesModalProps) {}return (- <Modal name="manage-rules" isLoading={loading}>+ <Modal name={t('manage-rules')} isLoading={loading}>{({ state: { close } }) => (<><ModalHeader- title="Rules"+ title={t('Rules')}rightContent={<ModalCloseButton onPress={close} />}/><ManageRules isModal payeeId={payeeId} setLoading={setLoading} />diff --git a/packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.jsx b/packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.jsxindex 0ef3eb7ff5..d4ef4edc96 100644--- a/packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.jsx+++ b/packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.jsx@@ -1,6 +1,8 @@import React, { useState, useRef, useEffect } from 'react';import { useDispatch, useSelector } from 'react-redux';+import { t } from 'i18next';+import { replaceModal } from 'loot-core/src/client/actions/modals';import { send } from 'loot-core/src/platform/client/fetch';@@ -112,8 +114,9 @@ export function MergeUnusedPayeesModal({ payeeIds, targetPayeeId }) {</Paragraph><Information>- Merging will remove the payee and transfer any existing rules to- the new payee.+ {t(+ 'Merging will remove the payee and transfer any existing rules to the new payee.',+ )}{!isEditingRule && (<>{' '}@@ -158,7 +161,7 @@ export function MergeUnusedPayeesModal({ payeeIds, targetPayeeId }) {close();}}>- Merge+ {t('Merge')}</Button>{!isEditingRule && (<Button@@ -168,11 +171,11 @@ export function MergeUnusedPayeesModal({ payeeIds, targetPayeeId }) {close();}}>- Merge and edit rule+ {t('Merge and edit rule')}</Button>)}<Button style={{ marginRight: 10 }} onPress={close}>- Do nothing+ {t('Do nothing')}</Button></ModalButtons></View>diff --git a/packages/desktop-client/src/components/modals/NotesModal.tsx b/packages/desktop-client/src/components/modals/NotesModal.tsxindex e728037405..716828ccdb 100644--- a/packages/desktop-client/src/components/modals/NotesModal.tsx+++ b/packages/desktop-client/src/components/modals/NotesModal.tsx@@ -1,5 +1,6 @@// @ts-strict-ignoreimport React, { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { useNotes } from '../../hooks/useNotes';import { SvgCheck } from '../../icons/v2';@@ -15,6 +16,7 @@ type NotesModalProps = {};export function NotesModal({ id, name, onSave }: NotesModalProps) {+ const { t } = useTranslation();const originalNotes = useNotes(id);const [notes, setNotes] = useState(originalNotes);@@ -36,7 +38,7 @@ export function NotesModal({ id, name, onSave }: NotesModalProps) {{({ state: { close } }) => (<><ModalHeader- title={`Notes: ${name}`}+ title={t('Notes: {{name}}', { name })}rightContent={<ModalCloseButton onPress={close} />}/><View@@ -78,7 +80,7 @@ export function NotesModal({ id, name, onSave }: NotesModalProps) {}}><SvgCheck width={17} height={17} style={{ paddingRight: 5 }} />- Save notes+ {t('Save notes')}</Button></View></View>diff --git a/packages/desktop-client/src/components/modals/PayeeAutocompleteModal.tsx b/packages/desktop-client/src/components/modals/PayeeAutocompleteModal.tsxindex 739c21af25..7fab5513fe 100644--- a/packages/desktop-client/src/components/modals/PayeeAutocompleteModal.tsx+++ b/packages/desktop-client/src/components/modals/PayeeAutocompleteModal.tsx@@ -1,5 +1,7 @@import React, { type ComponentPropsWithoutRef } from 'react';+import { t } from 'i18next';+import { useAccounts } from '../../hooks/useAccounts';import { useNavigate } from '../../hooks/useNavigate';import { usePayees } from '../../hooks/usePayees';@@ -51,7 +53,7 @@ export function PayeeAutocompleteModal({<ModalHeadertitle={<ModalTitle- title="Payee"+ title={t('Payee')}getStyle={() => ({ color: theme.menuAutoCompleteText })}/>}diff --git a/packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx b/packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsxindex b815c84612..7f827c6185 100644--- a/packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx+++ b/packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx@@ -4,6 +4,8 @@ import React, {type CSSProperties,} from 'react';+import { t } from 'i18next';+import { useSchedules } from 'loot-core/client/data-hooks/schedules';import { format } from 'loot-core/shared/months';import { type Query } from 'loot-core/shared/query';@@ -61,7 +63,7 @@ export function ScheduledTransactionMenuModal({}}><Text style={{ fontSize: 17, fontWeight: 400 }}>- Scheduled date+ {t('Scheduled date')}</Text><Text style={{ fontSize: 17, fontWeight: 700 }}>{format(schedule.next_date, 'MMMM dd, yyyy')}@@ -112,11 +114,11 @@ function ScheduledTransactionMenu({items={[{name: 'post',- text: 'Post transaction',+ text: t('Post transaction'),},{name: 'skip',- text: 'Skip scheduled date',+ text: t('Skip scheduled date'),},]}/>diff --git a/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx b/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsxindex ea3086e82d..90ec64cd63 100644--- a/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx+++ b/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx@@ -1,6 +1,8 @@import React, { useState } from 'react';import { useDispatch } from 'react-redux';+import { t } from 'i18next';+import {closeModal,linkAccount,@@ -121,11 +123,13 @@ export function SelectLinkedAccountsModal({{({ state: { close } }) => (<><ModalHeader- title="Link Accounts"+ title={t('Link Accounts')}rightContent={<ModalCloseButton onPress={close} />}/><Text style={{ marginBottom: 10 }}>- We found the following accounts. Select which ones you want to add:+ {t(+ 'We found the following accounts. Select which ones you want to add:',+ )}</Text><Viewstyle={{@@ -136,10 +140,10 @@ export function SelectLinkedAccountsModal({><TableHeaderheaders={[- { name: 'Bank Account To Sync', width: 200 },- { name: 'Balance', width: 80 },- { name: 'Account in Actual', width: 'flex' },- { name: 'Actions', width: 'flex' },+ { name: t('Bank Account To Sync'), width: 200 },+ { name: t('Balance'), width: 80 },+ { name: t('Account in Actual'), width: 'flex' },+ { name: t('Actions'), width: 'flex' },]}/>@@ -182,7 +186,7 @@ export function SelectLinkedAccountsModal({onPress={onNext}isDisabled={!Object.keys(chosenAccounts).length}>- Link accounts+ {t('Link accounts')}</Button></View></>@@ -243,7 +247,7 @@ function TableRow({}}style={{ float: 'right' }}>- Remove bank-sync+ {t('Remove bank-sync')}</Button>) : (<Button@@ -253,7 +257,7 @@ function TableRow({}}style={{ float: 'right' }}>- Setup bank-sync+ {t('Setup bank-sync')}</Button>)}</Field>diff --git a/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx b/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsxindex fca7dc5b4f..54fac7a98a 100644--- a/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx+++ b/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx@@ -1,5 +1,6 @@// @ts-strict-ignoreimport React, { useState } from 'react';+import { useTranslation } from 'react-i18next';import { send } from 'loot-core/src/platform/client/fetch';@@ -24,6 +25,7 @@ type SimpleFinInitialiseProps = {export const SimpleFinInitialiseModal = ({onSuccess,}: SimpleFinInitialiseProps) => {+ const { t } = useTranslation();const [token, setToken] = useState('');const [isValid, setIsValid] = useState(true);const [isLoading, setIsLoading] = useState(false);@@ -51,14 +53,14 @@ export const SimpleFinInitialiseModal = ({{({ state: { close } }) => (<><ModalHeader- title="Set-up SimpleFIN"+ title={t('Set-up SimpleFIN')}rightContent={<ModalCloseButton onPress={close} />}/><View style={{ display: 'flex', gap: 10 }}><Text>- In order to enable bank-sync via SimpleFIN (only for North- American banks) you will need to create a token. This can be done- by creating an account with{' '}+ {t(+ 'In order to enable bank-sync via SimpleFIN (only for North American banks), you will need to create a token. This can be done by creating an account with',+ )}{' '}<Linkvariant="external"to="https://bridge.simplefin.org/"@@ -70,7 +72,7 @@ export const SimpleFinInitialiseModal = ({</Text><FormField>- <FormLabel title="Token:" htmlFor="token-field" />+ <FormLabel title={t('Token:')} htmlFor="token-field" /><Inputid="token-field"type="password"@@ -94,7 +96,7 @@ export const SimpleFinInitialiseModal = ({onSubmit(close);}}>- Save and continue+ {t('Save and continue')}</ButtonWithLoading></ModalButtons></>diff --git a/packages/desktop-client/src/components/reports/CategorySelector.tsx b/packages/desktop-client/src/components/reports/CategorySelector.tsxindex 359aec51c8..b07b9d05be 100644--- a/packages/desktop-client/src/components/reports/CategorySelector.tsx+++ b/packages/desktop-client/src/components/reports/CategorySelector.tsx@@ -1,6 +1,8 @@// @ts-strict-ignoreimport React, { Fragment, useMemo, useState } from 'react';+import { t } from 'i18next';+import {type CategoryEntity,type CategoryGroupEntity,@@ -84,7 +86,7 @@ export function CategorySelector({height={15}style={{ marginRight: 5 }}/>- <Text>Show unchecked</Text>+ <Text>{t('Show unchecked')}</Text></View>) : (<View style={{ flexDirection: 'row', alignItems: 'center' }}>@@ -93,7 +95,7 @@ export function CategorySelector({height={15}style={{ marginRight: 5 }}/>- <Text>Hide unchecked</Text>+ <Text>{t('Hide unchecked')}</Text></View>)}</View>@@ -102,7 +104,7 @@ export function CategorySelector({<View style={{ flexDirection: 'row', alignItems: 'center' }}><GraphButtonselected={allCategoriesSelected}- title="Select All"+ title={t('Select All')}onSelect={() => {setSelectedCategories(selectAll);}}@@ -112,7 +114,7 @@ export function CategorySelector({</GraphButton><GraphButtonselected={allCategoriesUnselected}- title="Unselect All"+ title={t('Unselect All')}onSelect={() => {setSelectedCategories([]);}}diff --git a/packages/desktop-client/src/components/reports/ReportSidebar.tsx b/packages/desktop-client/src/components/reports/ReportSidebar.tsxindex 1d3706ac60..a03b9c9b92 100644--- a/packages/desktop-client/src/components/reports/ReportSidebar.tsx+++ b/packages/desktop-client/src/components/reports/ReportSidebar.tsx@@ -1,5 +1,7 @@import React, { useMemo, useRef, useState } from 'react';+import { t } from 'i18next';+import * as monthUtils from 'loot-core/src/shared/months';import { type CategoryEntity } from 'loot-core/types/models/category';import { type CategoryGroupEntity } from 'loot-core/types/models/category-group';@@ -90,6 +92,7 @@ export function ReportSidebar({}: ReportSidebarProps) {const [menuOpen, setMenuOpen] = useState(false);const triggerRef = useRef(null);+const onSelectRange = (cond: string) => {setSessionReport('dateRange', cond);onReportChange({ type: 'modify' });@@ -169,7 +172,7 @@ export function ReportSidebar({}}><Text>- <strong>Display</strong>+ <strong>{t('Display')}</strong></Text></View><SpaceBetween@@ -178,20 +181,21 @@ export function ReportSidebar({padding: 5,}}>- <Text style={{ width: 50, textAlign: 'right' }}>Mode:</Text>+ <Text style={{ width: 50, textAlign: 'right' }}>{t('Mode:')}</Text><ModeButtonselected={customReportItems.mode === 'total'}onSelect={() => onChangeMode('total')}>- Total+ {t('Total')}</ModeButton><ModeButtonselected={customReportItems.mode === 'time'}onSelect={() => onChangeMode('time')}>- Time+ {t('Time')}</ModeButton></SpaceBetween>+<Viewstyle={{flexDirection: 'row',@@ -200,7 +204,7 @@ export function ReportSidebar({}}><Text style={{ width: 50, textAlign: 'right', marginRight: 5 }}>- Split:+ {t('Split:')}</Text><Selectvalue={customReportItems.groupBy}@@ -209,6 +213,7 @@ export function ReportSidebar({disabledKeys={disabledItems('split')}/></View>+<Viewstyle={{flexDirection: 'row',@@ -217,7 +222,7 @@ export function ReportSidebar({}}><Text style={{ width: 50, textAlign: 'right', marginRight: 5 }}>- Type:+ {t('Type:')}</Text><Selectvalue={customReportItems.balanceType}@@ -237,7 +242,7 @@ export function ReportSidebar({}}><Text style={{ width: 50, textAlign: 'right', marginRight: 5 }}>- Interval:+ {t('Interval:')}</Text><Selectvalue={customReportItems.interval}@@ -279,9 +284,8 @@ export function ReportSidebar({padding: '5px 10px',}}>- Options+ {t('Options')}</Button>-<PopovertriggerRef={triggerRef}placement="bottom start"@@ -394,7 +398,7 @@ export function ReportSidebar({}}><Text>- <strong>Date filters</strong>+ <strong>{t('Date filters')}</strong></Text><View style={{ flex: 1 }} /><ModeButton@@ -419,7 +423,7 @@ export function ReportSidebar({);}}>- Static+ {t('Static')}</ModeButton></SpaceBetween>{!customReportItems.isDateStatic ? (@@ -431,7 +435,7 @@ export function ReportSidebar({}}><Text style={{ width: 50, textAlign: 'right', marginRight: 5 }}>- Range:+ {t('Range:')}</Text><Selectvalue={customReportItems.dateRange}@@ -442,7 +446,7 @@ export function ReportSidebar({customReportItems.includeCurrentInterval && (<Tooltipplacement="bottom start"- content={<Text>Current month</Text>}+ content={<Text>{t('Current month')}</Text>}style={{...styles.tooltip,lineHeight: 1.5,@@ -539,7 +543,7 @@ export function ReportSidebar({>{isComplexCategoryCondition ? (<Information>- Remove active category filters to show the category selector.+ {t('Remove active category filters to show the category selector.')}</Information>) : (<CategorySelectordiff --git a/packages/desktop-client/src/components/reports/ReportSummary.tsx b/packages/desktop-client/src/components/reports/ReportSummary.tsxindex 137ea92709..43b23b1649 100644--- a/packages/desktop-client/src/components/reports/ReportSummary.tsx+++ b/packages/desktop-client/src/components/reports/ReportSummary.tsx@@ -1,4 +1,5 @@import React from 'react';+import { useTranslation } from 'react-i18next';import * as monthUtils from 'loot-core/src/shared/months';import {@@ -35,6 +36,7 @@ export function ReportSummary({interval,intervalsCount,}: ReportSummaryProps) {+ const { t } = useTranslation();const net =balanceTypeOp === 'netAssets'? 'DEPOSIT'@@ -119,7 +121,7 @@ export function ReportSummary({><PrivacyFilter>{amountToCurrency(data[balanceTypeOp])}</PrivacyFilter></Text>- <Text style={{ fontWeight: 600 }}>For this time period</Text>+ <Text style={{ fontWeight: 600 }}>{t('For this time period')}</Text></View><Viewstyle={{diff --git a/packages/desktop-client/src/components/reports/ReportTopbar.tsx b/packages/desktop-client/src/components/reports/ReportTopbar.tsxindex 74e1847951..6242f563d7 100644--- a/packages/desktop-client/src/components/reports/ReportTopbar.tsx+++ b/packages/desktop-client/src/components/reports/ReportTopbar.tsx@@ -1,5 +1,7 @@import React, { type ComponentProps } from 'react';+import { t } from 'i18next';+import { type CustomReportEntity } from 'loot-core/types/models/reports';import { type RuleConditionEntity } from 'loot-core/types/models/rule';@@ -70,7 +72,7 @@ export function ReportTopbar({><GraphButtonselected={customReportItems.graphType === 'TableGraph'}- title="Data Table"+ title={t('Data Table')}onSelect={() => {onChangeGraph('TableGraph');}}@@ -81,7 +83,9 @@ export function ReportTopbar({</GraphButton><GraphButtontitle={- customReportItems.mode === 'total' ? 'Bar Graph' : 'Stacked Bar Graph'+ customReportItems.mode === 'total'+ ? t('Bar Graph')+ : t('Stacked Bar Graph')}selected={customReportItems.graphType === 'BarGraph' ||@@ -100,7 +104,7 @@ export function ReportTopbar({<SvgChartBar width={15} height={15} /></GraphButton><GraphButton- title="Line Graph"+ title={t('Line Graph')}selected={customReportItems.graphType === 'LineGraph'}onSelect={() => {onChangeGraph('LineGraph');@@ -111,7 +115,7 @@ export function ReportTopbar({<SvgChart width={15} height={15} /></GraphButton><GraphButton- title="Area Graph"+ title={t('Area Graph')}selected={customReportItems.graphType === 'AreaGraph'}onSelect={() => {onChangeGraph('AreaGraph');@@ -122,7 +126,7 @@ export function ReportTopbar({<SvgChartArea width={15} height={15} /></GraphButton><GraphButton- title="Donut Graph"+ title={t('Donut Graph')}selected={customReportItems.graphType === 'DonutGraph'}onSelect={() => {onChangeGraph('DonutGraph');@@ -147,7 +151,7 @@ export function ReportTopbar({onChangeViews('viewLegend');}}style={{ marginRight: 15 }}- title="Show Legend"+ title={t('Show Legend')}disabled={isItemDisabled('ShowLegend')}><SvgListBullet width={15} height={15} />@@ -158,7 +162,7 @@ export function ReportTopbar({onChangeViews('viewSummary');}}style={{ marginRight: 15 }}- title="Show Summary"+ title={t('Show Summary')}><SvgCalculator width={15} height={15} /></GraphButton>@@ -168,7 +172,7 @@ export function ReportTopbar({onChangeViews('viewLabels');}}style={{ marginRight: 15 }}- title="Show Labels"+ title={t('Show Labels')}disabled={isItemDisabled('ShowLabels')}><SvgTag width={15} height={15} />diff --git a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx b/packages/desktop-client/src/components/reports/SaveReportDelete.tsxindex 436b3ef95f..915bf2f81d 100644--- a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx+++ b/packages/desktop-client/src/components/reports/SaveReportDelete.tsx@@ -1,4 +1,5 @@import React from 'react';+import { useTranslation } from 'react-i18next';import { theme } from '../../style/theme';import { Button } from '../common/Button2';@@ -17,11 +18,12 @@ export function SaveReportDelete({onClose,name,}: SaveReportDeleteProps) {+ const { t } = useTranslation();return (<><View style={{ align: 'center' }}><Text style={{ color: theme.errorText, marginBottom: 5 }}>- Are you sure you want to delete report:+ {t('Are you sure you want to delete report:')}</Text><View>{name}</View></View>@@ -34,10 +36,10 @@ export function SaveReportDelete({><View style={{ flex: 1 }} /><Button variant="primary" autoFocus onPress={onDelete}>- Yes+ {t('Yes')}</Button><Button variant="primary" onPress={onClose}>- No+ {t('No')}</Button></Stack></>diff --git a/packages/desktop-client/src/components/reports/SaveReportName.tsx b/packages/desktop-client/src/components/reports/SaveReportName.tsxindex 74d4b458a4..84f9d66f93 100644--- a/packages/desktop-client/src/components/reports/SaveReportName.tsx+++ b/packages/desktop-client/src/components/reports/SaveReportName.tsx@@ -1,6 +1,8 @@import React, { type RefObject, useEffect } from 'react';import { Form } from 'react-aria-components';+import { t } from 'i18next';+import { type CustomReportEntity } from 'loot-core/types/models/reports';import { theme } from '../../style';@@ -62,7 +64,7 @@ export function SaveReportName({><FormField style={{ flex: 1 }}><FormLabel- title="Report Name"+ title={t('Report Name')}htmlFor="name-field"style={{ userSelect: 'none' }}/>diff --git a/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx b/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsxindex ee6c3b7240..4215c4f107 100644--- a/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx+++ b/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx@@ -1,6 +1,8 @@import React, { useEffect, useState } from 'react';import { useDispatch } from 'react-redux';+import { t } from 'i18next';+import { send, sendCatch } from 'loot-core/platform/client/fetch/index';import { addNotification } from 'loot-core/src/client/actions';import { calculateHasWarning } from 'loot-core/src/client/reports';@@ -47,7 +49,7 @@ export function CustomReportListCards({return (<MissingReportCard isEditing={isEditing} onRemove={onRemove}>- This custom report has been deleted.+ {t('This custom report has been deleted.')}</MissingReportCard>);}diff --git a/packages/desktop-client/src/components/reports/reports/GetCardData.tsx b/packages/desktop-client/src/components/reports/reports/GetCardData.tsxindex 299f9999df..c9b50d7116 100644--- a/packages/desktop-client/src/components/reports/reports/GetCardData.tsx+++ b/packages/desktop-client/src/components/reports/reports/GetCardData.tsx@@ -1,6 +1,8 @@import React, { useMemo } from 'react';import { ErrorBoundary } from 'react-error-boundary';+import { t } from 'i18next';+import * as monthUtils from 'loot-core/src/shared/months';import { type AccountEntity } from 'loot-core/types/models/account';import { type CategoryEntity } from 'loot-core/types/models/category';@@ -28,7 +30,7 @@ function ErrorFallback() {<br /></div><Text style={{ ...styles.mediumText, color: theme.errorText }}>- There was a problem loading your report+ {t('There was a problem loading your report')}</Text></>);diff --git a/packages/desktop-client/src/components/rules/ActionExpression.tsx b/packages/desktop-client/src/components/rules/ActionExpression.tsxindex 6a3cd11100..0466be5895 100644--- a/packages/desktop-client/src/components/rules/ActionExpression.tsx+++ b/packages/desktop-client/src/components/rules/ActionExpression.tsx@@ -1,5 +1,7 @@import React, { type CSSProperties } from 'react';+import { t } from 'i18next';+import {mapField,friendlyOp,@@ -70,10 +72,10 @@ function SetActionExpression({<><Text>{friendlyOp(op)}</Text>{' '}<Text style={valueStyle}>{mapField(field, options)}</Text>{' '}- <Text>to </Text>+ <Text>{t('to ')}</Text>{options?.template ? (<>- <Text>template </Text>+ <Text>{t('template ')}</Text><Text style={valueStyle}>{options.template}</Text></>) : (diff --git a/packages/desktop-client/src/components/rules/RuleRow.tsx b/packages/desktop-client/src/components/rules/RuleRow.tsxindex 84ac48f182..2c59dcac26 100644--- a/packages/desktop-client/src/components/rules/RuleRow.tsx+++ b/packages/desktop-client/src/components/rules/RuleRow.tsx@@ -228,7 +228,7 @@ export const RuleRow = memo(</Field><Cell name="edit" plain style={{ padding: '0 15px', paddingLeft: 5 }}>- <Button onPress={() => onEditRule(rule)}>Edit</Button>+ <Button onPress={() => onEditRule(rule)}>{t('Edit')}</Button></Cell></Row>);diff --git a/packages/desktop-client/src/components/rules/RulesHeader.tsx b/packages/desktop-client/src/components/rules/RulesHeader.tsxindex 01c61512b5..07d034a095 100644--- a/packages/desktop-client/src/components/rules/RulesHeader.tsx+++ b/packages/desktop-client/src/components/rules/RulesHeader.tsx@@ -1,5 +1,7 @@import React from 'react';+import { t } from 'i18next';+import { useSelectedItems, useSelectedDispatch } from '../../hooks/useSelected';import { SelectCell, Cell, TableHeader } from '../table';@@ -17,8 +19,8 @@ export function RulesHeader() {dispatchSelected({ type: 'select-all', isRangeSelect: e.shiftKey })}/>- <Cell value="Stage" width={50} />- <Cell value="Rule" width="flex" />+ <Cell value={t('Stage')} width={50} />+ <Cell value={t('Rule')} width="flex" /></TableHeader>);}diff --git a/packages/desktop-client/src/components/rules/Value.tsx b/packages/desktop-client/src/components/rules/Value.tsxindex b60a87c6e8..7cd6e7dca1 100644--- a/packages/desktop-client/src/components/rules/Value.tsx+++ b/packages/desktop-client/src/components/rules/Value.tsx@@ -2,6 +2,7 @@import React, { useState, type CSSProperties } from 'react';import { format as formatDate, parseISO } from 'date-fns';+import { t } from 'i18next';import { getMonthYearFormat } from 'loot-core/src/shared/months';import { getRecurringDescription } from 'loot-core/src/shared/schedules';@@ -172,7 +173,7 @@ export function Value<T>({const { num1, num2 } = value;return (<Text>- <Text style={valueStyle}>{formatValue(num1)}</Text> and{' '}+ <Text style={valueStyle}>{formatValue(num1)}</Text> {t('and')}{' '}<Text style={valueStyle}>{formatValue(num2)}</Text></Text>);diff --git a/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx b/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsxindex c14aeb91ea..ea249b8027 100644--- a/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx+++ b/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx@@ -1,5 +1,7 @@import React from 'react';+import { t } from 'i18next';+import { useSyncedPref } from '../../hooks/useSyncedPref';import { Button } from '../common/Button2';import { Link } from '../common/Link';@@ -34,7 +36,7 @@ export function BudgetTypeSettings() {to="https://actualbudget.org/docs/getting-started/envelope-budgeting"linkColor="purple">- Learn more…+ {t('Learn more…')}</Link></Text><Text>@@ -47,7 +49,7 @@ export function BudgetTypeSettings() {to="https://actualbudget.org/docs/experimental/tracking-budget"linkColor="purple">- Learn more…+ {t('Learn more…')}</Link></Text></Setting>diff --git a/packages/desktop-client/src/components/settings/Encryption.tsx b/packages/desktop-client/src/components/settings/Encryption.tsxindex 941c9f4c19..a5e9c942b7 100644--- a/packages/desktop-client/src/components/settings/Encryption.tsx+++ b/packages/desktop-client/src/components/settings/Encryption.tsx@@ -1,5 +1,5 @@-// @ts-strict-ignoreimport React from 'react';+import { useTranslation } from 'react-i18next';import { useDispatch } from 'react-redux';import { pushModal } from 'loot-core/client/actions';@@ -14,6 +14,7 @@ import { useServerURL } from '../ServerContext';import { Setting } from './UI';export function EncryptionSettings() {+ const { t } = useTranslation();const dispatch = useDispatch();const serverURL = useServerURL();const [encryptKeyId] = useMetadataPref('encryptKeyId');@@ -26,37 +27,41 @@ export function EncryptionSettings() {return encryptKeyId ? (<Setting- primaryAction={<Button onPress={onChangeKey}>Generate new key</Button>}+ primaryAction={+ <Button onPress={onChangeKey}>{t('Generate new key')}</Button>+ }><Text><Text style={{ color: theme.noticeTextLight, fontWeight: 600 }}>- End-to-end Encryption is turned on.+ {t('End-to-end Encryption is turned on.')}</Text>{' '}- Your data is encrypted with a key that only you have before sending it- it out to the cloud. Local data remains unencrypted so if you forget- your password you can re-encrypt it.{' '}+ {t(+ 'Your data is encrypted with a key that only you have before sending it it out to the cloud. Local data remains unencrypted so if you forget your password you can re-encrypt it.',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- Learn more…+ {t('Learn more…')}</Link></Text></Setting>) : missingCryptoAPI ? (- <Setting primaryAction={<Button isDisabled>Enable encryption…</Button>}>+ <Setting+ primaryAction={<Button isDisabled>{t('Enable encryption…')}</Button>}+ ><Text>- <strong>End-to-end encryption</strong> is not available when making an- unencrypted connection to a remote server. You’ll need to enable HTTPS- on your server to use end-to-end encryption. This problem may also occur- if your browser is too old to work with Actual.{' '}+ <strong>{t('End-to-end encryption')}</strong>+ {t(+ ' is not available when making an unencrypted connection to a remote server. You’ll need to enable HTTPS on your server to use end-to-end encryption. This problem may also occur if your browser is too old to work with Actual.',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/config/https"linkColor="purple">- Learn more…+ {t('Learn more…')}</Link></Text></Setting>@@ -64,37 +69,39 @@ export function EncryptionSettings() {<SettingprimaryAction={<Button onPress={() => dispatch(pushModal('create-encryption-key'))}>- Enable encryption…+ {t('Enable encryption…')}</Button>}><Text>- <strong>End-to-end encryption</strong> is not enabled. Any data on the- server is still protected by the server password, but it’s not- end-to-end encrypted which means the server owners have the ability to- read it. If you want, you can use an additional password to encrypt your- data on the server.{' '}+ <strong>End-to-end encryption</strong>+ {t(+ 'is not enabled. Any data on the server is still protected by the server password, but it’s not end-to-end encrypted which means the server owners have the ability to read it. If you want, you can use an additional password to encrypt your data on the server.',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- Learn more…+ {t('Learn more…')}</Link></Text></Setting>) : (- <Setting primaryAction={<Button isDisabled>Enable encryption…</Button>}>+ <Setting+ primaryAction={<Button isDisabled>{t('Enable encryption…')}</Button>}+ ><Text>- <strong>End-to-end encryption</strong> is not available when running- without a server. Budget files are always kept unencrypted locally, and- encryption is only applied when sending data to a server.{' '}+ <strong>{t('End-to-end encryption')}</strong>+ {t(+ ' is not available when running without a server. Budget files are always kept unencrypted locally, and encryption is only applied when sending data to a server.',+ )}{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- Learn more…+ {t('Learn more…')}</Link></Text></Setting>diff --git a/packages/desktop-client/src/components/settings/Export.tsx b/packages/desktop-client/src/components/settings/Export.tsxindex 9b3b8ba30b..9557cde821 100644--- a/packages/desktop-client/src/components/settings/Export.tsx+++ b/packages/desktop-client/src/components/settings/Export.tsx@@ -1,6 +1,7 @@import React, { useState } from 'react';import { format } from 'date-fns';+import { t } from 'i18next';import { send } from 'loot-core/src/platform/client/fetch';@@ -34,7 +35,7 @@ export function ExportBudget() {window.Actual?.saveFile(response.data,`${format(new Date(), 'yyyy-MM-dd')}-${budgetName}.zip`,- 'Export budget',+ t('Export budget'),);setIsLoading(false);}@@ -44,12 +45,13 @@ export function ExportBudget() {primaryAction={<><ButtonWithLoading onPress={onExport} isLoading={isLoading}>- Export data+ {t('Export data')}</ButtonWithLoading>{error && (<Block style={{ color: theme.errorText, marginTop: 15 }}>- An unknown error occurred while exporting. Please report this as a- new issue on Github.+ {t(+ 'An unknown error occurred while exporting. Please report this as a new issue on Github.',+ )}</Block>)}</>@@ -63,8 +65,9 @@ export function ExportBudget() {</Text>{encryptKeyId ? (<Text>- Even though encryption is enabled, the exported zip file will not have- any encryption.+ {t(+ 'Even though encryption is enabled, the exported zip file will not have any encryption.',+ )}</Text>) : null}</Setting>diff --git a/packages/desktop-client/src/components/settings/FixSplits.tsx b/packages/desktop-client/src/components/settings/FixSplits.tsxindex 17d712ad14..b7d65af70a 100644--- a/packages/desktop-client/src/components/settings/FixSplits.tsx+++ b/packages/desktop-client/src/components/settings/FixSplits.tsx@@ -1,5 +1,7 @@import React, { useState } from 'react';+import { t } from 'i18next';+import { send } from 'loot-core/src/platform/client/fetch';import { type Handlers } from 'loot-core/src/types/handlers';@@ -16,6 +18,7 @@ type Results = Awaited<ReturnType<Handlers['tools/fix-split-transactions']>>;function renderResults(results: Results) {const { numBlankPayees, numCleared, numDeleted } = results;let result = '';+if (numBlankPayees === 0 && numCleared === 0 && numDeleted === 0) {result = 'No split transactions found needing repair.';} else {@@ -75,31 +78,28 @@ export function FixSplits() {}}><ButtonWithLoading isLoading={loading} onPress={onFix}>- Repair split transactions+ {t('Repair split transactions')}</ButtonWithLoading>{results && renderResults(results)}</View>}><Text>- <strong>Repair split transactions</strong> if you are experiencing bugs- relating to split transactions and the “Reset budget cache” button above- does not help, this tool may fix them. Some examples of bugs include- seeing blank payees on splits or incorrect account balances. This tool- does two things:+ <strong>{t('Repair split transactions')}</strong>+ {t(+ ' if you are experiencing bugs relating to split transactions and the “Reset budget cache” button above does not help, this tool may fix them. Some examples of bugs include seeing blank payees on splits or incorrect account balances. This tool does two things:',+ )}</Text><ul style={{ margin: 0, paddingLeft: '1.5em' }}><li style={{ marginBottom: '0.5em' }}>- Ensures that deleted split transactions are fully deleted. In previous- versions of the app, certain split transactions may appear deleted but- not all of them are actually deleted. This causes the transactions- list to look correct, but certain balances may be incorrect when- filtering.+ {t(+ 'Ensures that deleted split transactions are fully deleted. In previous versions of the app, certain split transactions may appear deleted but not all of them are actually deleted. This causes the transactions list to look correct, but certain balances may be incorrect when filtering.',+ )}</li><li>- Sync the payee and cleared flag of a split transaction to the main or- “parent” transaction, if appropriate. The payee will only be set if it- currently doesn’t have one.+ {t(+ 'Sync the payee and cleared flag of a split transaction to the main or “parent” transaction, if appropriate. The payee will only be set if it currently doesn’t have one.',+ )}</li></ul></Setting>diff --git a/packages/desktop-client/src/components/settings/Format.tsx b/packages/desktop-client/src/components/settings/Format.tsxindex 0ebe7f4cb7..131a57c4e3 100644--- a/packages/desktop-client/src/components/settings/Format.tsx+++ b/packages/desktop-client/src/components/settings/Format.tsx@@ -2,6 +2,7 @@import React, { type ReactNode } from 'react';import { css } from '@emotion/css';+import { t } from 'i18next';import { numberFormats } from 'loot-core/src/shared/util';import { type SyncedPrefs } from 'loot-core/src/types/prefs';@@ -89,7 +90,7 @@ export function FormatSettings() {},}}>- <Column title="Numbers">+ <Column title={t('Numbers')}><Selectkey={String(hideFraction)} // needed because label does not updatevalue={numberFormat}@@ -109,11 +110,13 @@ export function FormatSettings() {setHideFractionPref(String(e.currentTarget.checked))}/>- <label htmlFor="settings-textDecimal">Hide decimal places</label>+ <label htmlFor="settings-textDecimal">+ {t('Hide decimal places')}+ </label></Text></Column>- <Column title="Dates">+ <Column title={t('Dates')}><Selectvalue={dateFormat}onChange={format => setDateFormatPref(format)}@@ -122,7 +125,7 @@ export function FormatSettings() {/></Column>- <Column title="First day of the week">+ <Column title={t('First day of the week')}><Selectvalue={firstDayOfWeekIdx}onChange={idx => setFirstDayOfWeekIdxPref(idx)}@@ -134,8 +137,10 @@ export function FormatSettings() {}><Text>- <strong>Formatting</strong> does not affect how budget data is stored,- and can be changed at any time.+ <strong>{t('Formatting')}</strong>+ {t(+ ' does not affect how budget data is stored, and can be changed at any time.',+ )}</Text></Setting>);diff --git a/packages/desktop-client/src/components/settings/Reset.tsx b/packages/desktop-client/src/components/settings/Reset.tsxindex 7df45afd1b..193bb2565e 100644--- a/packages/desktop-client/src/components/settings/Reset.tsx+++ b/packages/desktop-client/src/components/settings/Reset.tsx@@ -1,5 +1,7 @@import React, { useState } from 'react';+import { t } from 'i18next';+import { send } from 'loot-core/src/platform/client/fetch';import { useActions } from '../../hooks/useActions';@@ -22,16 +24,15 @@ export function ResetCache() {<SettingprimaryAction={<ButtonWithLoading isLoading={resetting} onPress={onResetCache}>- Reset budget cache+ {t('Reset budget cache')}</ButtonWithLoading>}><Text>- <strong>Reset budget cache</strong> will clear all cached values for the- budget and recalculate the entire budget. All values in the budget are- cached for performance reasons, and if there is a bug in the cache you- won’t see correct values. There is no danger in resetting the cache.- Hopefully you never have to do this.+ <strong>{t('Reset budget cache')}</strong>+ {t(+ ' will clear all cached values for the budget and recalculate the entire budget. All values in the budget are cached for performance reasons, and if there is a bug in the cache you won’t see correct values. There is no danger in resetting the cache. Hopefully you never have to do this.',+ )}</Text></Setting>);@@ -58,21 +59,21 @@ export function ResetSync() {isDisabled={!isEnabled}onPress={onResetSync}>- Reset sync+ {t('Reset sync')}</ButtonWithLoading>}>{isEnabled ? (<Text>- <strong>Reset sync</strong> will remove all local data used to track- changes for syncing, and create a fresh sync ID on the server. This- file on other devices will have to be re-downloaded to use the new- sync ID. Use this if there is a problem with syncing and you want to- start fresh.+ <strong>{t('Reset sync')}</strong>+ {t(+ ' will remove all local data used to track changes for syncing, and create a fresh sync ID on the server. This file on other devices will have to be re-downloaded to use the new sync ID. Use this if there is a problem with syncing and you want to start fresh.',+ )}</Text>) : (<Text>- <strong>Reset sync</strong> is only available when syncing is enabled.+ <strong>{t('Reset sync')}</strong>+ {t(' is only available when syncing is')}</Text>)}</Setting>diff --git a/packages/desktop-client/src/components/settings/Themes.tsx b/packages/desktop-client/src/components/settings/Themes.tsxindex 84c80a67ca..838f5a0a68 100644--- a/packages/desktop-client/src/components/settings/Themes.tsx+++ b/packages/desktop-client/src/components/settings/Themes.tsx@@ -1,6 +1,7 @@import React, { type ReactNode } from 'react';import { css } from '@emotion/css';+import { t } from 'i18next';import { type DarkTheme, type Theme } from 'loot-core/types/prefs';@@ -91,7 +92,8 @@ export function ThemeSettings() {}><Text>- <strong>Themes</strong> change the user interface colors.+ <strong>{t('Themes')}</strong>+ {t(' change the user interface colors.')}</Text></Setting>);diff --git a/packages/desktop-client/src/components/settings/UI.tsx b/packages/desktop-client/src/components/settings/UI.tsxindex 95701598fb..a7162e0896 100644--- a/packages/desktop-client/src/components/settings/UI.tsx+++ b/packages/desktop-client/src/components/settings/UI.tsx@@ -2,6 +2,7 @@ import React, { useState, type ReactNode, type CSSProperties } from 'react';import { useLocation } from 'react-router-dom';import { css } from '@emotion/css';+import { t } from 'i18next';import { theme } from '../../style';import { tokens } from '../../tokens';@@ -73,7 +74,7 @@ export const AdvancedToggle = ({ children }: AdvancedToggleProps) => {}}><View style={{ fontSize: 20, fontWeight: 500, flexShrink: 0 }}>- Advanced Settings+ {t('Advanced Settings')}</View>{children}</View>@@ -89,7 +90,7 @@ export const AdvancedToggle = ({ children }: AdvancedToggleProps) => {marginBottom: 25,}}>- Show advanced settings+ {t('Show advanced settings')}</Link>);};diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsxindex f65fabf8e2..28239f3360 100644--- a/packages/desktop-client/src/components/settings/index.tsx+++ b/packages/desktop-client/src/components/settings/index.tsx@@ -1,6 +1,7 @@import React, { type ReactNode, useEffect } from 'react';import { css } from '@emotion/css';+import { t } from 'i18next';import { isElectron } from 'loot-core/shared/environment';import { listen } from 'loot-core/src/platform/client/fetch';@@ -42,8 +43,8 @@ function About() {return (<Setting><Text>- <strong>Actual</strong> is a super fast privacy-focused app for managing- your finances.+ <strong>{t('Actual')}</strong>+ {t(' is a super fast privacy-focused app for managing your finances.')}</Text><Viewstyle={{@@ -69,11 +70,11 @@ function About() {to="https://actualbudget.org/docs/releases"linkColor="purple">- New version available: {latestVersion}+ {t('New version available:')} {latestVersion}</Link>) : (<Text style={{ color: theme.noticeText, fontWeight: 600 }}>- You’re up to date!+ {t('You’re up to date!')}</Text>)}<Text>@@ -82,7 +83,7 @@ function About() {to="https://actualbudget.org/docs/releases"linkColor="purple">- Release Notes+ {t('Release Notes')}</Link></Text></View>@@ -101,16 +102,16 @@ function AdvancedAbout() {return (<Setting><Text>- <strong>IDs</strong> are the names Actual uses to identify your budget- internally. There are several different IDs associated with your budget.- The Budget ID is used to identify your budget file. The Sync ID is used- to access the budget on the server.+ <strong>{t('IDs')}</strong>+ {t(+ ' are the names Actual uses to identify your budget internally. There are several different IDs associated with your budget. The Budget ID is used to identify your budget file. The Sync ID is used to access the budget on the server.',+ )}</Text><Text>- <IDName>Budget ID:</IDName> {budgetId}+ <IDName>{t('Budget ID:')}</IDName> {budgetId}</Text><Text style={{ color: theme.pageText }}>- <IDName>Sync ID:</IDName> {groupId || '(none)'}+ <IDName>{t('Sync ID:')}</IDName> {groupId || '(none)'}</Text>{/* low priority todo: eliminate some or all of these, or decide when/if to show them */}{/* <Text>@@ -142,7 +143,7 @@ export function Settings() {return (<Page- header="Settings"+ header={t('Settings')}style={{marginInline: floatingSidebar && !isNarrowWidth ? 'auto' : 0,paddingBottom: MOBILE_NAV_HEIGHT,@@ -162,14 +163,14 @@ export function Settings() {>{/* The only spot to close a budget on mobile */}<FormField>- <FormLabel title="Budget Name" />+ <FormLabel title={t('Budget Name')} /><Inputvalue={budgetName}disabledstyle={{ color: theme.buttonNormalDisabledText }}/></FormField>- <Button onPress={closeBudget}>Close Budget</Button>+ <Button onPress={closeBudget}>{t('Close Budget')}</Button></View>)}<About />diff --git a/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx b/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsxindex 214a4fb464..51063cc860 100644--- a/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx+++ b/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx@@ -39,7 +39,7 @@ export function PrimaryButtons() {<Item title={t('Reports')} Icon={SvgReports} to="/reports" /><Item title={t('Schedules')} Icon={SvgCalendar} to="/schedules" /><Item- title="More"+ title={t('More')}Icon={isOpen ? SvgCheveronDown : SvgCheveronRight}onClick={onToggle}style={{ marginBottom: isOpen ? 8 : 0 }}diff --git a/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsx b/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsxindex a623353769..9001c17fbb 100644--- a/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsx+++ b/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsx@@ -5,6 +5,7 @@ import {isValid as isDateValid,parseISO,} from 'date-fns';+import { t } from 'i18next';import {getAccountsById,@@ -198,43 +199,43 @@ export function SimpleTransactionsTable({case 'date':return (<Field key={i} width={100}>- Date+ {t('Date')}</Field>);case 'imported_payee':return (<Field key={i} width="flex">- Imported payee+ {t('Imported payee')}</Field>);case 'payee':return (<Field key={i} width="flex">- Payee+ {t('Payee')}</Field>);case 'category':return (<Field key={i} width="flex">- Category+ {t('Category')}</Field>);case 'account':return (<Field key={i} width="flex">- Account+ {t('Account')}</Field>);case 'notes':return (<Field key={i} width="flex">- Notes+ {t('Notes')}</Field>);case 'amount':return (<Field key={i} width={75} style={{ textAlign: 'right' }}>- Amount+ {t('Amount')}</Field>);default:diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx b/packages/desktop-client/src/components/transactions/TransactionsTable.jsxindex 136aad2069..86633405bd 100644--- a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx+++ b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx@@ -11,6 +11,7 @@ import React, {useEffect,} from 'react';import { useHotkeys } from 'react-hotkeys-hook';+import { useTranslation } from 'react-i18next';import { useDispatch } from 'react-redux';import { css } from '@emotion/css';@@ -179,6 +180,7 @@ const TransactionHeader = memo(field,}) => {const dispatchSelected = useSelectedDispatch();+ const { t } = useTranslation();useHotkeys('ctrl+a, cmd+a, meta+a',@@ -217,7 +219,7 @@ const TransactionHeader = memo(}/><HeaderCell- value="Date"+ value={t('Date')}width={110}alignItems="flex"marginLeft={-5}@@ -229,7 +231,7 @@ const TransactionHeader = memo(/>{showAccount && (<HeaderCell- value="Account"+ value={t('Account')}width="flex"alignItems="flex"marginLeft={-5}@@ -241,7 +243,7 @@ const TransactionHeader = memo(/>)}<HeaderCell- value="Payee"+ value={t('Payee')}width="flex"alignItems="flex"marginLeft={-5}@@ -252,7 +254,7 @@ const TransactionHeader = memo(}/><HeaderCell- value="Notes"+ value={t('Notes')}width="flex"alignItems="flex"marginLeft={-5}@@ -264,7 +266,7 @@ const TransactionHeader = memo(/>{showCategory && (<HeaderCell- value="Category"+ value={t('Category')}width="flex"alignItems="flex"marginLeft={-5}@@ -279,7 +281,7 @@ const TransactionHeader = memo(/>)}<HeaderCell- value="Payment"+ value={t('Payment')}width={100}alignItems="flex-end"marginRight={-5}@@ -290,7 +292,7 @@ const TransactionHeader = memo(}/><HeaderCell- value="Deposit"+ value={t('Deposit')}width={100}alignItems="flex-end"marginRight={-5}@@ -302,7 +304,7 @@ const TransactionHeader = memo(/>{showBalance && (<HeaderCell- value="Balance"+ value={t('Balance')}width={103}alignItems="flex-end"marginRight={-5}diff --git a/packages/desktop-client/src/components/util/AmountInput.tsx b/packages/desktop-client/src/components/util/AmountInput.tsxindex 1b8fd0df87..1cc0bc5c76 100644--- a/packages/desktop-client/src/components/util/AmountInput.tsx+++ b/packages/desktop-client/src/components/util/AmountInput.tsx@@ -9,6 +9,8 @@ import React, {type CSSProperties,} from 'react';+import { t } from 'i18next';+import { evalArithmetic } from 'loot-core/src/shared/arithmetic';import { amountToInteger, appendDecimals } from 'loot-core/src/shared/util';@@ -167,7 +169,7 @@ export function BetweenAmountInput({ defaultValue, onChange }) {}}style={{ color: theme.formInputText }}/>- <View style={{ margin: '0 5px' }}>and</View>+ <View style={{ margin: '0 5px' }}>{t('and')}</View><AmountInputvalue={num2}onUpdate={value => {diff --git a/packages/loot-core/src/platform/server/fs/index.electron.ts b/packages/loot-core/src/platform/server/fs/index.electron.tsindex 9d78de4bcb..a0508c9d44 100644--- a/packages/loot-core/src/platform/server/fs/index.electron.ts+++ b/packages/loot-core/src/platform/server/fs/index.electron.ts@@ -130,7 +130,6 @@ export const writeFile: T.WriteFile = async (filepath, contents) => {`Successfully recovered from file lock. It took ${attempt} retries`,);}-resolve(undefined);}});diff --git a/packages/loot-core/src/server/accounts/qif2json.ts b/packages/loot-core/src/server/accounts/qif2json.tsindex 0e7a626c9b..09399ecb91 100644--- a/packages/loot-core/src/server/accounts/qif2json.ts+++ b/packages/loot-core/src/server/accounts/qif2json.ts@@ -96,7 +96,6 @@ export function qif2json(qif, options: { dateFormat?: string } = {}) {}transaction.division.push(division);division = {};-break;default:diff --git a/upcoming-release-notes/3752.md b/upcoming-release-notes/3752.mdnew file mode 100644index 0000000000..057317c682--- /dev/null+++ b/upcoming-release-notes/3752.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [awaisalee]+---++Enhance app with i18n translations