diff --git a/packages/desktop-client/e2e/accounts.test.js b/packages/desktop-client/e2e/accounts.test.js index 5c9118172d6..c56ef3be6c9 100644 --- a/packages/desktop-client/e2e/accounts.test.js +++ b/packages/desktop-client/e2e/accounts.test.js @@ -54,17 +54,17 @@ test.describe('Accounts', () => { await expect(page).toMatchThemeScreenshots(); }); - test.describe('Budgeted Accounts', () => { + test.describe('On-Budget Accounts', () => { // Reset filters test.afterEach(async () => { await accountPage.removeFilter(0); }); test('creates a transfer from two existing transactions', async () => { - accountPage = await navigation.goToAccountPage('For budget'); + accountPage = await navigation.goToAccountPage('On-budget'); await accountPage.waitFor(); - await expect(accountPage.accountName).toHaveText('Budgeted Accounts'); + await expect(accountPage.accountName).toHaveText('On-Budget Accounts'); await accountPage.filterByNote('Test Acc Transfer'); diff --git a/packages/desktop-client/e2e/budget.test.js b/packages/desktop-client/e2e/budget.test.js index 3a2df2e45fc..bb256c3beca 100644 --- a/packages/desktop-client/e2e/budget.test.js +++ b/packages/desktop-client/e2e/budget.test.js @@ -27,12 +27,12 @@ test.describe('Budget', () => { test('renders the summary information: available funds, overspent, budgeted and for next month', async () => { const summary = budgetPage.budgetSummary.first(); - await expect(summary.getByText('Available Funds')).toBeVisible({ + await expect(summary.getByText('Available funds')).toBeVisible({ timeout: 10000, }); await expect(summary.getByText(/^Overspent in /)).toBeVisible(); await expect(summary.getByText('Budgeted')).toBeVisible(); - await expect(summary.getByText('For Next Month')).toBeVisible(); + await expect(summary.getByText('For next month')).toBeVisible(); await expect(page).toMatchThemeScreenshots(); }); diff --git a/packages/desktop-client/e2e/page-models/mobile-budget-page.js b/packages/desktop-client/e2e/page-models/mobile-budget-page.js index 7a3a63c0520..6e3689334fd 100644 --- a/packages/desktop-client/e2e/page-models/mobile-budget-page.js +++ b/packages/desktop-client/e2e/page-models/mobile-budget-page.js @@ -34,7 +34,7 @@ export class MobileBudgetPage { name: 'Saved', }); this.projectedSavingsButton = this.budgetTableHeader.getByRole('button', { - name: 'Projected Savings', + name: 'Projected savings', }); this.overspentButton = this.budgetTableHeader.getByRole('button', { name: 'Overspent', @@ -294,7 +294,7 @@ export class MobileBudgetPage { } throw new Error( - 'None of “Saved”, “Projected Savings”, or “Overspent” buttons could be located on the page', + 'None of “Saved”, “Projected savings”, or “Overspent” buttons could be located on the page', ); } diff --git a/packages/desktop-client/src/components/accounts/Account.tsx b/packages/desktop-client/src/components/accounts/Account.tsx index fc21cfe093a..49a575c18fe 100644 --- a/packages/desktop-client/src/components/accounts/Account.tsx +++ b/packages/desktop-client/src/components/accounts/Account.tsx @@ -250,7 +250,7 @@ function getField(field?: string) { } type AccountInternalProps = { - accountId?: AccountEntity['id'] | 'budgeted' | 'offbudget' | 'uncategorized'; + accountId?: AccountEntity['id'] | 'onbudget' | 'offbudget' | 'uncategorized'; filterConditions: RuleConditionEntity[]; showBalances?: boolean; setShowBalances: (newValue: boolean) => void; @@ -841,10 +841,10 @@ class AccountInternal extends PureComponent< } if (!account) { - if (id === 'budgeted') { - return t('Budgeted Accounts'); + if (id === 'onbudget') { + return t('On-Budget Accounts'); } else if (id === 'offbudget') { - return t('Off Budget Accounts'); + return t('Off-Budget Accounts'); } else if (id === 'uncategorized') { return t('Uncategorized'); } else if (!id) { @@ -1662,7 +1662,7 @@ class AccountInternal extends PureComponent< const isNameEditable = accountId && - accountId !== 'budgeted' && + accountId !== 'onbudget' && accountId !== 'offbudget' && accountId !== 'uncategorized'; @@ -1767,7 +1767,7 @@ class AccountInternal extends PureComponent< showAccount={ !accountId || accountId === 'offbudget' || - accountId === 'budgeted' || + accountId === 'onbudget' || accountId === 'uncategorized' } isAdding={this.state.isAdding} diff --git a/packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx index e403042878c..0bc9bba67ed 100644 --- a/packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx @@ -68,8 +68,8 @@ function AccountList({ item.closed ? t('Closed Accounts') : item.offbudget - ? t('Off Budget') - : t('For Budget') + ? t('Off-budget') + : t('On-budget') }`; lastItem = item; diff --git a/packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx b/packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx index 357ef3200b5..89f01776a44 100644 --- a/packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx +++ b/packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx @@ -119,10 +119,10 @@ export function TotalsList({ prevMonthName, style }: TotalsListProps) { - Available Funds + Available funds Overspent in {prevMonthName} Budgeted - For Next Month + For next month ); diff --git a/packages/desktop-client/src/components/budget/tracking/budgetsummary/Saved.tsx b/packages/desktop-client/src/components/budget/tracking/budgetsummary/Saved.tsx index 3cb5ab658f6..270b4e85345 100644 --- a/packages/desktop-client/src/components/budget/tracking/budgetsummary/Saved.tsx +++ b/packages/desktop-client/src/components/budget/tracking/budgetsummary/Saved.tsx @@ -33,7 +33,7 @@ export function Saved({ projected, style }: SavedProps) { {projected ? ( - Projected Savings: + Projected savings: ) : ( @@ -46,7 +46,7 @@ export function Saved({ projected, style }: SavedProps) { content={ <> ; getBalanceQuery: (account: AccountEntity) => Binding<'account', 'balance'>; - getOnBudgetBalance: () => Binding<'account', 'budgeted-accounts-balance'>; + getOnBudgetBalance: () => Binding<'account', 'onbudget-accounts-balance'>; getOffBudgetBalance: () => Binding<'account', 'offbudget-accounts-balance'>; onAddAccount: () => void; onSelectAccount: (id: string) => void; @@ -226,7 +226,7 @@ function AccountList({ {budgetedAccounts.length > 0 && ( - + )} {budgetedAccounts.map(acct => ( 0 && ( @@ -300,8 +300,8 @@ export function Accounts() { accounts={accounts.filter(account => !account.closed)} updatedAccounts={updatedAccounts} getBalanceQuery={queries.accountBalance} - getOnBudgetBalance={queries.budgetedAccountBalance} - getOffBudgetBalance={queries.offbudgetAccountBalance} + getOnBudgetBalance={queries.onBudgetAccountBalance} + getOffBudgetBalance={queries.offBudgetAccountBalance} onAddAccount={onAddAccount} onSelectAccount={onSelectAccount} onSync={onSync} diff --git a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx index 28ce9be58a5..1a54d3727fa 100644 --- a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx +++ b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx @@ -156,7 +156,7 @@ function Saved({ projected, onPress, show3Cols }) { minFontSizePx={6} maxFontSizePx={12} mode="oneline" - title="Projected Savings" + title="Projected savings" style={{ color: theme.formInputText, textAlign: 'left', diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx index cbe373495e1..214ec0783a8 100644 --- a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx +++ b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx @@ -517,7 +517,7 @@ const TransactionEditInner = memo(function TransactionEditInner({ const getCategory = useCallback( (trans, isOffBudget) => { if (isOffBudget) { - return 'Off Budget'; + return 'Off-budget'; } else if (isBudgetTransfer(trans)) { return 'Transfer'; } else { diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx index f46037d140a..b3cdbc2aa43 100644 --- a/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx +++ b/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx @@ -101,7 +101,7 @@ export function TransactionListItem({ transferAccount, }); const specialCategory = account?.offbudget - ? 'Off Budget' + ? 'Off-budget' : transferAccount && !transferAccount.offbudget ? 'Transfer' : isParent diff --git a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx b/packages/desktop-client/src/components/modals/CloseAccountModal.tsx index d947b81c9c1..20462a7c8b2 100644 --- a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx +++ b/packages/desktop-client/src/components/modals/CloseAccountModal.tsx @@ -183,7 +183,7 @@ export function CloseAccountModal({ {needsCategory(account, transferAccountId, accounts) && ( - Since you are transferring the balance from a budgeted + Since you are transferring the balance from an on-budget account to an off-budget account, this transaction must be categorized. Select a category: diff --git a/packages/desktop-client/src/components/reports/ReportOptions.ts b/packages/desktop-client/src/components/reports/ReportOptions.ts index d8f2ed7fce6..afa26d0067d 100644 --- a/packages/desktop-client/src/components/reports/ReportOptions.ts +++ b/packages/desktop-client/src/components/reports/ReportOptions.ts @@ -257,7 +257,7 @@ const transferCategory: UncategorizedEntity = { }; const offBudgetCategory: UncategorizedEntity = { id: '', - name: t('Off Budget'), + name: t('Off-budget'), uncategorized_id: 'off_budget', hidden: false, }; @@ -271,7 +271,7 @@ type UncategorizedGroupEntity = Pick< }; const uncategorizedGroup: UncategorizedGroupEntity = { - name: t('Uncategorized & Off Budget'), + name: t('Uncategorized & Off-budget'), id: 'uncategorized', hidden: false, uncategorized_id: 'all', diff --git a/packages/desktop-client/src/components/reports/ReportSidebar.tsx b/packages/desktop-client/src/components/reports/ReportSidebar.tsx index a03b9c9b925..2be06a4fb9a 100644 --- a/packages/desktop-client/src/components/reports/ReportSidebar.tsx +++ b/packages/desktop-client/src/components/reports/ReportSidebar.tsx @@ -368,8 +368,8 @@ export function ReportSidebar({ }, { name: 'show-off-budget', - text: 'Show off budget', - tooltip: 'Show off budget accounts', + text: 'Show off-budget', + tooltip: 'Show off-budget accounts', toggle: customReportItems.showOffBudget, }, { diff --git a/packages/desktop-client/src/components/sidebar/Account.tsx b/packages/desktop-client/src/components/sidebar/Account.tsx index 62985660a4f..afed22268dc 100644 --- a/packages/desktop-client/src/components/sidebar/Account.tsx +++ b/packages/desktop-client/src/components/sidebar/Account.tsx @@ -153,7 +153,7 @@ export function Account>({ state.account.accountsSyncing, @@ -100,11 +100,11 @@ export function Accounts() { style={{ fontWeight, marginTop: 15 }} /> - {budgetedAccounts.length > 0 && ( + {onBudgetAccounts.length > 0 && ( )} - {budgetedAccounts.map((account, i) => ( + {onBudgetAccounts.map((account, i) => ( 0 && ( diff --git a/packages/loot-core/src/client/data-hooks/schedules.tsx b/packages/loot-core/src/client/data-hooks/schedules.tsx index 6207b6304a8..03b95b42b30 100644 --- a/packages/loot-core/src/client/data-hooks/schedules.tsx +++ b/packages/loot-core/src/client/data-hooks/schedules.tsx @@ -161,7 +161,7 @@ export function useCachedSchedules() { } export function accountSchedulesQuery( - accountId?: AccountEntity['id'] | 'budgeted' | 'offbudget' | 'uncategorized', + accountId?: AccountEntity['id'] | 'onbudget' | 'offbudget' | 'uncategorized', ) { const filterByAccount = accountFilter(accountId, '_account'); const filterByPayee = accountFilter(accountId, '_payee.transfer_acct'); diff --git a/packages/loot-core/src/client/queries.ts b/packages/loot-core/src/client/queries.ts index c36659a1378..a8b1ff9b368 100644 --- a/packages/loot-core/src/client/queries.ts +++ b/packages/loot-core/src/client/queries.ts @@ -29,11 +29,11 @@ const envelopeParametrizedField = parametrizedField<'envelope-budget'>(); const trackingParametrizedField = parametrizedField<'tracking-budget'>(); export function accountFilter( - accountId?: AccountEntity['id'] | 'budgeted' | 'offbudget' | 'uncategorized', + accountId?: AccountEntity['id'] | 'onbudget' | 'offbudget' | 'uncategorized', field = 'account', ) { if (accountId) { - if (accountId === 'budgeted') { + if (accountId === 'onbudget') { return { $and: [ { [`${field}.offbudget`]: false }, @@ -68,7 +68,7 @@ export function accountFilter( } export function transactions( - accountId?: AccountEntity['id'] | 'budgeted' | 'offbudget' | 'uncategorized', + accountId?: AccountEntity['id'] | 'onbudget' | 'offbudget' | 'uncategorized', ) { let query = q('transactions').options({ splits: 'grouped' }); @@ -159,16 +159,16 @@ export function allAccountBalance() { } satisfies Binding<'account', 'accounts-balance'>; } -export function budgetedAccountBalance() { +export function onBudgetAccountBalance() { return { - name: `budgeted-accounts-balance`, + name: `onbudget-accounts-balance`, query: q('transactions') .filter({ 'account.offbudget': false, 'account.closed': false }) .calculate({ $sum: '$amount' }), - } satisfies Binding<'account', 'budgeted-accounts-balance'>; + } satisfies Binding<'account', 'onbudget-accounts-balance'>; } -export function offbudgetAccountBalance() { +export function offBudgetAccountBalance() { return { name: `offbudget-accounts-balance`, query: q('transactions')