Bläddra i källkod

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

j8
Michael Telatynski 5 år sedan
förälder
incheckning
79f4531bd2
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 10 tillägg och 4 borttagningar
  1. 10
    4
      react/features/toolbox/components/web/OverflowMenuProfileItem.js

+ 10
- 4
react/features/toolbox/components/web/OverflowMenuProfileItem.js Visa fil

@@ -3,6 +3,7 @@
3 3
 import React, { Component } from 'react';
4 4
 
5 5
 import { Avatar } from '../../../base/avatar';
6
+import { translate } from '../../../base/i18n';
6 7
 import { getLocalParticipant } from '../../../base/participants';
7 8
 import { connect } from '../../../base/redux';
8 9
 
@@ -28,7 +29,12 @@ type Props = {
28 29
      * The callback to invoke when {@code OverflowMenuProfileItem} is
29 30
      * clicked.
30 31
      */
31
-    onClick: Function
32
+    onClick: Function,
33
+
34
+    /**
35
+     * Invoked to obtain translated strings.
36
+     */
37
+    t: Function
32 38
 };
33 39
 
34 40
 /**
@@ -58,7 +64,7 @@ class OverflowMenuProfileItem extends Component<Props> {
58 64
      * @returns {ReactElement}
59 65
      */
60 66
     render() {
61
-        const { _localParticipant, _unclickable } = this.props;
67
+        const { _localParticipant, _unclickable, t } = this.props;
62 68
         const classNames = `overflow-menu-item ${
63 69
             _unclickable ? 'unclickable' : ''}`;
64 70
         let displayName;
@@ -71,7 +77,7 @@ class OverflowMenuProfileItem extends Component<Props> {
71 77
 
72 78
         return (
73 79
             <li
74
-                aria-label = 'Edit your profile'
80
+                aria-label = { t('toolbar.accessibilityLabel.profile') }
75 81
                 className = { classNames }
76 82
                 onClick = { this._onClick }>
77 83
                 <span className = 'overflow-menu-item-icon'>
@@ -119,4 +125,4 @@ function _mapStateToProps(state) {
119 125
     };
120 126
 }
121 127
 
122
-export default connect(_mapStateToProps)(OverflowMenuProfileItem);
128
+export default translate(connect(_mapStateToProps)(OverflowMenuProfileItem));

Laddar…
Avbryt
Spara