Skip to content

Commit

Permalink
fix: add missing localizations (#35430)
Browse files Browse the repository at this point in the history
* Add missing localizations

* Update snapshot
  • Loading branch information
velykanov committed May 8, 2022
1 parent 8b682a5 commit fcf2afd
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61497,7 +61497,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
<div
class="ant-empty-description"
>
No data
No Data
</div>
</div>
</div>
Expand Down Expand Up @@ -61722,7 +61722,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
<div
class="ant-empty-description"
>
No data
No Data
</div>
</div>
</div>
Expand Down Expand Up @@ -62794,7 +62794,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
<div
class="ant-empty-description"
>
No data
No Data
</div>
</div>
</td>
Expand Down
30 changes: 29 additions & 1 deletion components/locale/en_GB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ const localeValues: Locale = {
DatePicker,
TimePicker,
Calendar,
global: {
placeholder: 'Please select',
},
Table: {
filterTitle: 'Filter menu',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'No filters',
filterCheckall: 'Select all items',
filterSearchPlaceholder: 'Search in filters',
emptyText: 'No data',
selectAll: 'Select current page',
selectInvert: 'Invert current page',
Expand All @@ -40,9 +45,16 @@ const localeValues: Locale = {
cancelText: 'Cancel',
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Search here',
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Remove',
selectCurrent: 'Select current page',
removeCurrent: 'Remove current page',
selectAll: 'Select all data',
removeAll: 'Remove all data',
selectInvert: 'Invert current page',
},
Upload: {
uploading: 'Uploading...',
Expand All @@ -52,9 +64,22 @@ const localeValues: Locale = {
downloadFile: 'Download file',
},
Empty: {
description: 'No data',
description: 'No Data',
},
Icon: {
icon: 'icon',
},
Text: {
edit: 'Edit',
copy: 'Copy',
copied: 'Copied',
expand: 'Expand',
},
PageHeader: {
back: 'Back',
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
default: 'Field validation error for ${label}',
required: 'Please enter ${label}',
Expand Down Expand Up @@ -103,6 +128,9 @@ const localeValues: Locale = {
},
},
},
Image: {
preview: 'Preview',
},
};

export default localeValues;
92 changes: 91 additions & 1 deletion components/locale/uk_UA.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
/* eslint-disable no-template-curly-in-string */
import Pagination from 'rc-pagination/lib/locale/uk_UA';
import DatePicker from '../date-picker/locale/uk_UA';
import TimePicker from '../time-picker/locale/uk_UA';
import Calendar from '../calendar/locale/uk_UA';
import type { Locale } from '../locale-provider';

const typeTemplate = '${label} не є типом ${type}';

const localeValues: Locale = {
locale: 'uk',
Pagination,
DatePicker,
TimePicker,
Calendar,
global: {
placeholder: 'Будь ласка, оберіть',
},
Table: {
filterTitle: 'Фільтрувати',
filterConfirm: 'OK',
filterReset: 'Скинути',
selectAll: 'Обрати всі',
filterEmptyText: 'Фільтри відсутні',
filterCheckall: 'Обрати всі',
filterSearchPlaceholder: 'Пошук у фільтрах',
emptyText: 'Даних немає',
selectAll: 'Обрати всі на сторінці',
selectInvert: 'Інвертувати вибір',
selectNone: 'Очистити вибір',
selectionAll: 'Обрати всі',
sortTitle: 'Сортувати',
expand: 'Розгорнути рядок',
collapse: 'Згорнути рядок',
triggerDesc: 'Сортувати за спаданням',
triggerAsc: 'Сортувати за зростанням',
cancelSort: 'Відмінити сортування',
},
Modal: {
okText: 'Гаразд',
Expand All @@ -27,9 +45,16 @@ const localeValues: Locale = {
cancelText: 'Скасувати',
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Введіть текст для пошуку',
itemUnit: 'елем.',
itemsUnit: 'елем.',
remove: 'Видалити',
selectCurrent: 'Вибрати поточну сторінку',
removeCurrent: 'Скасувати вибір на сторінці',
selectAll: 'Вибрати всі дані',
removeAll: 'Скасувати вибір',
selectInvert: 'Інвертувати поточну сторінку',
},
Upload: {
uploading: 'Завантаження ...',
Expand All @@ -41,6 +66,71 @@ const localeValues: Locale = {
Empty: {
description: 'Даних немає',
},
Icon: {
icon: 'іконка',
},
Text: {
edit: 'Редагувати',
copy: 'Скопіювати',
copied: 'Скопійовано',
expand: 'Розширити',
},
PageHeader: {
back: 'Назад',
},
Form: {
optional: '(опціонально)',
defaultValidateMessages: {
default: 'Помилка валідації для поля ${label}',
required: 'Будь ласка, заповніть ${label}',
enum: 'Лише одне зі значень [${enum}] доступне для ${label}',
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: '${label} має містити ${len} елементи',
min: '${label} має містити не менш, ніж ${min} елементи',
max: '${label} має містити не більш, ніж ${max} елементи',
range: 'Кількість елементів в ${label} має бути в межах ${min}-${max}',
},
pattern: {
mismatch: '${label} не відповідає шаблону ${pattern}',
},
},
},
Image: {
preview: 'Попередній перегляд',
},
};

export default localeValues;

0 comments on commit fcf2afd

Please sign in to comment.