From 6cea99be9d0c0d12e4b138e1d8df9dbc8ad96651 Mon Sep 17 00:00:00 2001 From: Israel kusayev Date: Thu, 4 Jun 2020 09:31:25 +0300 Subject: [PATCH] :globe_with_meridians: adds Hebrew localisations for Form (#24716) --- components/locale/he_IL.tsx | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/components/locale/he_IL.tsx b/components/locale/he_IL.tsx index 99cca00fc2..5edab00c06 100644 --- a/components/locale/he_IL.tsx +++ b/components/locale/he_IL.tsx @@ -1,9 +1,12 @@ +/* eslint-disable no-template-curly-in-string */ import Pagination from 'rc-pagination/lib/locale/he_IL'; import DatePicker from '../date-picker/locale/he_IL'; import TimePicker from '../time-picker/locale/he_IL'; import Calendar from '../calendar/locale/he_IL'; import { Locale } from '../locale-provider'; +const typeTemplate = '${label} הוא לא ${type} תקין'; + const localeValues: Locale = { locale: 'he', Pagination, @@ -63,6 +66,55 @@ const localeValues: Locale = { PageHeader: { back: 'חזרה', }, + Form: { + defaultValidateMessages: { + default: 'ערך השדה שגוי ${label}', + required: 'בבקשה הזן ${label}', + enum: '${label} חייב להיות אחד מערכים אלו [${enum}]', + whitespace: '${label} לא יכול להיות ריק', + date: { + format: '${label} תאריך לא תקין', + parse: '${label} לא ניתן להמיר לתאריך', + invalid: '${label} הוא לא תאריך תקין', + }, + types: { + string: typeTemplate, + method: typeTemplate, + array: typeTemplate, + object: typeTemplate, + number: typeTemplate, + date: typeTemplate, + boolean: typeTemplate, + integer: typeTemplate, + float: typeTemplate, + regexp: typeTemplate, + email: typeTemplate, + url: typeTemplate, + hex: typeTemplate, + }, + string: { + len: '${label} חייב להיות ${len} תווים', + min: '${label} חייב להיות ${min} תווים', + max: '${label} מקסימום ${max} תווים', + range: '${label} חייב להיות בין ${min}-${max} תווים', + }, + number: { + len: '${label} חייב להיות שווה ל ${len}', + min: '${label} ערך מינימלי הוא ${min}', + max: '${label} ערך מקסימלי הוא ${max}', + range: '${label} חייב להיות בין ${min}-${max}', + }, + array: { + len: 'חייב להיות ${len} ${label}', + min: 'מינימום ${min} ${label}', + max: 'מקסימום ${max} ${label}', + range: 'הסכום של ${label} חייב להיות בין ${min}-${max}', + }, + pattern: { + mismatch: '${label} לא תואם לתבנית ${pattern}', + }, + }, + }, }; export default localeValues;