Skip to content

Commit

Permalink
[l10n] Improve Persian (fa-IR) locale (#13402)
Browse files Browse the repository at this point in the history
Signed-off-by: Ali <[email protected]>
  • Loading branch information
fakhamatia authored Jun 11, 2024
1 parent d7a0bb8 commit 2fb6124
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/data/data-grid/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"languageTag": "fa-IR",
"importName": "faIR",
"localeName": "Persian",
"missingKeysCount": 1,
"missingKeysCount": 0,
"totalKeysCount": 118,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/faIR.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/date-pickers/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"languageTag": "fa-IR",
"importName": "faIR",
"localeName": "Persian",
"missingKeysCount": 8,
"missingKeysCount": 0,
"totalKeysCount": 50,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/faIR.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/locales/faIR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const faIRGrid: Partial<GridLocaleText> = {
columnsManagementSearchTitle: 'جستجو',
columnsManagementNoColumns: 'بدون سطر',
columnsManagementShowHideAllText: 'نمایش/مخفی کردن همه',
// columnsManagementReset: 'Reset',
columnsManagementReset: 'بازنشانی',

// Filter panel text
filterPanelAddFilter: 'افزودن فیلتر',
Expand Down
38 changes: 19 additions & 19 deletions packages/x-date-pickers/src/locales/faIR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { getPickersLocalization } from './utils/getPickersLocalization';
import { TimeViewWithMeridiem } from '../internals/models';

const timeViews: Record<TimeViewWithMeridiem, string> = {
hours: 'ساعت ها',
minutes: 'دقیقه ها',
seconds: 'ثانیه ها',
hours: 'ساعتها',
minutes: 'دقیقهها',
seconds: 'ثانیهها',
meridiem: 'بعد از ظهر',
};

Expand All @@ -25,10 +25,10 @@ const faIRPickers: Partial<PickersLocaleText<any>> = {
// DateRange labels
start: 'شروع',
end: 'پایان',
// startDate: 'Start date',
// startTime: 'Start time',
// endDate: 'End date',
// endTime: 'End time',
startDate: 'تاریخ شروع',
startTime: 'ساعت شروع',
endDate: 'تاریخ پایان',
endTime: 'ساعت پایان',

// Action bar
cancelButtonLabel: 'لغو',
Expand All @@ -45,9 +45,9 @@ const faIRPickers: Partial<PickersLocaleText<any>> = {
// Clock labels
clockLabelText: (view, time, adapter) =>
` را انتخاب کنید ${timeViews[view]}. ${time === null ? 'هیچ ساعتی انتخاب نشده است' : `ساعت انتخاب ${adapter.format(time, 'fullTime')} می باشد`}`,
hoursClockNumberText: (hours) => `${hours} ساعت ها`,
minutesClockNumberText: (minutes) => `${minutes} دقیقه ها`,
secondsClockNumberText: (seconds) => `${seconds} ثانیه ها`,
hoursClockNumberText: (hours) => `${hours} ساعتها`,
minutesClockNumberText: (minutes) => `${minutes} دقیقهها`,
secondsClockNumberText: (seconds) => `${seconds} ثانیهها`,

// Digital clock labels
selectViewText: (view) => ` را انتخاب کنید ${timeViews[view]}`,
Expand All @@ -61,13 +61,13 @@ const faIRPickers: Partial<PickersLocaleText<any>> = {
// Open picker labels
openDatePickerDialogue: (value, utils) =>
value !== null && utils.isValid(value)
? `تاریخ را انتخاب کنید، تاریخ انتخاب شده ${utils.format(value, 'fullDate')} می باشد`
? `تاریخ را انتخاب کنید، تاریخ انتخاب شده ${utils.format(value, 'fullDate')} میباشد`
: 'تاریخ را انتخاب کنید',
openTimePickerDialogue: (value, utils) =>
value !== null && utils.isValid(value)
? `ساعت را انتخاب کنید، ساعت انتخاب شده ${utils.format(value, 'fullTime')} می باشد`
? `ساعت را انتخاب کنید، ساعت انتخاب شده ${utils.format(value, 'fullTime')} میباشد`
: 'ساعت را انتخاب کنید',
// fieldClearLabel: 'Clear value',
fieldClearLabel: 'پاک کردن مقدار',

// Table labels
timeTableLabel: 'انتخاب تاریخ',
Expand All @@ -87,14 +87,14 @@ const faIRPickers: Partial<PickersLocaleText<any>> = {
year: 'سال',
month: 'ماه',
day: 'روز',
// weekDay: 'Week day',
hours: 'ساعت ها',
minutes: 'دقیقه ها',
seconds: 'ثانیه ها',
// meridiem: 'Meridiem',
weekDay: 'روز هفته',
hours: 'ساعتها',
minutes: 'دقیقهها',
seconds: 'ثانیهها',
meridiem: 'نیم‌روز',

// Common
// empty: 'Empty',
empty: 'خالی',
};

export const faIR = getPickersLocalization(faIRPickers);

0 comments on commit 2fb6124

Please sign in to comment.