Fix Croatian localedata issues in mastodon.js (#2844)

* locale: added hr and oc react-intl locale data

* adds Croatian locale data in mastodon.js
* adds Occitan locale data in mastodon.js

Resolves #2667

* locale: sort locale data imports in mastodon.js

* locale: remove oc reference

* [react-intl](https://github.com/yahoo/react-intl) does not provide
  default locale data for Occitan. Hence removed from reference.
rebase/4.0.0rc2
Koala Yeung 2017-05-06 23:30:48 +08:00 committed by Eugen Rochko
parent 67b7d3d3b6
commit bd71327180
1 changed files with 10 additions and 8 deletions

View File

@ -44,25 +44,26 @@ import Mutes from '../features/mutes';
import Report from '../features/report';
import { IntlProvider, addLocaleData } from 'react-intl';
import ar from 'react-intl/locale-data/ar';
import en from 'react-intl/locale-data/en';
import bg from 'react-intl/locale-data/bg';
import de from 'react-intl/locale-data/de';
import en from 'react-intl/locale-data/en';
import eo from 'react-intl/locale-data/eo';
import es from 'react-intl/locale-data/es';
import fa from 'react-intl/locale-data/fa';
import fi from 'react-intl/locale-data/fi';
import fr from 'react-intl/locale-data/fr';
import he from 'react-intl/locale-data/he';
import hr from 'react-intl/locale-data/hr';
import hu from 'react-intl/locale-data/hu';
import id from 'react-intl/locale-data/id';
import it from 'react-intl/locale-data/it';
import ja from 'react-intl/locale-data/ja';
import pt from 'react-intl/locale-data/pt';
import nl from 'react-intl/locale-data/nl';
import no from 'react-intl/locale-data/no';
import pt from 'react-intl/locale-data/pt';
import ru from 'react-intl/locale-data/ru';
import uk from 'react-intl/locale-data/uk';
import zh from 'react-intl/locale-data/zh';
import bg from 'react-intl/locale-data/bg';
import id from 'react-intl/locale-data/id';
import getMessagesForLocale from '../locales';
import { hydrateStore } from '../actions/store';
import createStream from '../stream';
@ -76,26 +77,27 @@ const browserHistory = useRouterHistory(createBrowserHistory)({
});
addLocaleData([
...en,
...ar,
...bg,
...de,
...en,
...eo,
...es,
...fa,
...fi,
...fr,
...he,
...hr,
...hu,
...id,
...it,
...ja,
...pt,
...nl,
...no,
...pt,
...ru,
...uk,
...zh,
...bg,
...id,
]);
const getTopWhenReplacing = (previous, { location }) => location && location.action === 'REPLACE' && [0, 0];