From 4cbf7bedbb945d83ed2194f2d10f631a5f1ffe8a Mon Sep 17 00:00:00 2001 From: KDSBrowne Date: Wed, 29 Mar 2017 08:22:26 -0700 Subject: [PATCH] add formatted message for userlist toggle btn label --- .../imports/ui/components/nav-bar/component.jsx | 15 +++++++++++---- bigbluebutton-html5/private/locales/en.json | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx b/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx index 0e4cde02e6..c251605273 100755 --- a/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx @@ -13,6 +13,14 @@ import DropdownTrigger from '/imports/ui/components/dropdown/trigger/component'; import DropdownContent from '/imports/ui/components/dropdown/content/component'; import DropdownList from '/imports/ui/components/dropdown/list/component'; import DropdownListItem from '/imports/ui/components/dropdown/list/item/component'; +import { defineMessages, injectIntl } from 'react-intl'; + + +const intlMessages = defineMessages({ + toggleUserListLabel: { + id: 'app.navBar.userListToggleBtnLabel', + }, +}); const propTypes = { presentationTitle: PropTypes.string.isRequired, @@ -58,7 +66,7 @@ class NavBar extends Component { } render() { - const { hasUnreadMessages, beingRecorded, isExpanded } = this.props; + const { hasUnreadMessages, beingRecorded, isExpanded, intl } = this.props; let toggleBtnClasses = {}; toggleBtnClasses[styles.btn] = true; @@ -72,7 +80,7 @@ class NavBar extends Component { ghost={true} circle={true} hideLabel={true} - label={'User-List Toggle'} + label={intl.formatMessage(intlMessages.toggleUserListLabel)} icon={'user'} className={cx(toggleBtnClasses)} aria-expanded={isExpanded} @@ -166,5 +174,4 @@ class NavBar extends Component { NavBar.propTypes = propTypes; NavBar.defaultProps = defaultProps; - -export default NavBar; +export default injectIntl(NavBar); diff --git a/bigbluebutton-html5/private/locales/en.json b/bigbluebutton-html5/private/locales/en.json index 4bb823b86d..04a0806d87 100755 --- a/bigbluebutton-html5/private/locales/en.json +++ b/bigbluebutton-html5/private/locales/en.json @@ -41,6 +41,7 @@ "app.navBar.settingsDropdown.leaveSessionDesc": "Leave the meeting", "app.navBar.settingsDropdown.exitFullScreenLabel": "Exit fullscreen", "app.navBar.settingsDropdown.exitFullScreenDesc": "Exit fullscreen mode", + "app.navBar.userListToggleBtnLabel": "User List Toggle", "app.leaveConfirmation.title": "Leave Session", "app.leaveConfirmation.message": "Do you want to leave this meeting?", "app.leaveConfirmation.confirmLabel": "Leave",