diff --git a/src/components/LocalizationMenu/LocalizationMenu.jsx b/src/components/LocalizationMenu/LocalizationMenu.jsx index d6cc9bb..acbc241 100644 --- a/src/components/LocalizationMenu/LocalizationMenu.jsx +++ b/src/components/LocalizationMenu/LocalizationMenu.jsx @@ -1,7 +1,7 @@ import React from 'react'; import MenuItem from 'material-ui/MenuItem'; import styled from 'styled-components'; -import { SUPPORTED_LANGUAGES } from '../../utils'; +import { formatLanguages } from '../../utils'; const LanguageContainerDiv = styled.div` max-height: 300px; @@ -14,6 +14,8 @@ export default class LocalizationMenu extends React.Component { this.state = { open: false, }; + + this.formatLanguages = formatLanguages(); } handleOnClick = (event) => { @@ -28,8 +30,8 @@ export default class LocalizationMenu extends React.Component { return (
- {Object.entries(SUPPORTED_LANGUAGES).map(([name, lang]) => ( - + {Object.entries(this.formatLanguages).map(([name, lang]) => ( + { + nObj[key.charAt(0).toUpperCase() + key.slice(1)] = value; + } + ); + return nObj; + } + export const GITHUB_ISSUES_LINK = '//github.com/odota/underlords-web/issues'; export function generateURL(p: string) {