From 8b181c38f3ab8b3a1345d5329f5c50a0684bc2b1 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 4 Jun 2020 19:43:53 -0500 Subject: [PATCH] Fix i18n streaming.js --- app/soapbox/actions/streaming.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/soapbox/actions/streaming.js b/app/soapbox/actions/streaming.js index d02e18746..6cb7db45c 100644 --- a/app/soapbox/actions/streaming.js +++ b/app/soapbox/actions/streaming.js @@ -9,14 +9,13 @@ import { import { updateNotificationsQueue, expandNotifications } from './notifications'; import { updateConversations } from './conversations'; import { fetchFilters } from './filters'; -import { getLocale } from '../locales'; - -const { messages } = getLocale(); +import { getSettings } from 'soapbox/actions/settings'; +import messages from 'soapbox/locales/messages'; export function connectTimelineStream(timelineId, path, pollingRefresh = null, accept = null) { return connectStream (path, pollingRefresh, (dispatch, getState) => { - const locale = getState().getIn(['meta', 'locale']); + const locale = getSettings(getState()).get('locale'); return { onConnect() { @@ -36,7 +35,7 @@ export function connectTimelineStream(timelineId, path, pollingRefresh = null, a dispatch(deleteFromTimelines(data.payload)); break; case 'notification': - dispatch(updateNotificationsQueue(JSON.parse(data.payload), messages, locale, window.location.pathname)); + dispatch(updateNotificationsQueue(JSON.parse(data.payload), messages[locale], locale, window.location.pathname)); break; case 'conversation': dispatch(updateConversations(JSON.parse(data.payload)));