admin: add intl support in Logout component and add ru translations

This commit is contained in:
invader 2019-01-07 01:26:04 +03:00
parent ab80eff34b
commit dbd1d68ccc
2 changed files with 11 additions and 2 deletions

View File

@ -5,6 +5,7 @@
*/ */
import React from 'react'; import React from 'react';
import { FormattedMessage } from 'react-intl';
import { get } from 'lodash'; import { get } from 'lodash';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { ButtonDropdown, DropdownItem, DropdownMenu, DropdownToggle } from 'reactstrap'; import { ButtonDropdown, DropdownItem, DropdownMenu, DropdownToggle } from 'reactstrap';
@ -40,10 +41,16 @@ class Logout extends React.Component { // eslint-disable-line react/prefer-state
</DropdownToggle> </DropdownToggle>
<DropdownMenu className={styles.dropDownContent}> <DropdownMenu className={styles.dropDownContent}>
<DropdownItem onClick={this.handleGoTo} className={styles.item}> <DropdownItem onClick={this.handleGoTo} className={styles.item}>
Profile <FormattedMessage
id="app.components.Logout.profile"
defaultMessage="Profile"
/>
</DropdownItem> </DropdownItem>
<DropdownItem onClick={this.handleLogout}> <DropdownItem onClick={this.handleLogout}>
Logout <FormattedMessage
id="app.components.Logout.logout"
defaultMessage="Logout"
/>
<i className="fa fa-sign-out" /> <i className="fa fa-sign-out" />
</DropdownItem> </DropdownItem>
</DropdownMenu> </DropdownMenu>

View File

@ -75,6 +75,8 @@
"app.components.ListPluginsPage.description": "Список установленых плагинов.", "app.components.ListPluginsPage.description": "Список установленых плагинов.",
"app.components.ListPluginsPage.helmet.title": "Список плагинов", "app.components.ListPluginsPage.helmet.title": "Список плагинов",
"app.components.ListPluginsPage.title": "Плагины", "app.components.ListPluginsPage.title": "Плагины",
"app.components.Logout.profile": "Профиль",
"app.components.Logout.logout": "Выйти",
"app.components.NotFoundPage.back": "Вернуться на главную", "app.components.NotFoundPage.back": "Вернуться на главную",
"app.components.NotFoundPage.description": "Не найдено", "app.components.NotFoundPage.description": "Не найдено",
"app.components.Official": "Официальный", "app.components.Official": "Официальный",