Skip to content

Commit

Permalink
Merge pull request #75 from DavidNorena/add-esEs_locale
Browse files Browse the repository at this point in the history
add spanish locale config
  • Loading branch information
BANG88 authored Oct 20, 2018
2 parents 81e78a7 + 7c47f9d commit d84f044
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 1 deletion.
13 changes: 13 additions & 0 deletions components/date-picker-view/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
calendar: {
// in minutes
timezoneOffset: 1 * 60,
firstDayOfWeek: 0,
minimalDaysInFirstWeek: 1,
},
year: '',
month: '',
day: '',
hour: '',
minute: '',
};
18 changes: 18 additions & 0 deletions components/date-picker/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default {
okText: 'OK',
dismissText: 'Cancelar',
extra: 'Seleccione',
DatePickerLocale: {
calendar: {
// in minutes
timezoneOffset: 1 * 60,
firstDayOfWeek: 0,
minimalDaysInFirstWeek: 1,
},
year: '',
month: '',
day: '',
hour: '',
minute: '',
}
};
5 changes: 5 additions & 0 deletions components/input-item/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
confirmLabel: 'OK',
backspaceLabel: 'Retroceso',
cancelKeyboardLabel: 'Cancelar Teclado',
};
8 changes: 7 additions & 1 deletion components/locale-provider/demo/basic.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Pagination, LocaleProvider, List, DatePicker, WhiteSpace, WingBlank,
Picker, SearchBar,
} from 'antd-mobile-rn';
import esES from '../es_ES';
import enUS from '../en_US';
import ruRU from '../ru_RU';

Expand Down Expand Up @@ -47,7 +48,7 @@ const Page = () => (
<List.Item arrow="horizontal">DatePicker</List.Item>
</DatePicker>
<Picker data={seasons} cascade={false}>
<List.Item arrow="horizontal">picker</List.Item>
<List.Item arrow="horizontal">Picker</List.Item>
</Picker>
<WhiteSpace />
<SearchBar placeholder="Search" showCancelButton />
Expand Down Expand Up @@ -87,6 +88,11 @@ export default class LocaleProviderExample extends React.Component<any, any> {
label: 'Русский',
language: ruRU,
},
{
value: 'Español',
label: 'Español',
language: esES
}
];
const currentLocale = languages.find(item => item.value === locale).language;

Expand Down
16 changes: 16 additions & 0 deletions components/locale-provider/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import DatePicker from '../date-picker/locale/es_ES';
import DatePickerView from '../date-picker-view/locale/es_ES';
import InputItem from '../input-item/locale/es_ES';
import Pagination from '../pagination/locale/es_ES';
import Picker from '../picker/locale/es_ES';
import SearchBar from '../search-bar/locale/es_ES';

export default {
locale: 'es',
DatePicker,
DatePickerView,
InputItem,
Pagination,
Picker,
SearchBar,
};
4 changes: 4 additions & 0 deletions components/pagination/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
prevText: 'Ant',
nextText: 'Sig',
};
5 changes: 5 additions & 0 deletions components/picker/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
okText: 'OK',
dismissText: 'Cancelar',
extra: 'Seleccione',
};
3 changes: 3 additions & 0 deletions components/search-bar/locale/es_ES.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
cancelText: 'Cancelar',
};

0 comments on commit d84f044

Please sign in to comment.