mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
parent
35b07c7431
commit
8f3451396f
@ -2,8 +2,8 @@ import React, { Component, createContext, useMemo } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { getMessage } from '../helpers/utils/i18n-helper';
|
import { getMessage } from '../helpers/utils/i18n-helper';
|
||||||
import { getCurrentLocale } from '../ducks/metamask/metamask';
|
|
||||||
import {
|
import {
|
||||||
|
getCurrentLocale,
|
||||||
getCurrentLocaleMessages,
|
getCurrentLocaleMessages,
|
||||||
getEnLocaleMessages,
|
getEnLocaleMessages,
|
||||||
} from '../ducks/locale/locale';
|
} from '../ducks/locale/locale';
|
||||||
|
@ -6,12 +6,15 @@ export default function reduceLocaleMessages(state = {}, { type, value }) {
|
|||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
current: value.messages,
|
current: value.messages,
|
||||||
|
currentLocale: value.locale,
|
||||||
};
|
};
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getCurrentLocale = (state) => state.localeMessages.currentLocale;
|
||||||
|
|
||||||
export const getCurrentLocaleMessages = (state) => state.localeMessages.current;
|
export const getCurrentLocaleMessages = (state) => state.localeMessages.current;
|
||||||
|
|
||||||
export const getEnLocaleMessages = (state) => state.localeMessages.en;
|
export const getEnLocaleMessages = (state) => state.localeMessages.en;
|
||||||
|
Loading…
Reference in New Issue
Block a user