feat(i18n): extend content translation storage

This commit is contained in:
poyrazavsever
2026-07-21 12:48:46 +03:00
parent 570b0774bd
commit 206484f0eb
11 changed files with 8647 additions and 24 deletions
+24
View File
@@ -2,10 +2,15 @@ export type ContentTranslationFieldKind = "text" | "textarea";
export type ContentTranslationEntityType =
| "branding"
| "calendar_event"
| "chat_session"
| "client"
| "client_activity"
| "finance_transaction"
| "journal_entry"
| "planning_section"
| "proposal"
| "project"
| "subscription"
| "task";
export type ContentTranslationField = {
@@ -48,6 +53,25 @@ export const contentTranslationRegistry = {
{ name: "title", label: "Başlık", required: true, maxLength: 500 },
{ name: "content", label: "İçerik", kind: "textarea", maxLength: 20_000 },
],
finance_transaction: [
{ name: "category", label: "Kategori", maxLength: 100 },
{ name: "description", label: "Açıklama", kind: "textarea", maxLength: 1_000 },
],
journal_entry: [
{ name: "moodLabel", label: "Mod Etiketi", maxLength: 100 },
{ name: "note", label: "Not", kind: "textarea", maxLength: 5_000 },
],
chat_session: [
{ name: "title", label: "Başlık", required: true, maxLength: 200 },
],
proposal: [
{ name: "title", label: "Başlık", required: true, maxLength: 300, placeholder: "Örn. Kurumsal web sitesi teklifi" },
{ name: "description", label: "Açıklama", kind: "textarea", maxLength: 30_000, placeholder: "Kapsam, teslimatlar ve teklif notları..." },
],
subscription: [
{ name: "name", label: "Abonelik adı", required: true, maxLength: 300, placeholder: "Örn. Tasarım aracı" },
{ name: "category", label: "Kategori", maxLength: 160, placeholder: "Örn. Yazılım, altyapı, pazarlama" },
],
} satisfies Record<ContentTranslationEntityType, ContentTranslationField[]>;
export function contentInputName(locale: string, field: string) {
+2
View File
@@ -15,6 +15,8 @@ export const I18N_NAMESPACES = [
"status",
"validation",
"api",
"analytics",
"business",
] as const;
export type I18nNamespace = (typeof I18N_NAMESPACES)[number];