mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 08:34:54 -04:00
replaces moment with luxon (#621)
This commit is contained in:
parent
733df9b94a
commit
20e296cb9b
12 changed files with 36 additions and 56 deletions
|
@ -1,34 +1,7 @@
|
|||
import i18n from 'i18next'
|
||||
import LanguageDetector from 'i18next-browser-languagedetector'
|
||||
import Backend from 'i18next-http-backend'
|
||||
import moment from 'moment'
|
||||
import 'moment/locale/ar'
|
||||
import 'moment/locale/ca'
|
||||
import 'moment/locale/cs'
|
||||
import 'moment/locale/da'
|
||||
import 'moment/locale/de'
|
||||
import 'moment/locale/el'
|
||||
import 'moment/locale/eo'
|
||||
import 'moment/locale/es'
|
||||
import 'moment/locale/fr'
|
||||
import 'moment/locale/hi'
|
||||
import 'moment/locale/hr'
|
||||
import 'moment/locale/id'
|
||||
import 'moment/locale/it'
|
||||
import 'moment/locale/ja'
|
||||
import 'moment/locale/ko'
|
||||
import 'moment/locale/nl'
|
||||
import 'moment/locale/pl'
|
||||
import 'moment/locale/pt'
|
||||
import 'moment/locale/ru'
|
||||
import 'moment/locale/sk'
|
||||
import 'moment/locale/sr'
|
||||
import 'moment/locale/sv'
|
||||
import 'moment/locale/tr'
|
||||
import 'moment/locale/uk'
|
||||
import 'moment/locale/vi'
|
||||
import 'moment/locale/zh-cn'
|
||||
import 'moment/locale/zh-tw'
|
||||
import { Settings } from 'luxon'
|
||||
import { initReactI18next } from 'react-i18next'
|
||||
|
||||
export const setUpI18n = async (): Promise<void> => {
|
||||
|
@ -48,5 +21,5 @@ export const setUpI18n = async (): Promise<void> => {
|
|||
}
|
||||
})
|
||||
|
||||
moment.locale(i18n.language)
|
||||
Settings.defaultLocale = i18n.language
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue