mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
feat(i18n): add deDE locale (#1513)
* feat(i18n): add deDE locale * docs: update CHANGELOGS
This commit is contained in:
parent
3a75d7b452
commit
cbd2c7beb6
@ -11,6 +11,10 @@
|
|||||||
|
|
||||||
- Fix `n-alert` `contentTextColor` and `titleTextColor` type theme variable not working, closes [#1495](https://github.com/TuSimple/naive-ui/issues/1495).
|
- Fix `n-alert` `contentTextColor` and `titleTextColor` type theme variable not working, closes [#1495](https://github.com/TuSimple/naive-ui/issues/1495).
|
||||||
|
|
||||||
|
### i18n
|
||||||
|
|
||||||
|
- Add deDE locale.
|
||||||
|
|
||||||
## 2.20.1 (2021-11-01)
|
## 2.20.1 (2021-11-01)
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
|
|
||||||
- 修复 `n-alert` `contentTextColor` 和 `titleTextColor` 的类型主题变量不起作用,关闭 [#1495](https://github.com/TuSimple/naive-ui/issues/1495)
|
- 修复 `n-alert` `contentTextColor` 和 `titleTextColor` 的类型主题变量不起作用,关闭 [#1495](https://github.com/TuSimple/naive-ui/issues/1495)
|
||||||
|
|
||||||
|
### i18n
|
||||||
|
|
||||||
|
- 新增 deDE locale
|
||||||
|
|
||||||
## 2.20.1 (2021-11-01)
|
## 2.20.1 (2021-11-01)
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
97
src/locales/common/deDE.ts
Normal file
97
src/locales/common/deDE.ts
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
import type { NLocale } from './enUS'
|
||||||
|
|
||||||
|
const deDE: NLocale = {
|
||||||
|
name: 'de-DE',
|
||||||
|
global: {
|
||||||
|
undo: 'Rückgängig',
|
||||||
|
redo: 'Wiederholen',
|
||||||
|
confirm: 'Bestätigen'
|
||||||
|
},
|
||||||
|
Popconfirm: {
|
||||||
|
positiveText: 'Bestätigen',
|
||||||
|
negativeText: 'Abbrechen'
|
||||||
|
},
|
||||||
|
Cascader: {
|
||||||
|
placeholder: 'Bitte auswählen',
|
||||||
|
loading: 'Wird geladen',
|
||||||
|
loadingRequiredMessage: (label: string): string =>
|
||||||
|
`Bitte laden Sie alle Unterpunkte von ${label}, bevor Sie es auswählen.`
|
||||||
|
},
|
||||||
|
Time: {
|
||||||
|
dateFormat: 'dd-MM-yyyy',
|
||||||
|
dateTimeFormat: 'dd-MM-yyyy HH:mm:ss'
|
||||||
|
},
|
||||||
|
DatePicker: {
|
||||||
|
yearFormat: 'yyyy',
|
||||||
|
monthFormat: 'MMM',
|
||||||
|
dayFormat: 'eeeeee',
|
||||||
|
clear: 'Löschen',
|
||||||
|
now: 'Jetzt',
|
||||||
|
confirm: 'Bestätigen',
|
||||||
|
selectTime: 'Uhrzeit auswählen',
|
||||||
|
selectDate: 'Datum auswählen',
|
||||||
|
datePlaceholder: 'Datum auswählen',
|
||||||
|
datetimePlaceholder: 'Datum und Uhrzeit auswählen',
|
||||||
|
monthPlaceholder: 'Monat auswählen',
|
||||||
|
startDatePlaceholder: 'Anfangsdatum',
|
||||||
|
endDatePlaceholder: 'Enddatum',
|
||||||
|
startDatetimePlaceholder: 'Anfangsdatum und Uhrzeit',
|
||||||
|
endDatetimePlaceholder: 'Enddatum und Uhrzeit',
|
||||||
|
monthBeforeYear: true,
|
||||||
|
firstDayOfWeek: 0 as 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
||||||
|
today: 'Heute'
|
||||||
|
},
|
||||||
|
DataTable: {
|
||||||
|
checkTableAll: 'Alles auswählen',
|
||||||
|
uncheckTableAll: 'Auswahl aufheben',
|
||||||
|
confirm: 'Bestätigen',
|
||||||
|
clear: 'Löschen'
|
||||||
|
},
|
||||||
|
Transfer: {
|
||||||
|
sourceTitle: 'Quelle',
|
||||||
|
targetTitle: 'Ziel'
|
||||||
|
},
|
||||||
|
Empty: {
|
||||||
|
description: 'Keine Daten'
|
||||||
|
},
|
||||||
|
Select: {
|
||||||
|
placeholder: 'Bitte auswählen'
|
||||||
|
},
|
||||||
|
TimePicker: {
|
||||||
|
placeholder: 'Uhrzeit auswählen',
|
||||||
|
positiveText: 'OK',
|
||||||
|
negativeText: 'Abbrechen',
|
||||||
|
now: 'Jetzt'
|
||||||
|
},
|
||||||
|
Pagination: {
|
||||||
|
goto: 'Gehe zu',
|
||||||
|
selectionSuffix: 'Seite'
|
||||||
|
},
|
||||||
|
DynamicTags: {
|
||||||
|
add: 'Hinzufügen'
|
||||||
|
},
|
||||||
|
Log: {
|
||||||
|
loading: 'Wird geladen'
|
||||||
|
},
|
||||||
|
Input: {
|
||||||
|
placeholder: 'Bitte ausfüllen'
|
||||||
|
},
|
||||||
|
InputNumber: {
|
||||||
|
placeholder: 'Bitte ausfüllen'
|
||||||
|
},
|
||||||
|
DynamicInput: {
|
||||||
|
create: 'Erstellen'
|
||||||
|
},
|
||||||
|
ThemeEditor: {
|
||||||
|
title: 'Theme Editor',
|
||||||
|
clearAllVars: 'Alle Variablen löschen',
|
||||||
|
clearSearch: 'Suche löschen',
|
||||||
|
filterCompName: 'Filter Komponentenname',
|
||||||
|
filterVarName: 'Filter Variablenname',
|
||||||
|
import: 'Importieren',
|
||||||
|
export: 'Exportieren',
|
||||||
|
restore: 'Auf Standard zurücksetzen'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default deDE
|
9
src/locales/date/deDE.ts
Normal file
9
src/locales/date/deDE.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import de from 'date-fns/locale/de'
|
||||||
|
import { NDateLocale } from './enUS'
|
||||||
|
|
||||||
|
const dateDeDE: NDateLocale = {
|
||||||
|
name: 'de-DE',
|
||||||
|
locale: de
|
||||||
|
}
|
||||||
|
|
||||||
|
export default dateDeDE
|
@ -7,12 +7,14 @@ import {
|
|||||||
ukUA,
|
ukUA,
|
||||||
jaJP,
|
jaJP,
|
||||||
idID,
|
idID,
|
||||||
|
deDE,
|
||||||
dateEnUS,
|
dateEnUS,
|
||||||
dateZhCN,
|
dateZhCN,
|
||||||
dateRuRU,
|
dateRuRU,
|
||||||
dateUkUA,
|
dateUkUA,
|
||||||
dateJaJP,
|
dateJaJP,
|
||||||
dateIdID,
|
dateIdID,
|
||||||
|
dateDeDE,
|
||||||
NConfigProvider,
|
NConfigProvider,
|
||||||
NDateLocale,
|
NDateLocale,
|
||||||
NLocale,
|
NLocale,
|
||||||
@ -82,5 +84,13 @@ describe('locale', () => {
|
|||||||
}
|
}
|
||||||
}).html()
|
}).html()
|
||||||
).toMatchSnapshot()
|
).toMatchSnapshot()
|
||||||
|
expect(
|
||||||
|
mount(Wrapper, {
|
||||||
|
props: {
|
||||||
|
dateLocale: dateDeDE,
|
||||||
|
locale: deDE
|
||||||
|
}
|
||||||
|
}).html()
|
||||||
|
).toMatchSnapshot()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -4,11 +4,13 @@ export { default as ruRU } from './common/ruRU'
|
|||||||
export { default as ukUA } from './common/ukUA'
|
export { default as ukUA } from './common/ukUA'
|
||||||
export { default as jaJP } from './common/jaJP'
|
export { default as jaJP } from './common/jaJP'
|
||||||
export { default as idID } from './common/idID'
|
export { default as idID } from './common/idID'
|
||||||
|
export { default as deDE } from './common/deDE'
|
||||||
export { default as dateZhCN } from './date/zhCN'
|
export { default as dateZhCN } from './date/zhCN'
|
||||||
export { default as dateEnUS } from './date/enUS'
|
export { default as dateEnUS } from './date/enUS'
|
||||||
export { default as dateRuRU } from './date/ruRU'
|
export { default as dateRuRU } from './date/ruRU'
|
||||||
export { default as dateUkUA } from './date/ukUA'
|
export { default as dateUkUA } from './date/ukUA'
|
||||||
export { default as dateJaJP } from './date/jaJP'
|
export { default as dateJaJP } from './date/jaJP'
|
||||||
export { default as dateIdID } from './date/idID'
|
export { default as dateIdID } from './date/idID'
|
||||||
|
export { default as dateDeDE } from './date/deDE'
|
||||||
export type { NLocale } from './common/enUS'
|
export type { NLocale } from './common/enUS'
|
||||||
export type { NDateLocale } from './date/enUS'
|
export type { NDateLocale } from './date/enUS'
|
||||||
|
Loading…
Reference in New Issue
Block a user