Skip to content

Commit

Permalink
Remove hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Dec 10, 2024
1 parent 1d08477 commit efe98eb
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions packages/desktop-client/e2e/accounts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ test.describe('Accounts', () => {
await expect(page).toMatchThemeScreenshots();
});

test.describe('On-Budget 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('On-budget');
accountPage = await navigation.goToAccountPage('On budget');
await accountPage.waitFor();

await expect(accountPage.accountName).toHaveText('On-Budget Accounts');
await expect(accountPage.accountName).toHaveText('On Budget Accounts');

await accountPage.filterByNote('Test Acc Transfer');

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/e2e/page-models/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Navigation {
await this.page.getByLabel('Balance:').fill(String(data.balance));

if (data.offBudget) {
await this.page.getByLabel('Off-budget').click();
await this.page.getByLabel('Off budget').click();
}

await this.page
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/accounts/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,9 @@ class AccountInternal extends PureComponent<

if (!account) {
if (id === 'onbudget') {
return t('On-Budget Accounts');
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function AccountList({
item.closed
? t('Closed Accounts')
: item.offbudget
? t('Off-budget')
: t('On-budget')
? t('Off budget')
: t('On budget')
}`;

lastItem = item;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export function Account() {
function accountNameFromId(id: string | undefined) {
switch (id) {
case 'onbudget':
return 'On-Budget Accounts';
return 'On Budget Accounts';
case 'offbudget':
return 'Off-Budget Accounts';
return 'Off Budget Accounts';
case 'uncategorized':
return 'Uncategorized';
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function AccountList({
<PullToRefresh onRefresh={onSync}>
<View aria-label="Account list" style={{ margin: 10 }}>
{onBudgetAccounts.length > 0 && (
<AccountHeader name="On-budget" amount={getOnBudgetBalance()} />
<AccountHeader name="On budget" amount={getOnBudgetBalance()} />
)}
{onBudgetAccounts.map(acct => (
<AccountCard
Expand All @@ -243,7 +243,7 @@ function AccountList({

{offBudgetAccounts.length > 0 && (
<AccountHeader
name="Off-budget"
name="Off budget"
amount={getOffBudgetBalance()}
style={{ marginTop: 30 }}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function TransactionListItem({
transferAccount,
});
const specialCategory = account?.offbudget
? 'Off-budget'
? 'Off budget'
: transferAccount && !transferAccount.offbudget
? 'Transfer'
: isParent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function needsCategory(
const isOffBudget = acct && acct.offbudget === 1;

// The user must select a category if transferring from a budgeted
// account to an off-budget account
// account to an off budget account
return account.offbudget === 0 && isOffBudget;
}

Expand Down Expand Up @@ -183,8 +183,8 @@ export function CloseAccountModal({
{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
Since you are transferring the balance from an on budget
account to an off budget account, this transaction must
be categorized. Select a category:
</Paragraph>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function CreateLocalAccountModal() {
verticalAlign: 'center',
}}
>
{t('Off-budget')}
{t('Off budget')}
</label>
</View>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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)',
name: 'Create new account (off budget)',
};

export function SelectLinkedAccountsModal({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export function ReportSidebar({
{
name: 'show-off-budget',
text: 'Show off-budget',
tooltip: 'Show off-budget accounts',
tooltip: 'Show off budget accounts',
toggle: customReportItems.showOffBudget,
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/sidebar/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function Account<FieldName extends SheetFields<'account'>>({

<AlignedText
style={
(name === 'Off-budget' || name === 'On-budget') && {
(name === 'Off budget' || name === 'On budget') && {
borderBottom: `1.5px solid rgba(255,255,255,0.4)`,
paddingBottom: '3px',
}
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop-client/src/components/sidebar/Accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function Accounts() {

{onBudgetAccounts.length > 0 && (
<Account
name={t('On-budget')}
name={t('On budget')}
to="/accounts/onbudget"
query={queries.onBudgetAccountBalance()}
style={{
Expand Down Expand Up @@ -132,7 +132,7 @@ export function Accounts() {

{offbudgetAccounts.length > 0 && (
<Account
name={t('Off-budget')}
name={t('Off budget')}
to="/accounts/offbudget"
query={queries.offBudgetAccountBalance()}
style={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ const Transaction = memo(function Transaction({
</Cell>
) : isBudgetTransfer || isOffBudget ? (
<InputCell
/* Category field for transfer and off-budget transactions
/* Category field for transfer and off budget transactions
(NOT preview, it is covered first) */
name="category"
width="flex"
Expand All @@ -1420,7 +1420,7 @@ const Transaction = memo(function Transaction({
isParent
? 'Split'
: isOffBudget
? 'Off-budget'
? 'Off budget'
: isBudgetTransfer
? 'Transfer'
: ''
Expand Down
2 changes: 1 addition & 1 deletion packages/loot-core/src/server/accounts/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function clearCategory(transaction, transferAcct) {
[transferAcct],
);

// If the transfer is between two on-budget or two off-budget accounts,
// If the transfer is between two on budget or two off budget accounts,
// we should clear the category, because the category is not relevant
if (fromOffBudget === toOffBudget) {
await db.updateTransaction({ id: transaction.id, category: null });
Expand Down
2 changes: 1 addition & 1 deletion upcoming-release-notes/3903.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ category: Maintenance
authors: [joel-jeremy]
---

Use consistent terms for on budget accounts i.e. `For budget`/`Budgeted` --> `On-budget`
Use consistent terms for on budget accounts i.e. `For budget`/`Budgeted` --> `On budget`

0 comments on commit efe98eb

Please sign in to comment.