A local-first personal finance app
🌍 improve translation strings - part 1 (#4041)
Matt Fiddaman39cfa11b2593
diff --git a/packages/desktop-client/e2e/page-models/navigation.js b/packages/desktop-client/e2e/page-models/navigation.jsindex a8463d0767..8e468847cd 100644--- a/packages/desktop-client/e2e/page-models/navigation.js+++ b/packages/desktop-client/e2e/page-models/navigation.js@@ -58,7 +58,7 @@ export class Navigation {async createAccount(data) {await this.page.getByRole('button', { name: 'Add account' }).click();await this.page- .getByRole('button', { name: 'Create local account' })+ .getByRole('button', { name: 'Create a local account' }).click();// Fill the formdiff --git a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.pngindex 00c1b8960a..6b30e1f83d 100644Binary files a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.pngindex 96bea65dc0..d2d12ec45e 100644Binary files a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.pngindex 32496ff33a..3323d06135 100644Binary files a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.pngindex 8f51e4c260..279a7d0d5c 100644Binary files a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.pngindex 65acd67269..3ed1de4a26 100644Binary files a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.pngindex 3c30f39ac5..55debabf7f 100644Binary files a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-4-chromium-linux.png b/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-4-chromium-linux.pngindex d8f0b77169..cd517191cf 100644Binary files a/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-4-chromium-linux.png and b/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-4-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-5-chromium-linux.png b/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-5-chromium-linux.pngindex 85d5c95b92..3ceeed398b 100644Binary files a/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-5-chromium-linux.png and b/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-5-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-6-chromium-linux.png b/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-6-chromium-linux.pngindex ea297f12c6..0ed24ec6d8 100644Binary files a/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-6-chromium-linux.png and b/packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-6-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.pngindex 18d6f7f5e5..5d39366571 100644Binary files a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.pngindex d95e18307d..f65196d93c 100644Binary files a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.pngindex 38ed8bfcb4..56cce417d6 100644Binary files a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png and b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png differdiff --git a/packages/desktop-client/src/components/App.tsx b/packages/desktop-client/src/components/App.tsxindex 431bed29fb..acc0f361c8 100644--- a/packages/desktop-client/src/components/App.tsx+++ b/packages/desktop-client/src/components/App.tsx@@ -134,7 +134,7 @@ function AppInner() {id: 'login-expired',title: t('Login expired'),sticky: true,- message: t('Login expired, please login again.'),+ message: t('Login expired, please log in again.'),button: {title: t('Go to login'),action: signOut,diff --git a/packages/desktop-client/src/components/LoggedInUser.tsx b/packages/desktop-client/src/components/LoggedInUser.tsxindex 982b1ae9b4..0c0662d385 100644--- a/packages/desktop-client/src/components/LoggedInUser.tsx+++ b/packages/desktop-client/src/components/LoggedInUser.tsx@@ -6,6 +6,7 @@ import { useLocation } from 'react-router-dom';import { closeBudget, getUserData, signOut } from 'loot-core/client/actions';import { type State } from 'loot-core/src/client/state-types';import { type RemoteFile, type SyncedLocalFile } from 'loot-core/types/file';+import { type TransObjectLiteral } from 'loot-core/types/util';import { useAuth } from '../auth/AuthProvider';import { Permissions } from '../auth/types';@@ -205,9 +206,14 @@ export function LoggedInUser({userData?.displayName &&!hasSyncedPrefs && (<small>+ (<Trans>- (logged in as: <span>{userData?.displayName}</span>)+ logged in as:{' '}+ <span>+ {{ userName: userData?.displayName } as TransObjectLiteral}+ </span></Trans>+ )</small>)}{!loading &&@@ -216,13 +222,16 @@ export function LoggedInUser({userData?.displayName &&hasSyncedPrefs && (<small>+ (<Trans>- (logged in as:{' '}+ logged in as:{' '}<span>- <PrivacyFilter>{userData?.displayName}</PrivacyFilter>+ <PrivacyFilter>+ {{ userName: userData?.displayName } as TransObjectLiteral}+ </PrivacyFilter></span>- )</Trans>+ )</small>)}diff --git a/packages/desktop-client/src/components/Modals.tsx b/packages/desktop-client/src/components/Modals.tsxindex f0c008c141..013d4672fe 100644--- a/packages/desktop-client/src/components/Modals.tsx+++ b/packages/desktop-client/src/components/Modals.tsx@@ -302,7 +302,7 @@ export function Modals() {/>)}inputPlaceholder={t('Category name')}- buttonText="Add"+ buttonText={t('Add')}onValidate={options.onValidate}onSubmit={options.onSubmit}/>diff --git a/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx b/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsxindex 0d3e24c904..489b6e92e1 100644--- a/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx+++ b/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx@@ -68,7 +68,7 @@ function useErrorMessage() {return (<Trans>- An internal error occurred. Try to login again, or get{' '}+ An internal error occurred. Try to log in again, or get{' '}<Link variant="external" to="https://actualbudget.org/contact/">in touch</Link>{' '}diff --git a/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx b/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsxindex 5183f86bde..61c89c97a1 100644--- a/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx+++ b/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx@@ -163,15 +163,15 @@ function UserAccessContent({><Text><Trans>- Determine which users can view and manage your budgets..{' '}- <Link- variant="external"- to="https://actualbudget.org/docs/budgeting/users-access/"- linkColor="muted"- >- Learn more- </Link>- </Trans>+ Determine which users can view and manage your budgets+ </Trans>{' '}+ <Link+ variant="external"+ to="https://actualbudget.org/docs/budgeting/users-access/"+ linkColor="muted"+ >+ <Trans>Learn more</Trans>+ </Link></Text></View><View style={{ flex: 1 }} />diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsxindex f5b59d57a4..711b7baebf 100644--- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx+++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx@@ -46,7 +46,7 @@ function useGetUserDirectoryErrors() {case 'unauthorized':return t('You are not logged in.');case 'token-expired':- return t('Login expired, please login again.');+ return t('Login expired, please log in again.');case 'user-cant-be-empty':return t('Please enter a value for the username; the field cannot be empty.',@@ -232,15 +232,15 @@ function UserDirectoryContent({<Text><Trans>Manage and view users who can create new budgets or be invited- to access existing ones.{' '}- <Link- variant="external"- to="https://actualbudget.org/docs/budgeting/users/"- linkColor="muted"- >- Learn more- </Link>- </Trans>+ to access existing ones.+ </Trans>{' '}+ <Link+ variant="external"+ to="https://actualbudget.org/docs/budgeting/users/"+ linkColor="muted"+ >+ <Trans>Learn more</Trans>+ </Link></Text></View><View style={{ flex: 1 }} />@@ -282,7 +282,7 @@ function UserDirectoryContent({<Stack direction="row" align="center" justify="flex-end" spacing={2}>{selectedInst.items.size > 0 && (<Button onPress={onDeleteSelected}>- <Trans> Delete {selectedInst.items.size} users </Trans>+ <Trans>Delete {{ count: selectedInst.items.size }} users</Trans></Button>)}<Button variant="primary" onPress={onAddUser}>diff --git a/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsxindex 63d054d1e9..1328b14ff3 100644--- a/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx+++ b/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx@@ -454,12 +454,12 @@ export function PayeeAutocomplete({setFocusTransferPayees(!focusTransferPayees);}}>- <Trans>Make Transfer</Trans>+ <Trans>Make transfer</Trans></Button>)}{showManagePayees && (<Button type="menu" onClick={() => onManagePayees()}>- <Trans>Manage Payees</Trans>+ <Trans>Manage payees</Trans></Button>)}</AutocompleteFooter>diff --git a/packages/desktop-client/src/components/budget/IncomeHeader.tsx b/packages/desktop-client/src/components/budget/IncomeHeader.tsxindex 5b657a569b..193188fcf9 100644--- a/packages/desktop-client/src/components/budget/IncomeHeader.tsx+++ b/packages/desktop-client/src/components/budget/IncomeHeader.tsx@@ -25,7 +25,7 @@ export function IncomeHeader({}}><Button onPress={onShowNewGroup} style={{ fontSize: 12, margin: 10 }}>- <Trans>Add Group</Trans>+ <Trans>Add group</Trans></Button></View><RenderMonthsdiff --git a/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx b/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsxindex a058630b08..f93432bc6e 100644--- a/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx+++ b/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx@@ -29,7 +29,7 @@ export function ChangePassword() {case 'network-failure':return 'Unable to contact the server';default:- return 'Internal server error';+ return 'Internal error';}}diff --git a/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx b/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsxindex 0355a89732..30f7171e02 100644--- a/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx+++ b/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx@@ -74,7 +74,7 @@ export function OpenIdForm({addNotification({type: 'error',id: 'error',- title: t('Error getting openid config'),+ title: t('Error getting OpenID config'),sticky: true,message: config.error,});diff --git a/packages/desktop-client/src/components/manager/subscribe/common.tsx b/packages/desktop-client/src/components/manager/subscribe/common.tsxindex be7729f7eb..e172daffdb 100644--- a/packages/desktop-client/src/components/manager/subscribe/common.tsx+++ b/packages/desktop-client/src/components/manager/subscribe/common.tsx@@ -18,7 +18,7 @@ import {// and make sure the user is looking at the right page. For example,// it doesn't make sense to show the login page if the server doesn't// have any accounts yet. It also doesn't make sense to show the-// bootstrap page if the server already has been setup with a+// bootstrap page if the server already has been set up with a// password. Both pages will redirect to the other depending on state;// they will also potentially redirect to other pages which do *not*// do any checks.diff --git a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx b/packages/desktop-client/src/components/modals/CloseAccountModal.tsxindex 5e808a334d..2b476bd37d 100644--- a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx+++ b/packages/desktop-client/src/components/modals/CloseAccountModal.tsx@@ -1,7 +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 useTranslation+import { useTranslation, Trans } from 'react-i18next';import { useDispatch } from 'react-redux';import {@@ -11,6 +11,7 @@ import {} from 'loot-core/client/actions';import { integerToCurrency } from 'loot-core/src/shared/util';import { type AccountEntity } from 'loot-core/src/types/models';+import { type TransObjectLiteral } from 'loot-core/types/util';import { useAccounts } from '../../hooks/useAccounts';import { useCategories } from '../../hooks/useCategories';@@ -119,17 +120,26 @@ export function CloseAccountModal({/><View><Paragraph>- {t('Are you sure you want to close ')}- <strong>{account.name}</strong>?{' '}+ <Trans>+ Are you sure you want to close{' '}+ <strong>+ {{ accountName: account.name } as TransObjectLiteral}+ </strong>+ ?{' '}+ </Trans>{canDelete ? (<span>- This account has no transactions so it will be permanently- deleted.+ <Trans>+ This account has no transactions so it will be permanently+ deleted.+ </Trans></span>) : (<span>- This account has transactions so we can’t permanently delete- it.+ <Trans>+ This account has transactions so we can’t permanently delete+ it.+ </Trans></span>)}</Paragraph>@@ -142,10 +152,18 @@ export function CloseAccountModal({{balance !== 0 && (<View><Paragraph>- This account has a balance of{' '}- <strong>{integerToCurrency(balance)}</strong>. To close this- account, select a different account to transfer this balance- to:+ <Trans>+ This account has a balance of{' '}+ <strong>+ {+ {+ balance: integerToCurrency(balance),+ } as TransObjectLiteral+ }+ </strong>+ . To close this account, select a different account to+ transfer this balance to:+ </Trans></Paragraph><View style={{ marginBottom: 15 }}>@@ -176,16 +194,18 @@ export function CloseAccountModal({{transferError && (<FormError style={{ marginBottom: 15 }}>- {t('Transfer is required')}+ <Trans>Transfer is required</Trans></FormError>)}{needsCategory(account, transferAccountId, accounts) && (<View style={{ marginBottom: 15 }}><Paragraph>- Since you are transferring the balance from an on budget- account to an off budget account, this transaction must- be categorized. Select a category:+ <Trans>+ Since you are transferring the balance from an on+ budget account to an off budget account, this+ transaction must be categorized. Select a category:+ </Trans></Paragraph><CategoryAutocomplete@@ -213,7 +233,9 @@ export function CloseAccountModal({/>{categoryError && (- <FormError>{t('Category is required')}</FormError>+ <FormError>+ <Trans>Category is required</Trans>+ </FormError>)}</View>)}@@ -223,22 +245,24 @@ export function CloseAccountModal({{!canDelete && (<View style={{ marginBottom: 15 }}><Text style={{ fontSize: 12 }}>- {t('You can also')}{' '}- <Link- variant="text"- onClick={() => {- setLoading(true);+ <Trans>+ You can also{' '}+ <Link+ variant="text"+ onClick={() => {+ setLoading(true);- dispatch(forceCloseAccount(account.id));- close();- }}- style={{ color: theme.errorText }}- >- {t('force close')}- </Link>{' '}- the account which will delete it and all its transactions- permanently. Doing so may change your budget unexpectedly- since money in it may vanish.+ dispatch(forceCloseAccount(account.id));+ close();+ }}+ style={{ color: theme.errorText }}+ >+ force close+ </Link>{' '}+ the account which will delete it and all its transactions+ permanently. Doing so may change your budget unexpectedly+ since money in it may vanish.+ </Trans></Text></View>)}@@ -256,7 +280,7 @@ export function CloseAccountModal({}}onPress={close}>- {t('Cancel')}+ <Trans>Cancel</Trans></Button><Buttontype="submit"@@ -265,7 +289,7 @@ export function CloseAccountModal({height: isNarrowWidth ? styles.mobileMinHeight : undefined,}}>- {t('Close Account')}+ <Trans>Close Account</Trans></Button></View></Form>diff --git a/packages/desktop-client/src/components/modals/CreateAccountModal.tsx b/packages/desktop-client/src/components/modals/CreateAccountModal.tsxindex 7245a399d3..85d438a65f 100644--- a/packages/desktop-client/src/components/modals/CreateAccountModal.tsx+++ b/packages/desktop-client/src/components/modals/CreateAccountModal.tsx@@ -177,12 +177,12 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {setIsSimpleFinSetupComplete(configuredSimpleFin);}, [configuredSimpleFin]);- let title = t('Add Account');+ let title = t('Add account');const [loadingSimpleFinAccounts, setLoadingSimpleFinAccounts] =useState(false);if (upgradingAccountId != null) {- title = t('Link Account');+ title = t('Link account');}const canSetSecrets =@@ -209,23 +209,23 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {}}onPress={onCreateLocalAccount}>- {t('Create local account')}+ {t('Create a local account')}</Button></InitialFocus><View style={{ lineHeight: '1.4em', fontSize: 15 }}><Text>- <strong>{t('Create a local account')}</strong>{' '}- {t(- 'if you want to add transactions manually. You can also',- )}{' '}- <Link- variant="external"- to="https://actualbudget.org/docs/transactions/importing"- linkColor="muted"- >- {t('import QIF/OFX/QFX files into a local account')}- </Link>- .+ <Trans>+ <strong>Create a local account</strong> if you want to add+ transactions manually. You can also{' '}+ <Link+ variant="external"+ to="https://actualbudget.org/docs/transactions/importing"+ linkColor="muted"+ >+ import QIF/OFX/QFX files into a local account+ </Link>+ .+ </Trans></Text></View></View>@@ -288,13 +288,16 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {)}</View><Text style={{ lineHeight: '1.4em', fontSize: 15 }}>- <strong>- {t('Link a')} <em>{t('European')}</em>{' '}- {t('bank account')}- </strong>{' '}- {t(- 'to automatically download transactions. GoCardless provides reliable, up-to-date information from hundreds of banks.',- )}+ <Trans>+ <strong>+ Link a <em>European</em> bank account+ </strong>{' '}+ to automatically download transactions.+ </Trans>+ <Trans>+ GoCardless provides reliable, up-to-date information+ from hundreds of banks.+ </Trans></Text><Viewstyle={{@@ -350,13 +353,16 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {)}</View><Text style={{ lineHeight: '1.4em', fontSize: 15 }}>- <strong>- {t('Link a')} <em>{t('North American')}</em>- {t(' bank account')}- </strong>{' '}- {t(- 'to automatically download transactions. SimpleFIN provides reliable, up-to-date information from hundreds of banks.',- )}{' '}+ <Trans>+ <strong>+ Link a <em>North American</em> bank account+ </strong>{' '}+ to automatically download transactions.+ </Trans>+ <Trans>+ SimpleFIN provides reliable, up-to-date information+ from hundreds of banks.+ </Trans></Text></>)}@@ -387,18 +393,20 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) {fontWeight: 600,}}>- {t('Set up bank sync')}+ <Trans>Set up bank sync</Trans></Button><Paragraph style={{ fontSize: 15 }}>- {t('Connect to an Actual server to set up')}{' '}- <Link- variant="external"- to="https://actualbudget.org/docs/advanced/bank-sync"- linkColor="muted"- >- {t('automatic syncing')}- </Link>- .+ <Trans>+ Connect to an Actual server to set up{' '}+ <Link+ variant="external"+ to="https://actualbudget.org/docs/advanced/bank-sync"+ linkColor="muted"+ >+ automatic syncing+ </Link>+ .+ </Trans></Paragraph></>)}diff --git a/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx b/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsxindex b513a58a83..77ec1b9eb7 100644--- a/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx+++ b/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx@@ -1,7 +1,7 @@// @ts-strict-ignoreimport React, { useState } from 'react';import { Form } from 'react-aria-components';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { useDispatch } from 'react-redux';import { css } from '@emotion/css';@@ -87,11 +87,13 @@ export function CreateEncryptionKeyModal({{!isRecreating ? (<><Paragraph style={{ marginTop: 5 }}>- To enable end-to-end encryption, you need to create a key. We- will generate a key based on a password and use it to encrypt- from now on. <strong>This requires a sync reset</strong> and- all other devices will have to revert to this version of your- data.{' '}+ <Trans>+ To enable end-to-end encryption, you need to create a key.+ We will generate a key based on a password and use it to+ encrypt from now on.{' '}+ <strong>This requires a sync reset</strong> and all other+ devices will have to revert to this version of your data.{' '}+ </Trans><Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"@@ -108,25 +110,32 @@ export function CreateEncryptionKeyModal({})}><li>- <strong>Important:</strong> if you forget this password{' '}- <em>and</em> you don’t have any local copies of your data,- you will lose access to all your data. The data cannot be- decrypted without the password.+ <Trans>+ <strong>Important:</strong> if you forget this password{' '}+ <em>and</em> you don’t have any local copies of your+ data, you will lose access to all your data. The data+ cannot be decrypted without the password.+ </Trans></li><li>- {t(- 'This key only applies to this file. You will need to generate a new key for each file you want to encrypt.',- )}+ <Trans>+ This key only applies to this file. You will need to+ generate a new key for each file you want to encrypt.+ </Trans></li><li>- {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.',- )}+ <Trans>+ If you’ve already downloaded your data on other devices,+ you will need to reset them. Actual will automatically+ take you through this process.+ </Trans></li><li>- {t(- 'It is recommended for the encryption password to be different than the log-in password in order to better protect your data.',- )}+ <Trans>+ It is recommended for the encryption password to be+ different than the log-in password in order to better+ protect your data.+ </Trans></li></ul></Paragraph>@@ -134,23 +143,26 @@ export function CreateEncryptionKeyModal({) : (<><Paragraph style={{ marginTop: 5 }}>- {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.',- )}{' '}+ <Trans>+ 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.+ </Trans>{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- {t('Learn more')}+ <Trans>Learn more</Trans></Link></Paragraph><Paragraph>- {t(- 'Key generation is randomized. The same password will create different keys, so this will change your key regardless of the password being different.',- )}+ <Trans>+ Key generation is randomized. The same password will create+ different keys, so this will change your key regardless of+ the password being different.+ </Trans></Paragraph></>)}@@ -163,7 +175,7 @@ export function CreateEncryptionKeyModal({><View style={{ alignItems: 'center' }}><Text style={{ fontWeight: 600, marginBottom: 3 }}>- {t('Password')}+ <Trans>Password</Trans></Text>{error && (@@ -195,7 +207,7 @@ export function CreateEncryptionKeyModal({type="checkbox"onClick={() => setShowPassword(!showPassword)}/>{' '}- {t('Show password')}+ <Trans>Show password</Trans></label></Text></View>@@ -209,7 +221,7 @@ export function CreateEncryptionKeyModal({isLoading={loading}variant="primary">- {t('Enable')}+ <Trans>Enable</Trans></ButtonWithLoading></ModalButtons></Form>diff --git a/packages/desktop-client/src/components/modals/EditRuleModal.jsx b/packages/desktop-client/src/components/modals/EditRuleModal.jsxindex 649a923647..78599bb261 100644--- a/packages/desktop-client/src/components/modals/EditRuleModal.jsx+++ b/packages/desktop-client/src/components/modals/EditRuleModal.jsx@@ -1,5 +1,5 @@import React, { useState, useEffect, useRef, useMemo } from 'react';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { useDispatch } from 'react-redux';import { css } from '@emotion/css';@@ -304,7 +304,6 @@ function formatAmount(amount) {}function ScheduleDescription({ id }) {- const { t } = useTranslation();const dateFormat = useDateFormat() || 'MM/dd/yyyy';const scheduleQuery = useMemo(() => q('schedules').filter({ id }).select('*'),@@ -337,7 +336,7 @@ function ScheduleDescription({ id }) {textOverflow: 'ellipsis',}}>- {t('Payee')}:{' '}+ <Trans>Payee</Trans>:{' '}<DisplayIdtype="payees"id={schedule._payee}@@ -346,11 +345,12 @@ function ScheduleDescription({ id }) {</Text><Text style={{ margin: '0 5px' }}> — </Text><Text style={{ flexShrink: 0 }}>- {t('Amount')}: {formatAmount(schedule._amount)}+ <Trans>Amount</Trans>: {formatAmount(schedule._amount)}</Text><Text style={{ margin: '0 5px' }}> — </Text><Text style={{ flexShrink: 0 }}>- {t('Next')}: {monthUtils.format(schedule.next_date, dateFormat)}+ <Trans>Next</Trans>:{' '}+ {monthUtils.format(schedule.next_date, dateFormat)}</Text></View><StatusBadge status={status} />@@ -526,11 +526,11 @@ function StageInfo() {<View style={{ position: 'relative', marginLeft: 5 }}><Tooltipcontent={- <>+ <Trans>The stage of a rule allows you to force a specific order. Pre rulesalways run first, and post rules always run last. Within each stagerules are automatically ordered from least to most specific.- </>+ </Trans>}placement="bottom start"style={{@@ -704,7 +704,7 @@ function ConditionsList({return conditions.length === 0 ? (<Button style={{ alignSelf: 'flex-start' }} onPress={addInitialCondition}>- Add condition+ <Trans>Add condition</Trans></Button>) : (<Stack spacing={2} data-testid="condition-list">@@ -1046,26 +1046,28 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {padding: '0 20px',}}>- <Text style={{ marginRight: 15 }}>{t('Stage of rule:')}</Text>+ <Text style={{ marginRight: 15 }}>+ <Trans>Stage of rule:</Trans>+ </Text><Stack direction="row" align="center" spacing={1}><StageButtonselected={stage === 'pre'}onSelect={() => onChangeStage('pre')}>- {t('Pre')}+ <Trans>Pre</Trans></StageButton><StageButtonselected={stage === null}onSelect={() => onChangeStage(null)}>- {t('Default')}+ <Trans>Default</Trans></StageButton><StageButtonselected={stage === 'post'}onSelect={() => onChangeStage('post')}>- {t('Post')}+ <Trans>Post</Trans></StageButton><StageInfo />@@ -1084,18 +1086,20 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {<View style={{ flexShrink: 0 }}><View style={{ marginBottom: 30 }}><Text style={{ marginBottom: 15 }}>- {t('If')}- <FieldSelect- data-testid="conditions-op"- style={{ display: 'inline-flex' }}- fields={[- ['and', 'all'],- ['or', 'any'],- ]}- value={conditionsOp}- onChange={onChangeConditionsOp}- />- {t('of these conditions match:')}+ <Trans>+ If{' '}+ <FieldSelect+ data-testid="conditions-op"+ style={{ display: 'inline-flex' }}+ fields={[+ ['and', 'all'],+ ['or', 'any'],+ ]}+ value={conditionsOp}+ onChange={onChangeConditionsOp}+ />+ {{ allOrAny: '' }} of these conditions match:+ </Trans></Text><ConditionsList@@ -1108,7 +1112,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {</View><Text style={{ marginBottom: 15 }}>- {t('Then apply these actions:')}+ <Trans>Then apply these actions:</Trans></Text><View style={{ flex: 1 }}>{actionSplits.length === 0 && (@@ -1116,7 +1120,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {style={{ alignSelf: 'flex-start' }}onPress={addInitialAction}>- {t('Add action')}+ <Trans>Add action</Trans></Button>)}<Stack spacing={2} data-testid="action-split-list">@@ -1205,7 +1209,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {addActionToSplitAfterIndex(splitIndex, -1)}>- {t('Add action')}+ <Trans>Add action</Trans></Button>)}</View>@@ -1238,7 +1242,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {}}><Text style={{ color: theme.pageTextLight, marginBottom: 0 }}>- {t('This rule applies to these transactions:')}+ <Trans>This rule applies to these transactions:</Trans></Text><View style={{ flex: 1 }} />@@ -1246,7 +1250,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {isDisabled={selectedInst.items.size === 0}onPress={onApply}>- {t('Apply actions')} ({selectedInst.items.size})+ <Trans>Apply actions</Trans> ({selectedInst.items.size})</Button></View>@@ -1269,7 +1273,7 @@ export function EditRuleModal({ defaultRule, onSave: originalOnSave }) {><Button onClick={close}>{t('Cancel')}</Button><Button variant="primary" onPress={() => onSave(close)}>- {t('Save')}+ <Trans>Save</Trans></Button></Stack></View>diff --git a/packages/desktop-client/src/components/modals/EditUser.tsx b/packages/desktop-client/src/components/modals/EditUser.tsxindex e8ddccca13..f71961ea03 100644--- a/packages/desktop-client/src/components/modals/EditUser.tsx+++ b/packages/desktop-client/src/components/modals/EditUser.tsx@@ -43,7 +43,7 @@ function useGetUserDirectoryErrors() {case 'unauthorized':return t('You are not logged in.');case 'token-expired':- return t('Login expired, please login again.');+ return t('Login expired, please log in again.');case 'user-cant-be-empty':return t('Please enter a value for the username; the field cannot be empty.',@@ -405,7 +405,7 @@ const RoleDescription = () => {}}><Trans>- Also can assign ownership of a budget to another person, ensuring+ Can also assign ownership of a budget to another person, ensuringefficient budget management.</Trans></Text>diff --git a/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx b/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsxindex d2b3730d5a..886fff3c88 100644--- a/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx+++ b/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx@@ -228,7 +228,7 @@ export function GoCardlessExternalMsgModal({onPress={onJump}isDisabled={!institutionId || !country}>- <Trans>Link bank in browser →</Trans>+ <Trans>Link bank in browser</Trans> →</Button></View></View>@@ -280,9 +280,11 @@ export function GoCardlessExternalMsgModal({onClick={onJump}style={{ marginTop: 10 }}>+ (<Trans>- (Account linking not opening in a new tab? Click here)+ Account linking not opening in a new tab? Click here</Trans>+ )</Link>)}</View>@@ -298,7 +300,7 @@ export function GoCardlessExternalMsgModal({}}onPress={onContinue}>- <Trans>Success! Click to continue →</Trans>+ <Trans>Success! Click to continue</Trans> →</Button>) : isConfigured || isGoCardlessSetupComplete ? (renderLinkButton()diff --git a/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx b/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsxindex d305caf15d..9137ad82e8 100644--- a/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx+++ b/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx@@ -1,6 +1,6 @@// @ts-strict-ignoreimport React, { useState } from 'react';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { getSecretsError } from 'loot-core/shared/errors';import { send } from 'loot-core/src/platform/client/fetch';@@ -83,22 +83,24 @@ export const GoCardlessInitialiseModal = ({{({ state: { close } }) => (<><ModalHeader- title={t('Set-up GoCardless')} // Translated title+ title={t('Set up GoCardless')}rightContent={<ModalCloseButton onPress={close} />}/><View style={{ display: 'flex', gap: 10 }}><Text>- {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',- )}{' '}- <Link- variant="external"- to="https://actualbudget.org/docs/advanced/bank-sync/"- linkColor="purple"- >- {t('GoCardless')}- </Link>- .+ <Trans>+ 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{' '}+ <Link+ variant="external"+ to="https://actualbudget.org/docs/advanced/bank-sync/"+ linkColor="purple"+ >+ GoCardless+ </Link>+ .+ </Trans></Text><FormField>@@ -140,7 +142,7 @@ export const GoCardlessInitialiseModal = ({onSubmit(close);}}>- {t('Save and continue')}+ <Trans>Save and continue</Trans></ButtonWithLoading></ModalButtons></>diff --git a/packages/desktop-client/src/components/modals/GoalTemplateModal.tsx b/packages/desktop-client/src/components/modals/GoalTemplateModal.tsxindex 4892d81ac6..12b06548ad 100644--- a/packages/desktop-client/src/components/modals/GoalTemplateModal.tsx+++ b/packages/desktop-client/src/components/modals/GoalTemplateModal.tsx@@ -9,6 +9,7 @@ import { TableHeader, Row, Field } from '../table';export function GoalTemplateModal() {const { t } = useTranslation();+return (<Modal name="goal-templates" containerProps={{ style: { width: 850 } }}>{({ state: { close } }) => (@@ -28,18 +29,18 @@ export function GoalTemplateModal() {</TableHeader><Row style={{ backgroundColor: theme.tableBackground }}><Field width="flex">- {t('#template $10 repeat every week starting 2025-01-03')}+ #template $10 repeat every week starting 2025-01-03+ </Field>+ <Field width="flex">+ <Trans>$10 a week</Trans></Field>- <Field width="flex">{t('$10 a week')}</Field></Row><Row style={{ backgroundColor: theme.tableBackground }}><Field width="flex">- {t(- '#template $10 repeat every week starting 2025-01-03 up to $80',- )}+ #template $10 repeat every week starting 2025-01-03 up to $80</Field><Field width="flex">- {t('$10 a week, up to a maximum of $80')}+ <Trans>$10 a week, up to a maximum of $80</Trans></Field></Row><span>@@ -54,19 +55,25 @@ export function GoalTemplateModal() {</Field></TableHeader><Row style={{ backgroundColor: theme.tableBackground }}>- <Field width="flex">{t('#template $50')}</Field>- <Field width="flex">{t('$50 each month')}</Field>+ <Field width="flex">#template $50</Field>+ <Field width="flex">+ <Trans>$50 each month</Trans>+ </Field></Row><Row style={{ backgroundColor: theme.tableBackground }}>- <Field width="flex">{t('#template up to $150')}</Field>+ <Field width="flex">#template up to $150</Field><Field width="flex">- {t('Up to $150 each month, and remove extra funds over $150')}+ <Trans>+ Up to $150 each month, and remove extra funds over $150+ </Trans></Field></Row><Row style={{ backgroundColor: theme.tableBackground }}>- <Field width="flex">{t('#template up to $150 hold')}</Field>+ <Field width="flex">#template up to $150 hold</Field><Field width="flex">- {t('Up to $150 each month, but retain any funds over $150')}+ <Trans>+ Up to $150 each month, but retain any funds over $150+ </Trans></Field></Row><span>@@ -82,26 +89,32 @@ export function GoalTemplateModal() {</TableHeader><Row style={{ backgroundColor: theme.tableBackground }}><Field width="flex">- {t('#template $500 by 2025-03 repeat every 6 months')}+ #template $500 by 2025-03 repeat every 6 months</Field><Field width="flex">- {t('Break down less-frequent expenses into monthly expenses')}+ <Trans>+ Break down less-frequent expenses into monthly expenses+ </Trans></Field></Row><Row style={{ backgroundColor: theme.tableBackground }}><Field width="flex">- {t('#template $500 by 2025-03 repeat every year')}+ #template $500 by 2025-03 repeat every year</Field><Field width="flex">- {t('Break down less-frequent expenses into monthly expenses')}+ <Trans>+ Break down less-frequent expenses into monthly expenses+ </Trans></Field></Row><Row style={{ backgroundColor: theme.tableBackground }}><Field width="flex">- {t('#template $500 by 2025-03 repeat every 2 years')}+ #template $500 by 2025-03 repeat every 2 years</Field><Field width="flex">- {t('Break down less-frequent expenses into monthly expenses')}+ <Trans>+ Break down less-frequent expenses into monthly expenses+ </Trans></Field></Row><span>@@ -116,19 +129,17 @@ export function GoalTemplateModal() {</Field></TableHeader><Row style={{ backgroundColor: theme.tableBackground }}>+ <Field width="flex">#template schedule SCHEDULE_NAME</Field><Field width="flex">- {t('#template schedule SCHEDULE_NAME')}- </Field>- <Field width="flex">- {t('Fund upcoming scheduled transactions over time')}+ <Trans>Fund upcoming scheduled transactions over time</Trans></Field></Row><Row style={{ backgroundColor: theme.tableBackground }}>+ <Field width="flex">#template schedule full SCHEDULE_NAME</Field><Field width="flex">- {t('#template schedule full SCHEDULE_NAME')}- </Field>- <Field width="flex">- {t('Fund upcoming scheduled transaction only on needed month')}+ <Trans>+ Fund upcoming scheduled transaction only on needed month+ </Trans></Field></Row><span>@@ -136,16 +147,16 @@ export function GoalTemplateModal() {</span><TableHeader><Field width="flex">- <Trans>Goal Tempaltes</Trans>+ <Trans>Goal Templates</Trans></Field><Field width="flex"><Trans>Description</Trans></Field></TableHeader><Row style={{ backgroundColor: theme.tableBackground }}>- <Field width="flex">{t('#goal 1000')}</Field>+ <Field width="flex">#goal 1000</Field><Field width="flex">- {t('Set a long-term goal instead of a monthly goal')}+ <Trans>Set a long-term goal instead of a monthly goal</Trans></Field></Row><div@@ -160,15 +171,17 @@ export function GoalTemplateModal() {<br /></span><Text>- {t('See')}{' '}- <Link- variant="external"- linkColor="muted"- to="https://actualbudget.org/docs/experimental/goal-templates"- >- {t('Goal Templates')}- </Link>{' '}- {t('for more information.')}+ <Trans>+ See{' '}+ <Link+ variant="external"+ linkColor="muted"+ to="https://actualbudget.org/docs/experimental/goal-templates"+ >+ Goal Templates+ </Link>{' '}+ for more information.+ </Trans></Text></div></View>diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ParsedDate.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ParsedDate.tsxindex 81ca7c93ba..c32c9e09c6 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ParsedDate.tsx+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ParsedDate.tsx@@ -1,4 +1,5 @@import React from 'react';+import { Trans } from 'react-i18next';import { theme } from '../../../style';import { Text } from '../../common/Text';@@ -27,13 +28,13 @@ export function ParsedDate({<Text>{date || (<Text style={{ color: theme.pageTextLight, fontStyle: 'italic' }}>- Empty+ <Trans>Empty</Trans></Text>)}{' '}→{' '}</Text><Text style={{ color: parsed ? theme.noticeTextLight : theme.errorText }}>- {parsed || 'Invalid'}+ {parsed || <Trans>Invalid</Trans>}</Text></Text>);diff --git a/packages/desktop-client/src/components/modals/LoadBackupModal.tsx b/packages/desktop-client/src/components/modals/LoadBackupModal.tsxindex ab623da624..0be83b372c 100644--- a/packages/desktop-client/src/components/modals/LoadBackupModal.tsx+++ b/packages/desktop-client/src/components/modals/LoadBackupModal.tsx@@ -120,7 +120,7 @@ export function LoadBackupModal({)}{' '}<Text style={{ fontWeight: 600 }}>{t(- 'If you use a backup, you will have to setup all your devices to sync from the new budget.',+ 'If you use a backup, you will have to set up all your devices to sync from the new budget.',)}</Text></Block>@@ -129,7 +129,7 @@ export function LoadBackupModal({isDisabled={backupDisabled}onPress={() => dispatch(makeBackup())}>- {t('Backup now')}+ {t('Back up now')}</Button></View>)}diff --git a/packages/desktop-client/src/components/modals/ManageRulesModal.tsx b/packages/desktop-client/src/components/modals/ManageRulesModal.tsxindex fe61ce7f98..b61c0a077d 100644--- a/packages/desktop-client/src/components/modals/ManageRulesModal.tsx+++ b/packages/desktop-client/src/components/modals/ManageRulesModal.tsx@@ -25,7 +25,7 @@ export function ManageRulesModal({ payeeId }: ManageRulesModalProps) {}return (- <Modal name={t('manage-rules')} isLoading={loading}>+ <Modal name="manage-rules" isLoading={loading}>{({ state: { close } }) => (<><ModalHeaderdiff --git a/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx b/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsxindex d77bd0781f..deef6d1282 100644--- a/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx+++ b/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx@@ -85,7 +85,7 @@ export function OpenIDEnableModal({color: theme.pageTextLight,paddingTop: 5,}}- title={t('After enabling openid all sessions will be closed')}+ title={t('After enabling OpenID all sessions will be closed')}/><Labelstyle={{diff --git a/packages/desktop-client/src/components/modals/PasswordEnableModal.tsx b/packages/desktop-client/src/components/modals/PasswordEnableModal.tsxindex 3e9d83c27f..09edbe2ab3 100644--- a/packages/desktop-client/src/components/modals/PasswordEnableModal.tsx+++ b/packages/desktop-client/src/components/modals/PasswordEnableModal.tsx@@ -38,7 +38,7 @@ export function PasswordEnableModal({const refreshLoginMethods = useRefreshLoginMethods();const errorMessages = {- 'invalid-password': t('Invalid Password'),+ 'invalid-password': t('Invalid password'),'password-match': t('Passwords do not match'),'network-failure': t('Unable to contact the server'),'unable-to-change-file-config-enabled': t(@@ -48,8 +48,7 @@ export function PasswordEnableModal({function getErrorMessage(error: string): string {return (- errorMessages[error as keyof typeof errorMessages] ||- t('Internal server error')+ errorMessages[error as keyof typeof errorMessages] || t('Internal error'));}diff --git a/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx b/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsxindex 61a1aabd28..98eaf9a883 100644--- a/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx+++ b/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx@@ -1,5 +1,5 @@import React, { useState } from 'react';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { useDispatch } from 'react-redux';import {@@ -19,11 +19,20 @@ import { View } from '../common/View';import { PrivacyFilter } from '../PrivacyFilter';import { TableHeader, Table, Row, Field } from '../table';-const addOnBudgetAccountOption = { id: 'new-on', name: 'Create new account' };-const addOffBudgetAccountOption = {- id: 'new-off',- name: 'Create new account (off budget)',-};+function useAddBudgetAccountOptions() {+ const { t } = useTranslation();++ const addOnBudgetAccountOption = {+ id: 'new-on',+ name: t('Create new account'),+ };+ const addOffBudgetAccountOption = {+ id: 'new-off',+ name: t('Create new account (off budget)'),+ };++ return { addOnBudgetAccountOption, addOffBudgetAccountOption };+}export function SelectLinkedAccountsModal({requisitionId,@@ -41,6 +50,8 @@ export function SelectLinkedAccountsModal({.map(acc => [acc.account_id, acc.id]),);});+ const { addOnBudgetAccountOption, addOffBudgetAccountOption } =+ useAddBudgetAccountOptions();async function onNext() {const chosenLocalAccountIds = Object.values(chosenAccounts);@@ -127,9 +138,10 @@ export function SelectLinkedAccountsModal({rightContent={<ModalCloseButton onPress={close} />}/><Text style={{ marginBottom: 10 }}>- {t(- 'We found the following accounts. Select which ones you want to add:',- )}+ <Trans>+ We found the following accounts. Select which ones you want to+ add:+ </Trans></Text><Viewstyle={{@@ -186,7 +198,7 @@ export function SelectLinkedAccountsModal({onPress={onNext}isDisabled={!Object.keys(chosenAccounts).length}>- {t('Link accounts')}+ <Trans>Link accounts</Trans></Button></View></>@@ -201,8 +213,9 @@ function TableRow({unlinkedAccounts,onSetLinkedAccount,}) {- const { t } = useTranslation();const [focusedField, setFocusedField] = useState(null);+ const { addOnBudgetAccountOption, addOffBudgetAccountOption } =+ useAddBudgetAccountOptions();const availableAccountOptions = [...unlinkedAccounts,@@ -248,7 +261,7 @@ function TableRow({}}style={{ float: 'right' }}>- {t('Remove bank-sync')}+ <Trans>Remove bank-sync</Trans></Button>) : (<Button@@ -258,7 +271,7 @@ function TableRow({}}style={{ float: 'right' }}>- {t('Setup bank-sync')}+ <Trans>Set up bank-sync</Trans></Button>)}</Field>diff --git a/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx b/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsxindex 08058f5b52..de6913250c 100644--- a/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx+++ b/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx@@ -1,6 +1,6 @@// @ts-strict-ignoreimport React, { useState } from 'react';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { getSecretsError } from 'loot-core/shared/errors';import { send } from 'loot-core/src/platform/client/fetch';@@ -66,17 +66,19 @@ export const SimpleFinInitialiseModal = ({/><View style={{ display: 'flex', gap: 10 }}><Text>- {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',- )}{' '}- <Link- variant="external"- to="https://bridge.simplefin.org/"- linkColor="purple"- >- SimpleFIN- </Link>- .+ <Trans>+ 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{' '}+ <Link+ variant="external"+ to="https://bridge.simplefin.org/"+ linkColor="purple"+ >+ SimpleFIN+ </Link>+ .+ </Trans></Text><FormField>@@ -104,7 +106,7 @@ export const SimpleFinInitialiseModal = ({onSubmit(close);}}>- {t('Save and continue')}+ <Trans>Save and continue</Trans></ButtonWithLoading></ModalButtons></>diff --git a/packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx b/packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsxindex ed1d705521..a614b97c6d 100644--- a/packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx+++ b/packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx@@ -42,7 +42,7 @@ export function DuplicateFileModal({onComplete,}: DuplicateFileProps) {const { t } = useTranslation();- const fileEndingTranslation = t(' - copy');+ const fileEndingTranslation = ' - ' + t('copy');const [newName, setNewName] = useState(file.name + fileEndingTranslation);const [nameError, setNameError] = useState<string | null>(null);@@ -227,8 +227,11 @@ export function DuplicateFileModal({}}onPress={() => handleDuplicate('localOnly')}>- <Trans>Duplicate</Trans>- {isCloudFile && <Trans> locally</Trans>}+ {isCloudFile ? (+ <Trans>Duplicate locally</Trans>+ ) : (+ <Trans>Duplicate</Trans>+ )}</ButtonWithLoading>)}</ModalButtons>diff --git a/packages/desktop-client/src/components/payees/PayeeMenu.tsx b/packages/desktop-client/src/components/payees/PayeeMenu.tsxindex 514b7ae0ae..21f23fe8fd 100644--- a/packages/desktop-client/src/components/payees/PayeeMenu.tsx+++ b/packages/desktop-client/src/components/payees/PayeeMenu.tsx@@ -1,4 +1,4 @@-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { type PayeeEntity } from 'loot-core/src/types/models';@@ -32,6 +32,11 @@ export function PayeeMenu({id => payeesById[id] == null || payeesById[id].transfer_acct,);+ const selectedPayeeNames = [...selectedPayees]+ .slice(0, 4)+ .map(id => payeesById[id].name)+ .join(', ');+return (<MenuonMenuSelect={type => {@@ -58,10 +63,11 @@ export function PayeeMenu({color: theme.pageTextSubdued,}}>- {[...selectedPayees]- .slice(0, 4)- .map(id => payeesById[id].name)- .join(', ') + (selectedPayees.size > 4 ? t(', and more') : '')}+ {selectedPayees.size > 4 ? (+ <Trans>{{ selectedPayeeNames }}, and more</Trans>+ ) : (+ selectedPayeeNames+ )}</View>}items={[diff --git a/packages/desktop-client/src/components/reports/DateRange.tsx b/packages/desktop-client/src/components/reports/DateRange.tsxindex 81d6fbeaba..d302c830ce 100644--- a/packages/desktop-client/src/components/reports/DateRange.tsx+++ b/packages/desktop-client/src/components/reports/DateRange.tsx@@ -72,9 +72,9 @@ export function DateRange({ start, end, type }: DateRangeProps): ReactElement {Compare {{ formattedStartDate }} to {{ typeOrFormattedEndDate }}</Trans>) : (- <Trans>- {{ formattedStartDate }} - {{ formattedEndDate }}- </Trans>+ <>+ {formattedStartDate} - {formattedEndDate}+ </>)}</div>);diff --git a/packages/desktop-client/src/components/reports/Header.tsx b/packages/desktop-client/src/components/reports/Header.tsxindex 06a73d1998..c220de79cd 100644--- a/packages/desktop-client/src/components/reports/Header.tsx+++ b/packages/desktop-client/src/components/reports/Header.tsx@@ -154,7 +154,7 @@ export function Header({variant="bare"onPress={() => onChangeDates(...getLatestRange(11))}>- {t('1 Year')}+ {t('1 year')}</Button><Buttonvariant="bare"@@ -164,7 +164,7 @@ export function Header({)}>- {t('All Time')}+ {t('All time')}</Button>{filters && (diff --git a/packages/desktop-client/src/components/reports/Overview.tsx b/packages/desktop-client/src/components/reports/Overview.tsxindex 4ddf903b8e..8178454a9b 100644--- a/packages/desktop-client/src/components/reports/Overview.tsx+++ b/packages/desktop-client/src/components/reports/Overview.tsx@@ -359,9 +359,7 @@ export function Overview() {if (item === 'markdown-card') {onAddWidget<MarkdownWidget>(item, {- content: t(- '### Text Widget\n\nEdit this widget to change the **markdown** content.',- ),+ content: `### ${t('Text Widget')}\n\n${t('Edit this widget to change the **markdown** content.')}`,});return;}diff --git a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx b/packages/desktop-client/src/components/reports/SaveReportDelete.tsxindex 915bf2f81d..80559d620e 100644--- a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx+++ b/packages/desktop-client/src/components/reports/SaveReportDelete.tsx@@ -1,5 +1,7 @@import React from 'react';-import { useTranslation } from 'react-i18next';+import { Trans } from 'react-i18next';++import { type TransObjectLiteral } from 'loot-core/types/util';import { theme } from '../../style/theme';import { Button } from '../common/Button2';@@ -18,14 +20,15 @@ export function SaveReportDelete({onClose,name,}: SaveReportDeleteProps) {- const { t } = useTranslation();return (<><View style={{ align: 'center' }}>- <Text style={{ color: theme.errorText, marginBottom: 5 }}>- {t('Are you sure you want to delete report:')}- </Text>- <View>{name}</View>+ <Trans>+ <Text style={{ color: theme.errorText, marginBottom: 5 }}>+ Are you sure you want to delete report:{' '}+ </Text>+ <View>{{ name } as TransObjectLiteral}</View>+ </Trans></View><Stack@@ -36,10 +39,10 @@ export function SaveReportDelete({><View style={{ flex: 1 }} /><Button variant="primary" autoFocus onPress={onDelete}>- {t('Yes')}+ <Trans>Yes</Trans></Button><Button variant="primary" onPress={onClose}>- {t('No')}+ <Trans>No</Trans></Button></Stack></>diff --git a/packages/desktop-client/src/components/reports/reports/NetWorth.tsx b/packages/desktop-client/src/components/reports/reports/NetWorth.tsxindex 94842fe384..ce0344486f 100644--- a/packages/desktop-client/src/components/reports/reports/NetWorth.tsx+++ b/packages/desktop-client/src/components/reports/reports/NetWorth.tsx@@ -244,16 +244,20 @@ function NetWorthInner({ widget }: NetWorthInnerProps) {/><View style={{ marginTop: 30, userSelect: 'none' }}>- <Trans>- <Paragraph>- <strong>{t('How is net worth calculated?')}</strong>- </Paragraph>- <Paragraph>- {t(- 'Net worth shows the balance of all accounts over time, including all of your investments. Your “net worth” is considered to be the amount you’d have if you sold all your assets and paid off as much debt as possible. If you hover over the graph, you can also see the amount of assets and debt individually.',- )}- </Paragraph>- </Trans>+ <Paragraph>+ <strong>+ <Trans>How is net worth calculated?</Trans>+ </strong>+ </Paragraph>+ <Paragraph>+ <Trans>+ Net worth shows the balance of all accounts over time, including+ all of your investments. Your “net worth” is considered to be the+ amount you’d have if you sold all your assets and paid off as much+ debt as possible. If you hover over the graph, you can also see+ the amount of assets and debt individually.+ </Trans>+ </Paragraph></View></View></Page>diff --git a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsxindex 12aeca89ca..eaae2bfb8d 100644--- a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx+++ b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx@@ -6,13 +6,16 @@ import {useRef,useState,} from 'react';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { sendCatch } from 'loot-core/src/platform/client/fetch';import * as monthUtils from 'loot-core/src/shared/months';import { getRecurringDescription } from 'loot-core/src/shared/schedules';import { type RecurConfig, type RecurPattern } from 'loot-core/types/models';-import { type WithRequired } from 'loot-core/types/util';+import {+ type TransObjectLiteral,+ type WithRequired,+} from 'loot-core/types/util';import { useDateFormat } from '../../hooks/useDateFormat';import { SvgAdd, SvgSubtract } from '../../icons/v0';@@ -33,24 +36,36 @@ import { DateSelect } from './DateSelect';// ex: There is no 6th Friday of the Monthconst MAX_DAY_OF_WEEK_INTERVAL = 5;-const FREQUENCY_OPTIONS = [- { id: 'daily', name: 'Days' },- { id: 'weekly', name: 'Weeks' },- { id: 'monthly', name: 'Months' },- { id: 'yearly', name: 'Years' },-] as const;+function useFrequencyOptions() {+ const { t } = useTranslation();++ const FREQUENCY_OPTIONS = [+ { id: 'daily', name: t('Days') },+ { id: 'weekly', name: t('Weeks') },+ { id: 'monthly', name: t('Months') },+ { id: 'yearly', name: t('Years') },+ ] as const;++ return { FREQUENCY_OPTIONS };+}const DAY_OF_MONTH_OPTIONS = [...Array(31).keys()].map(day => day + 1);-const DAY_OF_WEEK_OPTIONS = [- { id: 'SU', name: 'Sunday' },- { id: 'MO', name: 'Monday' },- { id: 'TU', name: 'Tuesday' },- { id: 'WE', name: 'Wednesday' },- { id: 'TH', name: 'Thursday' },- { id: 'FR', name: 'Friday' },- { id: 'SA', name: 'Saturday' },-] as const;+function useDayOfWeekOptions() {+ const { t } = useTranslation();++ const DAY_OF_WEEK_OPTIONS = [+ { id: 'SU', name: t('Sunday') },+ { id: 'MO', name: t('Monday') },+ { id: 'TU', name: t('Tuesday') },+ { id: 'WE', name: t('Wednesday') },+ { id: 'TH', name: t('Thursday') },+ { id: 'FR', name: t('Friday') },+ { id: 'SA', name: t('Saturday') },+ ] as const;++ return { DAY_OF_WEEK_OPTIONS };+}function parsePatternValue(value: string | number) {if (value === 'last') {@@ -271,6 +286,8 @@ function MonthlyPatterns({dispatch: Dispatch<ReducerAction>;}) {const { t } = useTranslation();+ const { DAY_OF_WEEK_OPTIONS } = useDayOfWeekOptions();+return (<Stack spacing={2} style={{ marginTop: 10 }}>{config.patterns.map((recurrence, idx) => (@@ -354,6 +371,8 @@ function RecurringScheduleTooltip({const { t } = useTranslation();const [previewDates, setPreviewDates] = useState(null);+ const { FREQUENCY_OPTIONS } = useFrequencyOptions();+const [state, dispatch] = useReducer(reducer, {config: parseConfig(currentConfig),});@@ -395,7 +414,9 @@ function RecurringScheduleTooltip({return (<><div style={{ display: 'flex', alignItems: 'center', gap: 5 }}>- <label htmlFor="start">{t('From')}</label>+ <label htmlFor="start">+ <Trans>From</Trans>+ </label><InitialFocus><DateSelectid="start"@@ -499,45 +520,49 @@ function RecurringScheduleTooltip({});}}/>- <label- htmlFor="form_skipwe"- style={{- userSelect: 'none',- marginRight: 5,- }}- >- {t('Move schedule')}{' '}- </label>- <Select- id="solve_dropdown"- options={[- ['before', 'before'],- ['after', 'after'],- ]}- value={state.config.weekendSolveMode}- onChange={value => dispatch({ type: 'set-weekend-solve', value })}- disabled={!skipWeekend}- />- <label- htmlFor="solve_dropdown"- style={{ userSelect: 'none', marginLeft: 5 }}- >- {' '}- {t('weekend')}- </label>+ <Trans>+ <label+ htmlFor="form_skipwe"+ style={{+ userSelect: 'none',+ marginRight: 5,+ }}+ >+ Move schedule{' '}+ </label>+ <Select+ id="solve_dropdown"+ options={[+ ['before', 'before'],+ ['after', 'after'],+ ]}+ value={state.config.weekendSolveMode}+ onChange={value => dispatch({ type: 'set-weekend-solve', value })}+ disabled={!skipWeekend}+ />+ <label+ htmlFor="solve_dropdown"+ style={{ userSelect: 'none', marginLeft: 5 }}+ >+ {' '}+ {{ beforeOrAfter: '' } as TransObjectLiteral} weekend+ </label>+ </Trans></View></Stack><SchedulePreview previewDates={previewDates} /><divstyle={{ display: 'flex', marginTop: 15, justifyContent: 'flex-end' }}>- <Button onPress={onClose}>{t('Cancel')}</Button>+ <Button onPress={onClose}>+ <Trans>Cancel</Trans>+ </Button><Buttonvariant="primary"onPress={() => onSave(unparseConfig(config))}style={{ marginLeft: 10 }}>- {t('Apply')}+ <Trans>Apply</Trans></Button></div></>diff --git a/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx b/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsxindex 20da70a91a..b22ec3b724 100644--- a/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx+++ b/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx@@ -1,5 +1,5 @@import React from 'react';-import { useTranslation } from 'react-i18next';+import { Trans } from 'react-i18next';import { useSyncedPref } from '../../hooks/useSyncedPref';import { Button } from '../common/Button2';@@ -9,7 +9,6 @@ import { Text } from '../common/Text';import { Setting } from './UI';export function BudgetTypeSettings() {- const { t } = useTranslation();const [budgetType = 'rollover', setBudgetType] = useSyncedPref('budgetType');function onSwitchType() {@@ -21,35 +20,42 @@ export function BudgetTypeSettings() {<SettingprimaryAction={<Button onPress={onSwitchType}>- Switch to {budgetType === 'report' ? 'envelope' : 'tracking'}{' '}- budgeting+ {budgetType === 'report' ? (+ <Trans>Switch to envelope budgeting</Trans>+ ) : (+ <Trans>Switch to tracking budgeting</Trans>+ )}</Button>}><Text>- <strong>Envelope budgeting</strong> (recommended) digitally mimics- physical envelope budgeting system by allocating funds into virtual- envelopes for different expenses. It helps track spending and ensure you- don‘t overspend in any category.{' '}+ <Trans>+ <strong>Envelope budgeting</strong> (recommended) digitally mimics+ physical envelope budgeting system by allocating funds into virtual+ envelopes for different expenses. It helps track spending and ensure+ you don‘t overspend in any category.+ </Trans>{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/envelope-budgeting"linkColor="purple">- {t('Learn more…')}+ <Trans>Learn more</Trans></Link></Text><Text>- With <strong>tracking budgeting</strong>, category balances reset each- month, and funds are managed using a “Saved” metric instead of “To Be- Budgeted.” Income is forecasted to plan future spending, rather than- relying on current available funds.{' '}+ <Trans>+ With <strong>tracking budgeting</strong>, category balances reset each+ month, and funds are managed using a “Saved” metric instead of “To Be+ Budgeted.” Income is forecasted to plan future spending, rather than+ relying on current available funds.+ </Trans>{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/tracking-budget"linkColor="purple">- {t('Learn more…')}+ <Trans>Learn more</Trans></Link></Text></Setting>diff --git a/packages/desktop-client/src/components/settings/Encryption.tsx b/packages/desktop-client/src/components/settings/Encryption.tsxindex a5e9c942b7..8a35bf9f73 100644--- a/packages/desktop-client/src/components/settings/Encryption.tsx+++ b/packages/desktop-client/src/components/settings/Encryption.tsx@@ -1,5 +1,5 @@import React from 'react';-import { useTranslation } from 'react-i18next';+import { Trans } from 'react-i18next';import { useDispatch } from 'react-redux';import { pushModal } from 'loot-core/client/actions';@@ -14,7 +14,6 @@ import { useServerURL } from '../ServerContext';import { Setting } from './UI';export function EncryptionSettings() {- const { t } = useTranslation();const dispatch = useDispatch();const serverURL = useServerURL();const [encryptKeyId] = useMetadataPref('encryptKeyId');@@ -28,40 +27,50 @@ export function EncryptionSettings() {return encryptKeyId ? (<SettingprimaryAction={- <Button onPress={onChangeKey}>{t('Generate new key')}</Button>+ <Button onPress={onChangeKey}>+ <Trans>Generate new key</Trans>+ </Button>}><Text><Text style={{ color: theme.noticeTextLight, fontWeight: 600 }}>- {t('End-to-end Encryption is turned on.')}+ <Trans>End-to-end Encryption is turned on.</Trans></Text>{' '}- {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.',- )}{' '}+ <Trans>+ 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.+ </Trans>{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- {t('Learn more…')}+ <Trans>Learn more</Trans></Link></Text></Setting>) : missingCryptoAPI ? (<Setting- primaryAction={<Button isDisabled>{t('Enable encryption…')}</Button>}+ primaryAction={+ <Button isDisabled>+ <Trans>Enable encryption…</Trans>+ </Button>+ }><Text>- <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.',- )}{' '}+ <Trans>+ <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.+ </Trans>{' '}<Linkvariant="external"to="https://actualbudget.org/docs/config/https"linkColor="purple">- {t('Learn more…')}+ <Trans>Learn more</Trans></Link></Text></Setting>@@ -69,39 +78,47 @@ export function EncryptionSettings() {<SettingprimaryAction={<Button onPress={() => dispatch(pushModal('create-encryption-key'))}>- {t('Enable encryption…')}+ <Trans>Enable encryption</Trans></Button>}><Text>- <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.',- )}{' '}+ <Trans>+ <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.+ </Trans>{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- {t('Learn more…')}+ <Trans>Learn more</Trans></Link></Text></Setting>) : (<Setting- primaryAction={<Button isDisabled>{t('Enable encryption…')}</Button>}+ primaryAction={+ <Button isDisabled>+ <Trans>Enable encryption</Trans>+ </Button>+ }><Text>- <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.',- )}{' '}+ <Trans>+ <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.+ </Trans>{' '}<Linkvariant="external"to="https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption"linkColor="purple">- {t('Learn more…')}+ <Trans>Learn more</Trans></Link></Text></Setting>diff --git a/packages/desktop-client/src/components/settings/Format.tsx b/packages/desktop-client/src/components/settings/Format.tsxindex f5b7819505..03226f3dc8 100644--- a/packages/desktop-client/src/components/settings/Format.tsx+++ b/packages/desktop-client/src/components/settings/Format.tsx@@ -1,6 +1,6 @@// @ts-strict-ignoreimport React, { type ReactNode } from 'react';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { css } from '@emotion/css';@@ -58,6 +58,7 @@ function Column({ title, children }: { title: string; children: ReactNode }) {export function FormatSettings() {const { t } = useTranslation();+const sidebar = useSidebar();const [_firstDayOfWeekIdx, setFirstDayOfWeekIdxPref] =useSyncedPref('firstDayOfWeekIdx'); // Sunday;@@ -112,7 +113,7 @@ export function FormatSettings() {}/><label htmlFor="settings-textDecimal">- {t('Hide decimal places')}+ <Trans>Hide decimal places</Trans></label></Text></Column>@@ -138,10 +139,10 @@ export function FormatSettings() {}><Text>- <strong>{t('Formatting')}</strong>- {t(- ' does not affect how budget data is stored, and can be changed at any time.',- )}+ <Trans>+ <strong>Formatting</strong> does not affect how budget data is stored,+ and can be changed at any time.+ </Trans></Text></Setting>);diff --git a/packages/desktop-client/src/components/settings/Reset.tsx b/packages/desktop-client/src/components/settings/Reset.tsxindex de0418b360..f698d99544 100644--- a/packages/desktop-client/src/components/settings/Reset.tsx+++ b/packages/desktop-client/src/components/settings/Reset.tsx@@ -1,5 +1,5 @@import React, { useState } from 'react';-import { useTranslation } from 'react-i18next';+import { Trans } from 'react-i18next';import { useDispatch } from 'react-redux';import { resetSync } from 'loot-core/client/actions';@@ -12,7 +12,6 @@ import { Text } from '../common/Text';import { Setting } from './UI';export function ResetCache() {- const { t } = useTranslation();const [resetting, setResetting] = useState(false);async function onResetCache() {@@ -25,22 +24,24 @@ export function ResetCache() {<SettingprimaryAction={<ButtonWithLoading isLoading={resetting} onPress={onResetCache}>- {t('Reset budget cache')}+ <Trans>Reset budget cache</Trans></ButtonWithLoading>}><Text>- <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.',- )}+ <Trans>+ <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.+ </Trans></Text></Setting>);}export function ResetSync() {- const { t } = useTranslation();const [groupId] = useMetadataPref('groupId');const isEnabled = !!groupId;const dispatch = useDispatch();@@ -61,21 +62,25 @@ export function ResetSync() {isDisabled={!isEnabled}onPress={onResetSync}>- {t('Reset sync')}+ <Trans>Reset sync</Trans></ButtonWithLoading>}>{isEnabled ? (<Text>- <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.',- )}+ <Trans>+ <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.+ </Trans></Text>) : (<Text>- <strong>{t('Reset sync')}</strong>- {t(' is only available when syncing is')}+ <Trans>+ <strong>Reset sync</strong> is only available when syncing is+ </Trans></Text>)}</Setting>diff --git a/packages/desktop-client/src/components/settings/Themes.tsx b/packages/desktop-client/src/components/settings/Themes.tsxindex 2bf5da6a3a..ebf00de1b0 100644--- a/packages/desktop-client/src/components/settings/Themes.tsx+++ b/packages/desktop-client/src/components/settings/Themes.tsx@@ -1,5 +1,5 @@import React, { type ReactNode } from 'react';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { css } from '@emotion/css';@@ -59,7 +59,7 @@ export function ThemeSettings() {},}}>- <Column title="Theme">+ <Column title={t('Theme')}><Select<Theme>onChange={value => {switchTheme(value);@@ -74,7 +74,7 @@ export function ThemeSettings() {/></Column>{theme === 'auto' && (- <Column title="Dark theme">+ <Column title={t('Dark theme')}><Select<DarkTheme>onChange={value => {switchDarkTheme(value);@@ -93,8 +93,9 @@ export function ThemeSettings() {}><Text>- <strong>{t('Themes')}</strong>- {t(' change the user interface colors.')}+ <Trans>+ <strong>Themes</strong> change the user interface colors.+ </Trans></Text></Setting>);diff --git a/packages/desktop-client/src/components/settings/Upcoming.tsx b/packages/desktop-client/src/components/settings/Upcoming.tsxindex 9da7849135..0dba8f52d3 100644--- a/packages/desktop-client/src/components/settings/Upcoming.tsx+++ b/packages/desktop-client/src/components/settings/Upcoming.tsx@@ -1,5 +1,5 @@import React, { useState } from 'react';-import { Trans } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { useLocation } from 'react-router-dom';import { type SyncedPrefs } from 'loot-core/types/prefs';@@ -14,20 +14,30 @@ import { View } from '../common/View';import { Setting } from './UI';-const options: {- value: SyncedPrefs['upcomingScheduledTransactionLength'];- label: string;-}[] = [- { value: '1', label: '1 Day' },- { value: '7', label: '1 Week' },- { value: '14', label: '2 Weeks' },- { value: '30', label: '1 Month' },-];+function useUpcomingLengthOptions() {+ const { t } = useTranslation();++ const upcomingLengthOptions: {+ value: SyncedPrefs['upcomingScheduledTransactionLength'];+ label: string;+ }[] = [+ { value: '1', label: t('1 day') },+ { value: '7', label: t('1 week') },+ { value: '14', label: t('2 weeks') },+ { value: '30', label: t('1 month') },+ ];++ return { upcomingLengthOptions };+}export function UpcomingLengthSettings() {+ const { t } = useTranslation();const [_upcomingLength, setUpcomingLength] = useSyncedPref('upcomingScheduledTransactionLength',);++ const { upcomingLengthOptions } = useUpcomingLengthOptions();+const upcomingLength = _upcomingLength || '7';const enabled = useFeatureFlag('upcomingLengthAdjustment');@@ -42,28 +52,37 @@ export function UpcomingLengthSettings() {primaryAction={<View style={{ flexDirection: 'row', gap: '1em' }}><View style={{ flexDirection: 'row', alignItems: 'center', gap: 20 }}>- <View title="Upcoming Length">+ <View title={t('Upcoming Length')}><Select- options={options.map(x => [x.value || '7', x.label])}+ options={upcomingLengthOptions.map(x => [+ x.value || '7',+ x.label,+ ])}value={upcomingLength}onChange={newValue => setUpcomingLength(newValue)}/></View>- <InfoBubble label="Only the first instance of a recurring transaction will be shown." />+ <InfoBubble+ label={t(+ 'Only the first instance of a recurring transaction will be shown.',+ )}+ /></View></View>}><View style={{ flexDirection: 'row', gap: 20 }}><Text>- <strong>Upcoming Length</strong> does not affect how budget data is- stored, and can be changed at any time.+ <Trans>+ <strong>Upcoming Length</strong> does not affect how budget data is+ stored, and can be changed at any time.+ </Trans></Text><ButtononPress={() => setExpanded(false)}aria-label="Close upcoming length settings">- Close+ <Trans>Close</Trans></Button></View></Setting>@@ -74,10 +93,10 @@ export function UpcomingLengthSettings() {variant="primary"onPress={() => setExpanded(true)}>- <Trans>- Edit Upcoming Length (- {options.find(x => x.value === upcomingLength)?.label ?? '1 Week'})- </Trans>+ <Trans>Edit Upcoming Length</Trans> (+ {upcomingLengthOptions.find(x => x.value === upcomingLength)?.label ??+ t('1 week')}+ )</Button></View>);diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsxindex a0a04890a9..e5ada57471 100644--- a/packages/desktop-client/src/components/settings/index.tsx+++ b/packages/desktop-client/src/components/settings/index.tsx@@ -1,5 +1,5 @@import React, { type ReactNode, useEffect } from 'react';-import { useTranslation } from 'react-i18next';+import { useTranslation, Trans } from 'react-i18next';import { useDispatch } from 'react-redux';import { css } from '@emotion/css';@@ -37,7 +37,6 @@ import { ThemeSettings } from './Themes';import { AdvancedToggle, Setting } from './UI';function About() {- const { t } = useTranslation();const version = useServerVersion();const latestVersion = useLatestVersion();const isOutdated = useIsOutdated();@@ -45,8 +44,10 @@ function About() {return (<Setting><Text>- <strong>{t('Actual')}</strong>- {t(' is a super fast privacy-focused app for managing your finances.')}+ <Trans>+ <strong>Actual</strong> is a super fast privacy-focused app for+ managing your finances.+ </Trans></Text><Viewstyle={{@@ -64,19 +65,25 @@ function About() {})}data-vrt-mask>- <Text>Client version: v{window.Actual?.ACTUAL_VERSION}</Text>- <Text>Server version: {version}</Text>+ <Text>+ <Trans>+ Client version: {{ version: `v${window.Actual?.ACTUAL_VERSION}` }}+ </Trans>+ </Text>+ <Text>+ <Trans>Server version: {{ version }}</Trans>+ </Text>{isOutdated ? (<Linkvariant="external"to="https://actualbudget.org/docs/releases"linkColor="purple">- {t('New version available:')} {latestVersion}+ <Trans>New version available: {{ latestVersion }}</Trans></Link>) : (<Text style={{ color: theme.noticeText, fontWeight: 600 }}>- {t('You’re up to date!')}+ <Trans>You’re up to date!</Trans></Text>)}<Text>@@ -85,7 +92,7 @@ function About() {to="https://actualbudget.org/docs/releases"linkColor="purple">- {t('Release Notes')}+ <Trans>Release Notes</Trans></Link></Text></View>@@ -98,23 +105,28 @@ function IDName({ children }: { children: ReactNode }) {}function AdvancedAbout() {- const { t } = useTranslation();const [budgetId] = useMetadataPref('id');const [groupId] = useMetadataPref('groupId');return (<Setting><Text>- <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.',- )}+ <Trans>+ <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.+ </Trans></Text><Text>- <IDName>{t('Budget ID:')}</IDName> {budgetId}+ <Trans>+ <IDName>Budget ID:</IDName> {{ budgetId }}+ </Trans></Text><Text style={{ color: theme.pageText }}>- <IDName>{t('Sync ID:')}</IDName> {groupId || '(none)'}+ <Trans>+ <IDName>Sync ID:</IDName> {{ syncId: groupId || '(none)' }}+ </Trans></Text>{/* low priority todo: eliminate some or all of these, or decide when/if to show them */}{/* <Text>diff --git a/packages/desktop-client/src/components/sidebar/BudgetName.tsx b/packages/desktop-client/src/components/sidebar/BudgetName.tsxindex 9499bc20ca..3201d97676 100644--- a/packages/desktop-client/src/components/sidebar/BudgetName.tsx+++ b/packages/desktop-client/src/components/sidebar/BudgetName.tsx@@ -125,7 +125,7 @@ function EditableBudgetName() {}}><Text style={{ whiteSpace: 'nowrap', overflow: 'hidden' }}>- {budgetName || t('A budget has no name')}+ {budgetName || t('Unnamed')}</Text><SvgExpandArrowwidth={7}diff --git a/packages/loot-core/src/client/shared-listeners.ts b/packages/loot-core/src/client/shared-listeners.tsindex eb970fe602..a4d8be1d0e 100644--- a/packages/loot-core/src/client/shared-listeners.ts+++ b/packages/loot-core/src/client/shared-listeners.ts@@ -49,9 +49,7 @@ export function listenForSyncEvent(actions, store) {}} else if (type === 'error') {let notif: Notification | null = null;- const learnMore = t(- '[Learn more](https://actualbudget.org/docs/getting-started/sync/#debugging-sync-issues)',- );+ const learnMore = `[${t('Learn more')}](https://actualbudget.org/docs/getting-started/sync/#debugging-sync-issues)`;const githubIssueLink ='https://github.com/actualbudget/actual/issues/new?assignees=&labels=bug&template=bug-report.yml&title=%5BBug%5D%3A+';diff --git a/packages/loot-core/src/shared/errors.ts b/packages/loot-core/src/shared/errors.tsindex c9a69c937d..6718952e07 100644--- a/packages/loot-core/src/shared/errors.ts+++ b/packages/loot-core/src/shared/errors.ts@@ -129,7 +129,7 @@ export function getUserAccessErrors(reason: string) {case 'unauthorized':return t('You are not logged in.');case 'token-expired':- return t('Login expired, please login again.');+ return t('Login expired, please log in again.');case 'user-cant-be-empty':return t('Please select a user.');case 'invalid-file-id':diff --git a/packages/loot-core/src/types/util.d.ts b/packages/loot-core/src/types/util.d.tsindex fd0c0345d8..48e7fefd07 100644--- a/packages/loot-core/src/types/util.d.ts+++ b/packages/loot-core/src/types/util.d.ts@@ -9,3 +9,8 @@ export type EverythingButIdOptional<T> = { id: T['id'] } & Partial<>;export type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;++// Allows use of object literals inside child elements of `Trans` tags+// see https://github.com/i18next/react-i18next/issues/1483+// eslint-disable-next-line @typescript-eslint/no-explicit-any+export type TransObjectLiteral = any;diff --git a/upcoming-release-notes/4041.md b/upcoming-release-notes/4041.mdnew file mode 100644index 0000000000..0bfed88276--- /dev/null+++ b/upcoming-release-notes/4041.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [matt-fidd]+---++Improve translation strings and update some wording