From d8fdaa397567f607a59a9c61a293443c4ae7060b Mon Sep 17 00:00:00 2001 From: Bambier Date: Tue, 8 Jul 2025 15:02:38 +0330 Subject: [PATCH 1/2] Add faIR language support for internationalization --- packages/toolpad-core/src/locales/faIR.tsx | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 packages/toolpad-core/src/locales/faIR.tsx diff --git a/packages/toolpad-core/src/locales/faIR.tsx b/packages/toolpad-core/src/locales/faIR.tsx new file mode 100644 index 00000000000..360425457c2 --- /dev/null +++ b/packages/toolpad-core/src/locales/faIR.tsx @@ -0,0 +1,58 @@ +import type { LocaleText } from '../AppProvider'; +import { getLocalization } from './getLocalization'; + +const enLabels: LocaleText = { + // Account + accountSignInLabel: 'ورود', + accountSignOutLabel: 'خروج', + + // AccountPreview + accountPreviewTitle: 'حساب کاربری', + accountPreviewIconButtonLabel: 'کاربر فعلی', + + // SignInPage + signInTitle: (brandingTitle?: string) => + brandingTitle ? `ورود به ${brandingTitle}` : 'ورود', + signInSubtitle: 'کاربر گرامی، خوش آمدین، لطفا برای ادامه وارد حساب کاربری خود شوید', + signInRememberMe: 'من را را به خاطر بسپار', + providerSignInTitle: (provider: string) => `ورود با ${provider}`, + + // Common authentication labels + email: 'رایانامه', + password: 'گذرواژه', + username: 'نام کاربری', + passkey: 'گذرکلید یا کلید عبور', + + // Common action labels + save: 'ذخیره', + cancel: 'لغو', + ok: 'تایید', + or: 'یا', + to: 'به', + with: 'با', + close: 'بستن', + delete: 'حذف', + alert: 'هشدار', + confirm: 'تایید', + loading: 'بارگیری...', + + // CRUD + createNewButtonLabel: 'ایجاد مورد جدید', + reloadButtonLabel: 'بارگیری مجدد داده‌ها', + createLabel: 'ایجاد', + createSuccessMessage: 'مورد فوق با موفقیت ایجاد شد.', + createErrorMessage: 'ایجاد مورد فوق ناموفق بود. به دلیل:', + editLabel: 'ویرایش', + editSuccessMessage: 'مورد فوق با موفیقت ویرایش شد.', + editErrorMessage: 'ایجاد مورد فوق ناموفق بود. به دلیل:', + deleteLabel: 'حذف', + deleteConfirmTitle: 'حذف مورد?', + deleteConfirmMessage: 'آیا مایل به حذف این مورد هستید؟', + deleteConfirmLabel: 'حذف', + deleteCancelLabel: 'لغو', + deleteSuccessMessage: 'مورد با موفقیت حذف شد.', + deleteErrorMessage: 'حذف مورد ناموفق بود. به دلیل:', + deletedItemMessage: 'این مورد حذف شده است.', +}; + +export default getLocalization(enLabels); From 8ebefe47133cc22e7447bb5cfc7e207216990acd Mon Sep 17 00:00:00 2001 From: Bambier Date: Tue, 8 Jul 2025 15:08:34 +0330 Subject: [PATCH 2/2] change en typo to fa --- packages/toolpad-core/src/locales/faIR.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/toolpad-core/src/locales/faIR.tsx b/packages/toolpad-core/src/locales/faIR.tsx index 360425457c2..3ac82325756 100644 --- a/packages/toolpad-core/src/locales/faIR.tsx +++ b/packages/toolpad-core/src/locales/faIR.tsx @@ -1,7 +1,7 @@ import type { LocaleText } from '../AppProvider'; import { getLocalization } from './getLocalization'; -const enLabels: LocaleText = { +const faIRLabels: LocaleText = { // Account accountSignInLabel: 'ورود', accountSignOutLabel: 'خروج', @@ -55,4 +55,4 @@ const enLabels: LocaleText = { deletedItemMessage: 'این مورد حذف شده است.', }; -export default getLocalization(enLabels); +export default getLocalization(faIRLabels);