chore: add i18n dict consistency lint rule

This commit is contained in:
2026-09-14 07:40:06 +05:00
parent 44cfca92ce
commit d24ee0a448
10 changed files with 648 additions and 3 deletions
@@ -0,0 +1,24 @@
import type { Dict } from "./dict";
export const de: Dict = {
header: {
workspace: "Arbeitsbereich",
catalog: "Katalog",
},
home: {
hero: "Hallo {name}!",
restoreLast: "{title} wiederherstellen",
},
errors: {
sourceRequired: "Quelle erforderlich",
},
tools: {
addBorder: {
title: "Rahmen hinzufügen",
description: "Zeichnet einen {kind}-Rahmen.",
results: {
done: "Rahmen {what}",
},
},
},
};
@@ -0,0 +1,16 @@
export const LOCALES = ["en", "ru", "de"] as const;
export const BASE_LOCALE: "en" = "en";
export type Dict = {
header: Record<string, string>;
home: Record<string, string>;
errors: Record<string, string>;
tools: Record<string, ToolStrings>;
};
export type ToolStrings = {
title?: string;
description?: string;
results?: Record<string, string>;
};
@@ -0,0 +1,24 @@
import type { Dict } from "./dict";
export const en: Dict = {
header: {
workspace: "Workspace",
catalog: "Catalog",
},
home: {
hero: "Hello {name}!",
restoreLast: "Restore {title}",
},
errors: {
sourceRequired: "Source image required",
},
tools: {
addBorder: {
title: "Add border",
description: "Draws a {kind} frame.",
results: {
done: "Border {what}",
},
},
},
};
@@ -0,0 +1,24 @@
import type { Dict } from "./dict";
export const ru: Dict = {
header: {
workspace: "Рабочая область",
catalog: "Каталог",
},
home: {
hero: "Привет, {name}!",
restoreLast: "Вернуть {title}",
},
errors: {
sourceRequired: "Нужен исходник",
},
tools: {
addBorder: {
title: "Добавить рамку",
description: "Рисует рамку {kind}.",
results: {
done: "Рамка {what}",
},
},
},
};