From 5c25452de8246b7dfa79bfff58e70f29de4ed6a7 Mon Sep 17 00:00:00 2001 From: Tino D Date: Fri, 28 Apr 2017 02:39:35 +0100 Subject: [PATCH] fix: update locale es_ES (Spanish) (#5932) * Update locale es_ES (Spanish) * Fix indent --- components/calendar/locale/es_ES.tsx | 2 ++ components/date-picker/locale/es_ES.tsx | 17 +++++++++++++++++ components/locale-provider/es_ES.tsx | 23 ++++++++++++++++++----- components/time-picker/locale/es_ES.tsx | 5 +++++ package.json | 2 +- 5 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 components/calendar/locale/es_ES.tsx create mode 100644 components/date-picker/locale/es_ES.tsx create mode 100644 components/time-picker/locale/es_ES.tsx diff --git a/components/calendar/locale/es_ES.tsx b/components/calendar/locale/es_ES.tsx new file mode 100644 index 000000000000..6270b85ad41c --- /dev/null +++ b/components/calendar/locale/es_ES.tsx @@ -0,0 +1,2 @@ +import es_ES from '../../date-picker/locale/es_ES'; +export default es_ES; diff --git a/components/date-picker/locale/es_ES.tsx b/components/date-picker/locale/es_ES.tsx new file mode 100644 index 000000000000..08d5e5cc71f5 --- /dev/null +++ b/components/date-picker/locale/es_ES.tsx @@ -0,0 +1,17 @@ +import CalendarLocale from 'rc-calendar/lib/locale/es_ES'; +import TimePickerLocale from '../../time-picker/locale/es_ES'; +import assign from 'object-assign'; + +// Merge into a locale object +const locale = { + lang: assign({ + placeholder: 'Seleccionar fecha', + rangePlaceholder: ['Fecha inicial', 'Fecha final'], + }, CalendarLocale), + timePickerLocale: assign({}, TimePickerLocale), +}; + +// All settings at: +// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json + +export default locale; diff --git a/components/locale-provider/es_ES.tsx b/components/locale-provider/es_ES.tsx index 45052b7ec5a3..78146c363628 100644 --- a/components/locale-provider/es_ES.tsx +++ b/components/locale-provider/es_ES.tsx @@ -1,17 +1,21 @@ -import Pagination from 'rc-pagination/lib/locale/en_US'; -import DatePicker from '../date-picker/locale/en_US'; -import TimePicker from '../time-picker/locale/en_US'; +import Pagination from 'rc-pagination/lib/locale/es_ES'; +import DatePicker from '../date-picker/locale/es_ES'; +import TimePicker from '../time-picker/locale/es_ES'; +import Calendar from '../calendar/locale/es_ES'; export default { - locale: 'en', + locale: 'es', Pagination, DatePicker, TimePicker, + Calendar, Table: { filterTitle: 'Filtrar Menu', filterConfirm: 'OK', filterReset: 'Resetear', emptyText: 'No Hay Datos', + selectAll: 'Seleccionar Todo', + selectInvert: 'Invertir Selección', }, Modal: { okText: 'OK', @@ -24,8 +28,17 @@ export default { }, Transfer: { notFoundContent: 'No Encontrado', - searchPlaceholder: 'Buscar Aquí', + searchPlaceholder: 'Buscar aquí', itemUnit: 'item', itemsUnit: 'items', }, + Select: { + notFoundContent: 'No Encontrado', + }, + Upload: { + uploading: 'Subiendo...', + removeFile: 'Eliminar archivo', + uploadError: 'Error de subida', + previewFile: 'Vista previa', + }, }; diff --git a/components/time-picker/locale/es_ES.tsx b/components/time-picker/locale/es_ES.tsx new file mode 100644 index 000000000000..cfd60a8b9360 --- /dev/null +++ b/components/time-picker/locale/es_ES.tsx @@ -0,0 +1,5 @@ +const locale = { + placeholder: 'Seleccionar hora', +}; + +export default locale; diff --git a/package.json b/package.json index 2412321b6acc..21a883e2bd5d 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "rc-input-number": "~3.4.4", "rc-menu": "~5.0.9", "rc-notification": "~1.4.0", - "rc-pagination": "~1.8.4", + "rc-pagination": "~1.8.7", "rc-progress": "~2.1.0", "rc-radio": "~2.0.0", "rc-rate": "~2.1.0",