diff options
ui - settings - derrive locales from index
-rw-r--r-- | ui/app/settings.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/ui/app/settings.js b/ui/app/settings.js index 7443f2bd4..e855d6324 100644 --- a/ui/app/settings.js +++ b/ui/app/settings.js @@ -9,6 +9,7 @@ const { exportAsFile } = require('./util') const TabBar = require('./components/tab-bar') const SimpleDropdown = require('./components/dropdowns/simple-dropdown') const ToggleButton = require('react-toggle-button') +const locales = require('../../app/_locales/index.json') const { OLD_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums const getInfuraCurrencyOptions = () => { @@ -25,13 +26,6 @@ const getInfuraCurrencyOptions = () => { }) } -const locales = [ - { name: 'English', code: 'en' }, - { name: 'Japanese', code: 'ja' }, - { name: 'French', code: 'fr' }, - { name: 'Spanish', code: 'es' }, -] - const getLocaleOptions = () => { return locales.map((locale) => { return { @@ -491,4 +485,3 @@ const mapDispatchToProps = dispatch => { } module.exports = connect(mapStateToProps, mapDispatchToProps)(Settings) - |