feat: move all common messages to i18n (ru\en)

This commit is contained in:
2026-08-25 05:45:34 +05:00
parent 8255d33098
commit 2301b0e165
22 changed files with 100 additions and 87 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { error } from '@sveltejs/kit';
import { getTool, TOOLS } from '$lib/registry';
import { t } from '$lib/i18n/t';
import type { EntryGenerator, PageLoad } from './$types';
export const entries: EntryGenerator = () => TOOLS.map((tool) => ({ id: tool.id }));
@@ -7,7 +8,7 @@ export const entries: EntryGenerator = () => TOOLS.map((tool) => ({ id: tool.id
export const load: PageLoad = ({ params }) => {
const tool = getTool(params.id);
if (!tool) {
error(404, 'Инструмент не найден');
error(404, t('errors.notFound'));
}
return { id: tool.id };
};