浏览代码

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

master
Michael Telatynski 5 年前
父节点
当前提交
79f4531bd2
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 10 次插入4 次删除
  1. 10
    4
      react/features/toolbox/components/web/OverflowMenuProfileItem.js

+ 10
- 4
react/features/toolbox/components/web/OverflowMenuProfileItem.js 查看文件

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

正在加载...
取消
保存