diff --git a/packages/loot-core/src/server/budget/cleanup-template.ts b/packages/loot-core/src/server/budget/cleanup-template.ts index 9c016fd031c..8c1b109212c 100644 --- a/packages/loot-core/src/server/budget/cleanup-template.ts +++ b/packages/loot-core/src/server/budget/cleanup-template.ts @@ -1,6 +1,4 @@ // @ts-strict-ignore -import { t } from 'i18next'; - import { Notification } from '../../client/state-types/notifications'; import * as monthUtils from '../../shared/months'; import * as db from '../db'; @@ -115,7 +113,7 @@ async function applyGroupCleanups( }); } } else { - warnings.push(groupName + t(' has no matching sink categories.')); + warnings.push(groupName + ' has no matching sink categories.'); } sourceGroups = sourceGroups.filter(c => c.group !== groupName); groupLength = sourceGroups.length; @@ -220,7 +218,7 @@ async function processCleanup(month: string): Promise { }); num_sources += 1; } else { - warnings.push(category.name + t(' does not have available funds.')); + warnings.push(category.name + ' does not have available funds.'); } const carryover = await db.first( `SELECT carryover FROM zero_budgets WHERE month = ? and category = ?`, @@ -287,7 +285,7 @@ async function processCleanup(month: string): Promise { const budgetAvailable = await getSheetValue(sheetName, `to-budget`); if (budgetAvailable <= 0) { - warnings.push(t('Global: No funds are available to reallocate.')); + warnings.push('Global: No funds are available to reallocate.'); } //fill sinking categories @@ -322,19 +320,19 @@ async function processCleanup(month: string): Promise { return { type: 'error', sticky: true, - message: t('There were errors interpreting some templates:'), + message: 'There were errors interpreting some templates:', pre: errors.join('\n\n'), }; } else if (warnings.length) { return { type: 'warning', - message: t('Global: Funds not available:'), + message: 'Global: Funds not available:', pre: warnings.join('\n\n'), }; } else { return { type: 'message', - message: t('All categories were up to date.'), + message: 'All categories were up to date.', }; } } else { @@ -344,15 +342,13 @@ async function processCleanup(month: string): Promise { if (errors.length) { return { sticky: true, - message: t('{applied} There were errors interpreting some templates:', { - applied, - }), + message: `${applied} There were errors interpreting some templates:`, pre: errors.join('\n\n'), }; } else if (warnings.length) { return { type: 'warning', - message: t('Global: Funds not available:'), + message: 'Global: Funds not available:', pre: warnings.join('\n\n'), }; } else { diff --git a/packages/loot-core/src/server/budget/goaltemplates.ts b/packages/loot-core/src/server/budget/goaltemplates.ts index 9b2cb5595a0..f10cd35fa80 100644 --- a/packages/loot-core/src/server/budget/goaltemplates.ts +++ b/packages/loot-core/src/server/budget/goaltemplates.ts @@ -1,6 +1,4 @@ // @ts-strict-ignore -//import { t } from 'i18next'; - import { Notification } from '../../client/state-types/notifications'; import * as monthUtils from '../../shared/months'; import * as db from '../db'; @@ -191,14 +189,12 @@ async function processTemplate( if (catObjects.length === 0 && errors.length === 0) { return { type: 'message', - //message: t('Everything is up to date'), message: 'Everything is up to date', }; } if (errors.length > 0) { return { sticky: true, - //message: t('There were errors interpreting some templates:'), message: 'There were errors interpreting some templates:', pre: errors.join(`\n\n`), }; @@ -246,9 +242,6 @@ async function processTemplate( return { type: 'message', - //message: t('Successfully applied templates to {length} categories', { - // length: catObjects.length, - //}), message: `Successfully applied templates to ${catObjects.length} categories`, }; } diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts index 3a69c56886e..a4965372f69 100644 --- a/packages/loot-core/src/server/main.ts +++ b/packages/loot-core/src/server/main.ts @@ -3,7 +3,6 @@ import './polyfills'; import * as injectAPI from '@actual-app/api/injected'; import * as CRDT from '@actual-app/crdt'; -import { t } from 'i18next'; import { v4 as uuidv4 } from 'uuid'; import { createTestBudget } from '../mocks/budget'; @@ -1088,18 +1087,14 @@ function handleSyncError(err, acct) { accountId: acct.id, message: err.reason ? err.reason - : t( - 'Account “{acctName}” is not linked properly. Please link it again.', - { acctName: acct.name }, - ), + : `Account “${acct.name}” is not linked properly. Please link it again.`, }; } return { accountId: acct.id, - message: t( + message: 'There was an internal error. Please get in touch https://actualbudget.org/contact for support.', - ), internal: err.stack, }; } diff --git a/packages/loot-core/src/server/mutators.ts b/packages/loot-core/src/server/mutators.ts index 6c8fc834ff8..f5eac7b1d80 100644 --- a/packages/loot-core/src/server/mutators.ts +++ b/packages/loot-core/src/server/mutators.ts @@ -1,6 +1,4 @@ // @ts-strict-ignore -import { t } from 'i18next'; - import { captureException, captureBreadcrumb } from '../platform/exceptions'; import { sequential } from '../shared/async'; import { type HandlerFunctions, type Handlers } from '../types/handlers'; @@ -123,7 +121,7 @@ export function getMutatorContext() { if (currentContext == null) { captureBreadcrumb({ category: 'server', - message: t('Recent methods: ') + _latestHandlerNames.join(', '), + message: 'Recent methods: ' + _latestHandlerNames.join(', '), }); // captureException(new Error('getMutatorContext: mutator not running')); diff --git a/packages/loot-core/src/server/sheet.ts b/packages/loot-core/src/server/sheet.ts index 476e62af9e5..106e59812fd 100644 --- a/packages/loot-core/src/server/sheet.ts +++ b/packages/loot-core/src/server/sheet.ts @@ -1,6 +1,5 @@ // @ts-strict-ignore import { type Database } from '@jlongster/sql.js'; -import { t } from 'i18next'; import { captureBreadcrumb } from '../platform/exceptions'; import * as sqlite from '../platform/server/sqlite'; @@ -133,7 +132,7 @@ export async function loadSpreadsheet( } captureBreadcrumb({ - message: t('loading spreaadsheet'), + message: 'loading spreadsheet', category: 'server', }); @@ -163,7 +162,7 @@ export async function loadSpreadsheet( } captureBreadcrumb({ - message: t('loaded spreaadsheet'), + message: 'loaded spreadsheet', category: 'server', }); diff --git a/upcoming-release-notes/3830.md b/upcoming-release-notes/3830.md new file mode 100644 index 00000000000..a4ca4e25fda --- /dev/null +++ b/upcoming-release-notes/3830.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MikesGlitch] +--- + +Fix broken translations in worker files