Refactor i18n calendar formatter
This commit is contained in:
parent
1020a54a33
commit
c86c7beb24
|
@ -2,13 +2,11 @@
|
|||
|
||||
import moment from 'moment';
|
||||
|
||||
import { i18next } from '../i18n';
|
||||
import i18next from './i18next';
|
||||
|
||||
// MomentJS uses static language bundle loading, so in order to support dynamic
|
||||
// language selection in the app we need to load all bundles that we support in
|
||||
// the app.
|
||||
// FIXME: If we decide to support MomentJS in other features as well we may need
|
||||
// to move this import and the lenient matcher to the i18n feature.
|
||||
require('moment/locale/bg');
|
||||
require('moment/locale/de');
|
||||
require('moment/locale/eo');
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
export * from './dateUtil';
|
||||
export * from './functions';
|
||||
|
||||
// TODO Eventually (e.g. when the non-React Web app is rewritten into React), it
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
export * from './dateUtil';
|
||||
export * from './helpers';
|
||||
export * from './loadScript';
|
||||
export * from './randomUtil';
|
||||
|
|
|
@ -9,10 +9,9 @@ import { connect } from 'react-redux';
|
|||
|
||||
import { appNavigate } from '../../app';
|
||||
import { getURLWithoutParams } from '../../base/connection';
|
||||
import { translate } from '../../base/i18n';
|
||||
import { getLocalizedDateFormatter, translate } from '../../base/i18n';
|
||||
import { Icon } from '../../base/font-icons';
|
||||
import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui';
|
||||
import { getLocalizedDateFormatter } from '../../base/util';
|
||||
|
||||
import styles from './styles';
|
||||
|
||||
|
|
|
@ -5,9 +5,8 @@ import { connect } from 'react-redux';
|
|||
import { refreshCalendarEntryList } from '../actions';
|
||||
|
||||
import { appNavigate } from '../../app';
|
||||
import { translate } from '../../base/i18n';
|
||||
import { getLocalizedDateFormatter, translate } from '../../base/i18n';
|
||||
import { NavigateSectionList } from '../../base/react';
|
||||
import { getLocalizedDateFormatter } from '../../base/util';
|
||||
|
||||
type Props = {
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@ import React, { Component } from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
|
||||
import { appNavigate } from '../../app';
|
||||
import { translate } from '../../base/i18n';
|
||||
import { NavigateSectionList } from '../../base/react';
|
||||
import {
|
||||
getLocalizedDateFormatter,
|
||||
getLocalizedDurationFormatter,
|
||||
parseURIString
|
||||
} from '../../base/util';
|
||||
translate
|
||||
} from '../../base/i18n';
|
||||
import { NavigateSectionList } from '../../base/react';
|
||||
import { parseURIString } from '../../base/util';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link RecentList}
|
||||
|
|
Loading…
Reference in New Issue