feat: separate i18n dict pages

This commit is contained in:
2026-09-27 16:24:31 +05:00
parent 7a3498c173
commit 9776e1d325
12 changed files with 613 additions and 357 deletions
+8 -1
View File
@@ -16,9 +16,14 @@ export function isLocale(value: unknown): value is Locale {
);
}
export type ToolStrings = {
/** Тексты страницы (`pages.<slug>`): адрес, имя файла и иконка — по slug. */
export type PageStrings = {
title?: string;
description?: string;
};
/** Тексты инструмента (`tools.<id>`): подписи полей, verdict-ключи. */
export type ToolStrings = {
/** Подписи параметров по их id. */
params?: Record<string, string>;
/** Подписи опций select: paramId -> value -> label. */
@@ -54,6 +59,8 @@ export type Dict = {
search: Record<string, string>;
ui: Record<string, string>;
errors: Record<string, string>;
/** Заголовки и описания страниц; в базовой локали их нет — берётся EN из реестра. */
pages?: Record<string, PageStrings>;
tools: Record<string, ToolStrings>;
/** Действия панели результата/генерации (Generate, Open image…). */
actions?: Record<string, string>;