Skip to content

Commit

Permalink
fix: Locale fa (ant-design#29232)
Browse files Browse the repository at this point in the history
* fix: Fix typo in fa_IR.tsx

Signed-off-by: amiralitaheri <amiralitaheri64@gmail.com>

* feat: Add missing values for fa_IR.tsx

Signed-off-by: amiralitaheri <amiralitaheri64@gmail.com>

* feat: Add missing locale values for date-picker/locale/fa_IR.tsx

Signed-off-by: amiralitaheri <amiralitaheri64@gmail.com>

* feat: Add missing locale value for time-picker/locale/fa_IR.tsx

Signed-off-by: amiralitaheri <amiralitaheri64@gmail.com>

* test: Update snapshot

Signed-off-by: amiralitaheri <amiralitaheri64@gmail.com>
  • Loading branch information
amiralitaheri committed Feb 5, 2021
1 parent cb2fc79 commit 0fc2729
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
7 changes: 7 additions & 0 deletions components/date-picker/locale/fa_IR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import { PickerLocale } from '../generatePicker';
const locale: PickerLocale = {
lang: {
placeholder: 'انتخاب تاریخ',
yearPlaceholder: 'انتخاب سال',
quarterPlaceholder: 'انتخاب فصل',
monthPlaceholder: 'انتخاب ماه',
weekPlaceholder: 'انتخاب هفته',
rangePlaceholder: ['تاریخ شروع', 'تاریخ پایان'],
rangeYearPlaceholder: ['سال شروع', 'سال پایان'],
rangeMonthPlaceholder: ['ماه شروع', 'ماه پایان'],
rangeWeekPlaceholder: ['هفته شروع', 'هفته پایان'],
...CalendarLocale,
},
timePickerLocale: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70699,7 +70699,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
<span
class="ant-transfer-list-header-selected"
>
0
0 عدد
</span>
<span
class="ant-transfer-list-header-title"
Expand Down Expand Up @@ -70891,7 +70891,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
<span
class="ant-transfer-list-header-selected"
>
0
0 عدد
</span>
<span
class="ant-transfer-list-header-title"
Expand Down
26 changes: 21 additions & 5 deletions components/locale/fa_IR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ const localeValues: Locale = {
DatePicker,
TimePicker,
Calendar,
global: {
placeholder: 'لطفاً انتخاب کنید',
},
Table: {
filterTitle: 'منوی فیلتر',
filterConfirm: 'تایید',
filterReset: 'پاک کردن',
filterEmptyText: 'بدون فیلتر',
emptyText: 'بدون داده',
selectAll: 'انتخاب صفحه‌ی کنونی',
selectInvert: 'معکوس کردن انتخاب‌ها در صفحه ی کنونی',
selectNone: 'انتخاب هیچکدام',
selectionAll: 'انتخاب همه داده‌ها',
sortTitle: 'مرتب سازی',
expand: 'باز شدن ردیف',
Expand All @@ -39,8 +45,14 @@ const localeValues: Locale = {
Transfer: {
titles: ['', ''],
searchPlaceholder: 'جستجو',
itemUnit: '',
itemsUnit: '',
itemUnit: 'عدد',
itemsUnit: 'عدد',
remove: 'حذف',
selectCurrent: 'انتخاب صفحه فعلی',
removeCurrent: 'پاک کردن انتخاب‌های صفحه فعلی',
selectAll: 'انتخاب همه',
removeAll: 'پاک کردن همه انتخاب‌ها',
selectInvert: 'معکوس کردن انتخاب‌ها در صفحه ی کنونی',
},
Upload: {
uploading: 'در حال آپلود...',
Expand All @@ -57,14 +69,15 @@ const localeValues: Locale = {
},
Text: {
edit: 'ویرایش',
copy: 'کپس',
copy: 'کپی',
copied: 'کپی شد',
expand: 'توسعه',
},
PageHeader: {
back: 'برگشت',
},
Form: {
optional: '(اختیاری)',
defaultValidateMessages: {
default: 'خطا در ${label}',
required: 'فیلد ${label} اجباریست',
Expand Down Expand Up @@ -104,15 +117,18 @@ const localeValues: Locale = {
},
array: {
len: 'تعداد ${label} باید ${len} باشد.',
min: 'تعداد ${lable} حداقل باید ${min} باشد',
max: 'تعداد ${lable} حداکثر باید ${max} باشد',
min: 'تعداد ${label} حداقل باید ${min} باشد',
max: 'تعداد ${label} حداکثر باید ${max} باشد',
range: 'مقدار ${label} باید بین ${min}-${max} باشد',
},
pattern: {
mismatch: 'الگوی ${label} با ${pattern} برابری نمی‌کند',
},
},
},
Image: {
preview: 'نمایش',
},
};

export default localeValues;
1 change: 1 addition & 0 deletions components/time-picker/locale/fa_IR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { TimePickerLocale } from '../index';

const locale: TimePickerLocale = {
placeholder: 'انتخاب زمان',
rangePlaceholder: ['زمان شروع', 'زمان پایان'],
};

export default locale;

0 comments on commit 0fc2729

Please sign in to comment.