Localize dashboard shell and home page.

Convert the dashboard layout (sidebar nav, header, role badges, wallet,
sign-out, language switcher) and the dashboard home page to the i18n
dictionaries, including a shared deployment-status label map. Switch their
links/router to the locale-aware helpers and add RTL-aware spacing.

Remaining dashboard page bodies and shared components still render English
copy and will be localized in follow-up commits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
keyhan
2026-06-11 12:15:21 +03:30
parent 34993d417f
commit e0964e6528
5 changed files with 187 additions and 77 deletions
+49
View File
@@ -158,6 +158,55 @@ const en: Dictionary = {
technicalTickets: 'Technical Tickets',
salesTickets: 'Sales Tickets',
},
dashboard: {
status: {
running: 'Running',
pending: 'Pending',
building: 'Building',
deploying: 'Deploying',
failed: 'Failed',
build_failed: 'Build failed',
cancelled: 'Cancelled',
stopped: 'Stopped',
},
home: {
welcome: 'Welcome back, {name}!',
overview: 'Overview of your applications and managed services.',
creditsTitle: 'Prepaid resource credits',
creditsBody:
'If you delete an app before your plan ends, you can deploy a new app with the same resources at no extra charge until the credit expires.',
fromApp: 'From app “{name}”',
resourceCredit: 'Resource credit',
remaining: '{label} remaining',
expires: 'Expires {date}',
cpu: 'CPU',
ram: 'RAM',
replicas: 'Replicas',
db: 'DB',
dbDisk: 'DB disk',
appDisk: 'App disk',
useOnNewApp: 'Use on new app →',
statApplications: 'Applications',
statAppsRunning: 'Apps running',
statManagedServices: 'Managed services',
statServicesRunning: 'Services running',
appsFailed: '{n} application(s) failed',
servicesFailed: '{n} service(s) failed',
recentApplications: 'Recent applications',
newApplication: 'New application',
noApplications: 'No applications yet',
deployFirst: 'Deploy your first app',
viewAllApplications: 'View all {n} applications →',
recentServices: 'Recent databases & services',
newService: 'New service',
noServices: 'No managed services yet',
createServiceCta: 'Create database or service',
viewAllServices: 'View all {n} services →',
replica: 'replica',
replicaPlural: 'replicas',
},
},
};
export default en;
+49
View File
@@ -157,6 +157,55 @@ const fa = {
technicalTickets: 'تیکت‌های فنی',
salesTickets: 'تیکت‌های فروش',
},
dashboard: {
status: {
running: 'در حال اجرا',
pending: 'در انتظار',
building: 'در حال بیلد',
deploying: 'در حال انتشار',
failed: 'ناموفق',
build_failed: 'خطای بیلد',
cancelled: 'لغو شده',
stopped: 'متوقف',
},
home: {
welcome: 'خوش آمدی، {name}!',
overview: 'نمای کلیِ اپلیکیشن‌ها و سرویس‌های مدیریت‌شدهٔ تو.',
creditsTitle: 'اعتبارِ پیش‌پرداختِ منابع',
creditsBody:
'اگر اپی را پیش از پایان پلنت حذف کنی، می‌توانی تا زمان انقضای اعتبار، اپ جدیدی با همان منابع و بدون هزینهٔ اضافه منتشر کنی.',
fromApp: 'از اپِ «{name}»',
resourceCredit: 'اعتبارِ منابع',
remaining: '{label} باقی‌مانده',
expires: 'انقضا {date}',
cpu: 'پردازنده',
ram: 'حافظه',
replicas: 'تعداد نمونه',
db: 'دیتابیس',
dbDisk: 'دیسکِ دیتابیس',
appDisk: 'دیسکِ اپ',
useOnNewApp: 'استفاده روی اپ جدید →',
statApplications: 'اپلیکیشن‌ها',
statAppsRunning: 'اپ‌های در حال اجرا',
statManagedServices: 'سرویس‌های مدیریت‌شده',
statServicesRunning: 'سرویس‌های در حال اجرا',
appsFailed: '{n} اپلیکیشن ناموفق',
servicesFailed: '{n} سرویس ناموفق',
recentApplications: 'اپلیکیشن‌های اخیر',
newApplication: 'اپلیکیشن جدید',
noApplications: 'هنوز اپلیکیشنی نداری',
deployFirst: 'اولین اپت را منتشر کن',
viewAllApplications: 'مشاهدهٔ همهٔ {n} اپلیکیشن →',
recentServices: 'دیتابیس‌ها و سرویس‌های اخیر',
newService: 'سرویس جدید',
noServices: 'هنوز سرویس مدیریت‌شده‌ای نداری',
createServiceCta: 'ساخت دیتابیس یا سرویس',
viewAllServices: 'مشاهدهٔ همهٔ {n} سرویس →',
replica: 'نمونه',
replicaPlural: 'نمونه',
},
},
};
export type Dictionary = typeof fa;