From bd71327180fb4a938f5d98bbb2f1d6a624116d66 Mon Sep 17 00:00:00 2001 From: Koala Yeung Date: Sat, 6 May 2017 23:30:48 +0800 Subject: [PATCH] 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. --- app/javascript/mastodon/containers/mastodon.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index 4e40d73ef..648ce7cc8 100644 --- a/app/javascript/mastodon/containers/mastodon.js +++ b/app/javascript/mastodon/containers/mastodon.js @@ -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];