Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update locale es_ES (Spanish) #5932

Merged
merged 2 commits into from
Apr 28, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update locale es_ES (Spanish)
  • Loading branch information
ginodeis committed Apr 27, 2017
commit 58fc2b89cb7944e5d387aeccd7f766e97eff3fc9
2 changes: 2 additions & 0 deletions components/calendar/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 1,2 @@
import es_ES from '../../date-picker/locale/es_ES';
export default es_ES;
17 changes: 17 additions & 0 deletions components/date-picker/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -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;
47 changes: 30 additions & 17 deletions components/locale-provider/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -1,31 1,44 @@
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',
filterTitle: 'Filtrar Menu',
filterConfirm: 'OK',
filterReset: 'Resetear',
emptyText: 'No Hay Datos',
selectAll: 'Seleccionar Todo',
selectInvert: 'Invertir Selección',
},
Modal: {
okText: 'OK',
cancelText: 'Cancelar',
justOkText: 'OK',
okText: 'OK',
cancelText: 'Cancelar',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancelar',
okText: 'OK',
cancelText: 'Cancelar',
Copy link
Member

@afc163 afc163 Apr 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't modify the indent, which should be 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm stupid.

},
Transfer: {
notFoundContent: 'No Encontrado',
searchPlaceholder: 'Buscar Aquí',
itemUnit: 'item',
itemsUnit: 'items',
notFoundContent: 'No Encontrado',
searchPlaceholder: 'Buscar aquí',
itemUnit: 'item',
itemsUnit: 'items',
},
Select: {
notFoundContent: 'No Encontrado',
},
Upload: {
uploading: 'Subiendo...',
removeFile: 'Eliminar archivo',
uploadError: 'Error de subida',
previewFile: 'Vista previa',
},
};
5 changes: 5 additions & 0 deletions components/time-picker/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 1,5 @@
const locale = {
placeholder: 'Seleccionar hora',
};

export default locale;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down