mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-15 05:56:36 +00:00
feat: move all common messages to i18n (ru\en)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import ToolPage from '$lib/components/ToolPage.svelte';
|
||||
import { getTool } from '$lib/registry';
|
||||
import { t } from '$lib/i18n/t';
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
@@ -8,7 +9,7 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{tool?.title ?? 'Инструмент'} — easy-png-tools</title>
|
||||
<title>{tool?.title ?? t('toolPage.fallbackTitle')} — easy-png-tools</title>
|
||||
{#if tool}
|
||||
<meta name="description" content={tool.description} />
|
||||
{/if}
|
||||
|
||||
@@ -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 };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user