added translation

This commit is contained in:
sdarbinyan
2026-02-20 09:01:02 +04:00
parent 083b270c74
commit 6850a911f3
22 changed files with 1219 additions and 136 deletions

View File

@@ -1,3 +1,11 @@
/**
* Per-language translation content for a category or subcategory.
* Stored under `translations['ru']`, `translations['en']`, etc.
*/
export interface CategoryTranslation {
name?: string;
}
export interface Category {
id: string;
name: string;
@@ -6,6 +14,8 @@ export interface Category {
img?: string;
projectId: string;
subcategories?: Subcategory[];
/** Optional translations keyed by language code: { ru: { name: '...' } } */
translations?: { [lang: string]: CategoryTranslation };
}
export interface Subcategory {
@@ -21,4 +31,6 @@ export interface Subcategory {
itemCount?: number;
subcategories?: Subcategory[];
hasItems?: boolean;
/** Optional translations keyed by language code: { ru: { name: '...' } } */
translations?: { [lang: string]: CategoryTranslation };
}