forked from vison123/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add pt_BR locale support (ant-design#4004)
- Loading branch information
Showing
5 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import pt_BR from '../../date-picker/locale/pt_BR'; | ||
export default pt_BR; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import CalendarLocale from 'rc-calendar/lib/locale/pt_BR'; | ||
import TimePickerLocale from '../../time-picker/locale/pt_BR'; | ||
import assign from 'object-assign'; | ||
|
||
// 统一合并为完整的 Locale | ||
const locale = { | ||
lang: assign({ | ||
placeholder: 'Selecionar data', | ||
rangePlaceholder: ['Data de início', 'Data de fim'], | ||
}, CalendarLocale), | ||
timePickerLocale: assign({}, TimePickerLocale), | ||
}; | ||
|
||
// All settings at: | ||
// https://github.com/ant-design/ant-design/issues/424 | ||
|
||
export default locale; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import moment from 'moment'; | ||
import 'moment/locale/pt-br'; | ||
moment.locale('pt-br'); | ||
|
||
import Pagination from '../pagination/locale/pt_BR'; | ||
import DatePicker from '../date-picker/locale/pt_BR'; | ||
import TimePicker from '../time-picker/locale/pt_BR'; | ||
import Calendar from '../calendar/locale/pt_BR'; | ||
|
||
export default { | ||
Pagination, | ||
DatePicker, | ||
TimePicker, | ||
Calendar, | ||
Table: { | ||
filterTitle: 'Filtro', | ||
filterConfirm: 'OK', | ||
filterReset: 'Resetar', | ||
emptyText: 'Não há dados', | ||
}, | ||
Modal: { | ||
okText: 'OK', | ||
cancelText: 'Cancelar', | ||
justOkText: 'OK', | ||
}, | ||
Popconfirm: { | ||
okText: 'OK', | ||
cancelText: 'Cancelar', | ||
}, | ||
Transfer: { | ||
notFoundContent: 'Não encontrado', | ||
searchPlaceholder: 'Procurar', | ||
itemUnit: 'item', | ||
itemsUnit: 'items', | ||
}, | ||
Select: { | ||
notFoundContent: 'Não encontrado', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default { | ||
// Options.jsx | ||
items_per_page: '/ páginas', | ||
jump_to: 'Vá até', | ||
page: '', | ||
|
||
// Pagination.jsx | ||
prev_page: 'Página anterior', | ||
next_page: 'Próxima página', | ||
prev_5: '5 páginas anteriores', | ||
next_5: '5 próximas páginas', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const locale = { | ||
placeholder: 'Hora', | ||
}; | ||
|
||
export default locale; |