lang: allow translation of accessibility label string "Edit your profile"

This commit is contained in:
Michael Telatynski 2020-05-25 10:26:25 +01:00 committed by GitHub
parent 5348fa19c8
commit 79f4531bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -3,6 +3,7 @@
import React, { Component } from 'react';
import { Avatar } from '../../../base/avatar';
import { translate } from '../../../base/i18n';
import { getLocalParticipant } from '../../../base/participants';
import { connect } from '../../../base/redux';
@ -28,7 +29,12 @@ type Props = {
* The callback to invoke when {@code OverflowMenuProfileItem} is
* clicked.
*/
onClick: Function
onClick: Function,
/**
* Invoked to obtain translated strings.
*/
t: Function
};
/**
@ -58,7 +64,7 @@ class OverflowMenuProfileItem extends Component<Props> {
* @returns {ReactElement}
*/
render() {
const { _localParticipant, _unclickable } = this.props;
const { _localParticipant, _unclickable, t } = this.props;
const classNames = `overflow-menu-item ${
_unclickable ? 'unclickable' : ''}`;
let displayName;
@ -71,7 +77,7 @@ class OverflowMenuProfileItem extends Component<Props> {
return (
<li
aria-label = 'Edit your profile'
aria-label = { t('toolbar.accessibilityLabel.profile') }
className = { classNames }
onClick = { this._onClick }>
<span className = 'overflow-menu-item-icon'>
@ -119,4 +125,4 @@ function _mapStateToProps(state) {
};
}
export default connect(_mapStateToProps)(OverflowMenuProfileItem);
export default translate(connect(_mapStateToProps)(OverflowMenuProfileItem));