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

add spanish locale config #75

Merged
merged 1 commit into from
Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
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',
};