mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 18:40:34 -05:00
🐛 Fix translations failing (#3830)
* fix translations failing * release notes * blasphemy * more blasphemy * putting warning back * last heretic act * making the world a better place
This commit is contained in:
@@ -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<Notification> {
|
||||
});
|
||||
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<Notification> {
|
||||
|
||||
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<Notification> {
|
||||
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<Notification> {
|
||||
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 {
|
||||
|
||||
@@ -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';
|
||||
@@ -190,13 +188,13 @@ 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`),
|
||||
};
|
||||
}
|
||||
@@ -247,8 +245,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`,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
|
||||
|
||||
@@ -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',
|
||||
});
|
||||
|
||||
|
||||
6
upcoming-release-notes/3830.md
Normal file
6
upcoming-release-notes/3830.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Maintenance
|
||||
authors: [MikesGlitch]
|
||||
---
|
||||
|
||||
Fix broken translations in worker files
|
||||
Reference in New Issue
Block a user