瀏覽代碼

fix(i18n) Accessiblity labels translations (#3071)

* fix(toolbar): accessibilityLabel should be translatable.

This commit adds a helper property to get the accessibilityLabel of an item,
providing a translation if one is available. This mimics the behavior of
label and tooltip.

* fix(toolbar) 'hangup' button accessibilityLabel i18n

* fix(toolbar) 'mute' button accessibilityLabel i18n

* fix(toolbar) 'videomute' button accessibilityLabel i18n

* fix(toolbar) 'moreActions' button accessibilityLabel i18n

* fix(toolbar) 'shareRoom' button accessibilityLabel i18n

* fix(toolbar) 'audioRoute' button accessibilityLabel i18n

* fix(toolbar) 'toggleCamera' button accessibilityLabel i18n

* fix(toolbar) 'audioOnly' button accessibilityLabel i18n

* fix(toolbar) 'roomLock' button accessibilityLabel i18n

* fix(toolbar) 'pip' button accessibilityLabel i18n

* fix(toolbar) 'invite' button accessibilityLabel i18n

* fix(toolbar) 'raiseHand' button accessibilityLabel i18n

* fix(toolbar) 'chat' button accessibilityLabel i18n

* fix(toolbar) 'shareYourScreen' button accessibilityLabel i18n

* fix(toolbar) 'fullScreen' button accessibilityLabel i18n

* fix(toolbar) 'sharedvideo' button accessibilityLabel i18n

* fix(toolbar) 'document' button accessibilityLabel i18n

* fix(toolbar) 'speakerStats' button accessibilityLabel i18n

* fix(toolbar) 'feedback' button accessibilityLabel i18n

* fix(toolbar) 'shortcuts' button accessibilityLabel i18n

* fix(toolbar) 'recording' button accessibilityLabel i18n

* fix(toolbar) 'settings' button accessibilityLabel i18n

* fix(welcomepage) accessibilityLabels i18n

* fix(toolbar) 'info' button accessibilityLabel i18n

* fix(i18n): Add translation to various aria-label property values.

* fix(i18n): Differentiate between overflow menu and button.
master
Guus der Kinderen 7 年之前
父節點
當前提交
ccf0c8a363
共有 28 個檔案被更改,包括 102 行新增34 行删除
  1. 35
    0
      lang/main.json
  2. 2
    0
      react/features/always-on-top/AudioMuteButton.js
  3. 3
    0
      react/features/always-on-top/HangupButton.js
  4. 2
    0
      react/features/always-on-top/VideoMuteButton.js
  5. 0
    1
      react/features/base/toolbox/components/AbstractAudioMuteButton.js
  6. 0
    1
      react/features/base/toolbox/components/AbstractHangupButton.js
  7. 11
    0
      react/features/base/toolbox/components/AbstractToolboxItem.js
  8. 0
    1
      react/features/base/toolbox/components/AbstractVideoMuteButton.js
  9. 1
    2
      react/features/base/toolbox/components/ToolboxItem.native.js
  10. 1
    2
      react/features/base/toolbox/components/ToolboxItem.web.js
  11. 1
    1
      react/features/invite/components/InfoDialogButton.web.js
  12. 1
    1
      react/features/invite/components/InviteButton.native.js
  13. 1
    1
      react/features/mobile/audio-mode/components/AudioRouteButton.js
  14. 1
    1
      react/features/mobile/picture-in-picture/components/PictureInPictureButton.js
  15. 1
    1
      react/features/room-lock/components/RoomLockButton.js
  16. 1
    1
      react/features/settings/components/web/SettingsButton.js
  17. 1
    0
      react/features/toolbox/components/AudioMuteButton.js
  18. 1
    0
      react/features/toolbox/components/HangupButton.js
  19. 1
    0
      react/features/toolbox/components/VideoMuteButton.js
  20. 1
    1
      react/features/toolbox/components/native/AudioOnlyButton.js
  21. 1
    1
      react/features/toolbox/components/native/OverflowMenuButton.js
  22. 1
    1
      react/features/toolbox/components/native/ToggleCameraButton.js
  23. 2
    1
      react/features/toolbox/components/web/OverflowMenuButton.js
  24. 1
    1
      react/features/toolbox/components/web/OverflowMenuLiveStreamingItem.js
  25. 1
    1
      react/features/toolbox/components/web/OverflowMenuProfileItem.js
  26. 24
    12
      react/features/toolbox/components/web/Toolbox.js
  27. 2
    1
      react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js
  28. 5
    2
      react/features/welcome/components/WelcomePage.native.js

+ 35
- 0
lang/main.json 查看文件

@@ -46,6 +46,10 @@
46 46
         "showSpeakerStats": "Show speaker stats"
47 47
     },
48 48
     "welcomepage":{
49
+        "accessibilityLabel": {
50
+            "join": "Tap to join",
51
+            "roomname": "Enter room name"
52
+        },
49 53
         "appDescription": "Go ahead, video chat with the whole team. In fact, invite everyone you know. __app__ is a fully encrypted, 100% open source video conferencing solution that you can use all day, every day, for free — with no account needed.",
50 54
         "audioVideoSwitch": {
51 55
             "audio": "Voice",
@@ -72,6 +76,33 @@
72 76
         "rejoinKeyTitle": "Rejoin"
73 77
     },
74 78
     "toolbar": {
79
+        "accessibilityLabel": {
80
+            "audioOnly": "Toggle audio only",
81
+            "audioRoute": "Select the audio route",
82
+            "callQuality": "Manage call quality",
83
+            "chat": "Toggle chat window",
84
+            "document": "Toggle shared document",
85
+            "feedback": "Leave feedback",
86
+            "fullScreen": "Toggle full screen",
87
+            "hangup": "Leave the call",
88
+            "invite": "Invite people",
89
+            "lockRoom": "Toggle room lock",
90
+            "moreActions": "Toggle more actions menu",
91
+            "moreActionsMenu": "More actions menu",
92
+            "mute": "Toggle mute audio",
93
+            "pip": "Toggle Picture-in-Picture mode",
94
+            "profile": "Edit your profile",
95
+            "raiseHand": "Toggle raise hand",
96
+            "recording": "Toggle recording",
97
+            "Settings": "Toggle settings",
98
+            "sharedvideo": "Toggle Youtube video sharing",
99
+            "shareRoom": "Invite someone",
100
+            "shareYourScreen": "Toggle screenshare",
101
+            "shortcuts": "Toggle shortcuts",
102
+            "speakerStats": "Toggle speaker statistics",
103
+            "toggleCamera": "Toggle camera",
104
+            "videomute": "Toggle mute video"
105
+        },
75 106
         "addPeople": "Add people to your call",
76 107
         "audioonly": "Enable / Disable audio only mode (saves bandwidth)",
77 108
         "audioOnlyOn": "Enable audio only mode (saves bandwidth)",
@@ -207,6 +238,9 @@
207 238
         "suboptimalExperienceDescription": "Eer... we are afraid your experience with __appName__ isn't going to be that great here. We are looking for ways to improve this but, until then, please try using one of the <a href='static/recommendedBrowsers.html' target='_blank'>fully supported browsers</a>."
208 239
     },
209 240
     "dialog": {
241
+        "accessibilityLabel": {
242
+            "liveStreaming": "Live Stream"
243
+        },
210 244
         "allow": "Allow",
211 245
         "confirm": "Confirm",
212 246
         "kickMessage": "Ouch! You have been kicked out of the meet!",
@@ -523,6 +557,7 @@
523 557
         "veryGood": "Very Good"
524 558
     },
525 559
     "info": {
560
+        "accessibilityLabel": "Show info",
526 561
         "addPassword": "Add password",
527 562
         "cancelPassword": "Cancel password",
528 563
         "conferenceURL": "Link:",

+ 2
- 0
react/features/always-on-top/AudioMuteButton.js 查看文件

@@ -27,6 +27,8 @@ type State = {
27 27
 export default class AudioMuteButton
28 28
     extends AbstractAudioMuteButton<Props, State> {
29 29
 
30
+    accessibilityLabel = 'Audio mute';
31
+
30 32
     /**
31 33
      * Initializes a new {@code AudioMuteButton} instance.
32 34
      *

+ 3
- 0
react/features/always-on-top/HangupButton.js 查看文件

@@ -9,6 +9,9 @@ const { api } = window.alwaysOnTop;
9 9
  * Stateless hangup button for the Always-on-Top windows.
10 10
  */
11 11
 export default class HangupButton extends AbstractHangupButton<Props, *> {
12
+
13
+    accessibilityLabel = 'Hangup';
14
+
12 15
     /**
13 16
      * Helper function to perform the actual hangup action.
14 17
      *

+ 2
- 0
react/features/always-on-top/VideoMuteButton.js 查看文件

@@ -27,6 +27,8 @@ type State = {
27 27
 export default class VideoMuteButton
28 28
     extends AbstractVideoMuteButton<Props, State> {
29 29
 
30
+    accessibilityLabel = 'Video mute';
31
+
30 32
     /**
31 33
      * Initializes a new {@code VideoMuteButton} instance.
32 34
      *

+ 0
- 1
react/features/base/toolbox/components/AbstractAudioMuteButton.js 查看文件

@@ -9,7 +9,6 @@ import type { Props } from './AbstractButton';
9 9
 export default class AbstractAudioMuteButton<P: Props, S: *>
10 10
     extends AbstractButton<P, S> {
11 11
 
12
-    accessibilityLabel = 'Audio mute';
13 12
     iconName = 'icon-microphone';
14 13
     toggledIconName = 'icon-mic-disabled toggled';
15 14
 

+ 0
- 1
react/features/base/toolbox/components/AbstractHangupButton.js 查看文件

@@ -9,7 +9,6 @@ import type { Props } from './AbstractButton';
9 9
 export default class AbstractHangupButton<P : Props, S: *>
10 10
     extends AbstractButton<P, S> {
11 11
 
12
-    accessibilityLabel = 'Hangup';
13 12
     iconName = 'icon-hangup';
14 13
 
15 14
     /**

+ 11
- 0
react/features/base/toolbox/components/AbstractToolboxItem.js 查看文件

@@ -146,6 +146,17 @@ export default class AbstractToolboxItem<P : Props> extends Component<P> {
146 146
         return this._maybeTranslateAttribute(this.props.tooltip);
147 147
     }
148 148
 
149
+    /**
150
+     * Helper property to get the item accessibilityLabel. If a translation
151
+     * function was provided then it will be translated using it.
152
+     *
153
+     * @protected
154
+     * @returns {?string}
155
+     */
156
+    get accessibilityLabel(): ?string {
157
+        return this._maybeTranslateAttribute(this.props.accessibilityLabel);
158
+    }
159
+
149 160
     /**
150 161
      * Utility function to translate the given string, if a translation
151 162
      * function is available.

+ 0
- 1
react/features/base/toolbox/components/AbstractVideoMuteButton.js 查看文件

@@ -9,7 +9,6 @@ import type { Props } from './AbstractButton';
9 9
 export default class AbstractVideoMuteButton<P : Props, S : *>
10 10
     extends AbstractButton<P, S> {
11 11
 
12
-    accessibilityLabel = 'Video mute';
13 12
     iconName = 'icon-camera';
14 13
     toggledIconName = 'icon-camera-disabled toggled';
15 14
 

+ 1
- 2
react/features/base/toolbox/components/ToolboxItem.native.js 查看文件

@@ -50,7 +50,6 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
50 50
      */
51 51
     _renderItem() {
52 52
         const {
53
-            accessibilityLabel,
54 53
             disabled,
55 54
             onClick,
56 55
             showLabel,
@@ -83,7 +82,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
83 82
 
84 83
         return (
85 84
             <TouchableHighlight
86
-                accessibilityLabel = { accessibilityLabel }
85
+                accessibilityLabel = { this.accessibilityLabel }
87 86
                 disabled = { disabled }
88 87
                 onPress = { onClick }
89 88
                 style = { style }

+ 1
- 2
react/features/base/toolbox/components/ToolboxItem.web.js 查看文件

@@ -21,12 +21,11 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
21 21
      */
22 22
     _renderItem() {
23 23
         const {
24
-            accessibilityLabel,
25 24
             onClick,
26 25
             showLabel
27 26
         } = this.props;
28 27
         const props = {
29
-            'aria-label': accessibilityLabel,
28
+            'aria-label': this.accessibilityLabel,
30 29
             className: showLabel ? 'overflow-menu-item' : 'toolbox-button',
31 30
             onClick
32 31
         };

+ 1
- 1
react/features/invite/components/InfoDialogButton.web.js 查看文件

@@ -170,7 +170,7 @@ class InfoDialogButton extends Component {
170 170
                     onClose = { this._onDialogClose }
171 171
                     position = { 'top right' }>
172 172
                     <ToolbarButton
173
-                        accessibilityLabel = 'Info'
173
+                        accessibilityLabel = { t('info.accessibilityLabel') }
174 174
                         iconName = { iconClass }
175 175
                         onClick = { this._onDialogToggle }
176 176
                         tooltip = { t('info.tooltip') } />

+ 1
- 1
react/features/invite/components/InviteButton.native.js 查看文件

@@ -52,7 +52,7 @@ const _SHARE_ROOM_TOOLBAR_BUTTON = true;
52 52
  * current call/conference/meeting.
53 53
  */
54 54
 class InviteButton extends AbstractButton<Props, *> {
55
-    accessibilityLabel = 'Share room';
55
+    accessibilityLabel = 'toolbar.accessibilityLabel.shareRoom';
56 56
     iconName = 'icon-link';
57 57
     label = 'toolbar.shareRoom';
58 58
 

+ 1
- 1
react/features/mobile/audio-mode/components/AudioRouteButton.js 查看文件

@@ -43,7 +43,7 @@ type Props = AbstractButtonProps & {
43 43
  * A toolbar button which triggers an audio route picker when pressed.
44 44
  */
45 45
 class AudioRouteButton extends AbstractButton<Props, *> {
46
-    accessibilityLabel = 'Audio route';
46
+    accessibilityLabel = 'toolbar.accessibilityLabel.audioRoute';
47 47
     iconName = 'icon-volume';
48 48
     label = 'toolbar.audioRoute';
49 49
 

+ 1
- 1
react/features/mobile/picture-in-picture/components/PictureInPictureButton.js 查看文件

@@ -26,7 +26,7 @@ type Props = AbstractButtonProps & {
26 26
  * An implementation of a button for entering Picture-in-Picture mode.
27 27
  */
28 28
 class PictureInPictureButton extends AbstractButton<Props, *> {
29
-    accessibilityLabel = 'Picture in picture';
29
+    accessibilityLabel = 'toolbar.accessibilityLabel.pip';
30 30
     iconName = 'icon-menu-down';
31 31
     label = 'toolbar.pip';
32 32
 

+ 1
- 1
react/features/room-lock/components/RoomLockButton.js 查看文件

@@ -32,7 +32,7 @@ type Props = AbstractButtonProps & {
32 32
  * An implementation of a button for locking / unlocking a room.
33 33
  */
34 34
 class RoomLockButton extends AbstractButton<Props, *> {
35
-    accessibilityLabel = 'Room lock';
35
+    accessibilityLabel = 'toolbar.accessibilityLabel.lockRoom';
36 36
     iconName = 'security';
37 37
     label = 'dialog.lockRoom';
38 38
     toggledIconName = 'security-locked';

+ 1
- 1
react/features/settings/components/web/SettingsButton.js 查看文件

@@ -36,7 +36,7 @@ type Props = AbstractButtonProps & {
36 36
  * An abstract implementation of a button for accessing settings.
37 37
  */
38 38
 class SettingsButton extends AbstractButton<Props, *> {
39
-    accessibilityLabel = 'Settings';
39
+    accessibilityLabel = 'toolbar.accessibilityLabel.Settings';
40 40
     iconName = 'icon-settings';
41 41
     label = 'toolbar.Settings';
42 42
     tooltip = 'toolbar.Settings';

+ 1
- 0
react/features/toolbox/components/AudioMuteButton.js 查看文件

@@ -40,6 +40,7 @@ type Props = AbstractButtonProps & {
40 40
  * @extends AbstractAudioMuteButton
41 41
  */
42 42
 class AudioMuteButton extends AbstractAudioMuteButton<Props, *> {
43
+    accessibilityLabel = 'toolbar.accessibilityLabel.mute';
43 44
     label = 'toolbar.mute';
44 45
     tooltip = 'toolbar.mute';
45 46
 

+ 1
- 0
react/features/toolbox/components/HangupButton.js 查看文件

@@ -26,6 +26,7 @@ type Props = AbstractButtonProps & {
26 26
  * @extends AbstractHangupButton
27 27
  */
28 28
 class HangupButton extends AbstractHangupButton<Props, *> {
29
+    accessibilityLabel = 'toolbar.accessibilityLabel.hangup';
29 30
     label = 'toolbar.hangup';
30 31
     tooltip = 'toolbar.hangup';
31 32
 

+ 1
- 0
react/features/toolbox/components/VideoMuteButton.js 查看文件

@@ -49,6 +49,7 @@ type Props = AbstractButtonProps & {
49 49
  * @extends AbstractVideoMuteButton
50 50
  */
51 51
 class VideoMuteButton extends AbstractVideoMuteButton<Props, *> {
52
+    accessibilityLabel = 'toolbar.accessibilityLabel.videomute';
52 53
     label = 'toolbar.videomute';
53 54
     tooltip = 'toolbar.videomute';
54 55
 

+ 1
- 1
react/features/toolbox/components/native/AudioOnlyButton.js 查看文件

@@ -27,7 +27,7 @@ type Props = AbstractButtonProps & {
27 27
  * An implementation of a button for toggling the audio-only mode.
28 28
  */
29 29
 class AudioOnlyButton extends AbstractButton<Props, *> {
30
-    accessibilityLabel = 'Audio only mode';
30
+    accessibilityLabel = 'toolbar.accessibilityLabel.audioOnly';
31 31
     iconName = 'visibility';
32 32
     label = 'toolbar.audioOnlyOn';
33 33
     toggledIconName = 'visibility-off';

+ 1
- 1
react/features/toolbox/components/native/OverflowMenuButton.js 查看文件

@@ -24,7 +24,7 @@ type Props = AbstractButtonProps & {
24 24
  * An implementation of a button for showing the {@code OverflowMenu}.
25 25
  */
26 26
 class OverflowMenuButton extends AbstractButton<Props, *> {
27
-    accessibilityLabel = 'Overflow menu';
27
+    accessibilityLabel = 'toolbar.accessibilityLabel.moreActions';
28 28
     iconName = 'icon-thumb-menu';
29 29
     label = 'toolbar.moreActions';
30 30
 

+ 1
- 1
react/features/toolbox/components/native/ToggleCameraButton.js 查看文件

@@ -33,7 +33,7 @@ type Props = AbstractButtonProps & {
33 33
  * An implementation of a button for toggling the camera facing mode.
34 34
  */
35 35
 class ToggleCameraButton extends AbstractButton<Props, *> {
36
-    accessibilityLabel = 'Toggle camera';
36
+    accessibilityLabel = 'toolbar.accessibilityLabel.toggleCamera';
37 37
     iconName = 'icon-switch-camera';
38 38
     label = 'toolbar.toggleCamera';
39 39
 

+ 2
- 1
react/features/toolbox/components/web/OverflowMenuButton.js 查看文件

@@ -73,7 +73,8 @@ class OverflowMenuButton extends Component {
73 73
                     onClose = { this._onCloseDialog }
74 74
                     position = { 'top right' }>
75 75
                     <ToolbarButton
76
-                        accessibilityLabel = 'Overflow'
76
+                        accessibilityLabel =
77
+                            { t('toolbar.accessibilityLabel.moreActions') }
77 78
                         iconName = { iconClasses }
78 79
                         onClick = { this._onToggleDialogVisibility }
79 80
                         tooltip = { t('toolbar.moreActions') } />

+ 1
- 1
react/features/toolbox/components/web/OverflowMenuLiveStreamingItem.js 查看文件

@@ -49,7 +49,7 @@ class OverflowMenuLiveStreamingItem extends Component<Props> {
49 49
 
50 50
         return (
51 51
             <li
52
-                aria-label = 'Live stream'
52
+                aria-label = { t('dialog.accessibilityLabel.liveStreaming') }
53 53
                 className = 'overflow-menu-item'
54 54
                 onClick = { onClick }>
55 55
                 <span className = 'overflow-menu-item-icon'>

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

@@ -74,7 +74,7 @@ class OverflowMenuProfileItem extends Component {
74 74
 
75 75
         return (
76 76
             <li
77
-                aria-label = 'Profile'
77
+                aria-label = 'Edit your profile'
78 78
                 className = { classNames }
79 79
                 onClick = { this._onClick }>
80 80
                 <span className = 'overflow-menu-item-icon'>

+ 24
- 12
react/features/toolbox/components/web/Toolbox.js 查看文件

@@ -336,6 +336,7 @@ class Toolbox extends Component<Props> {
336 336
         const overflowMenuContent = this._renderOverflowMenuContent();
337 337
         const overflowHasItems = Boolean(overflowMenuContent.filter(
338 338
             child => child).length);
339
+        const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu';
339 340
 
340 341
         return (
341 342
             <div
@@ -348,7 +349,8 @@ class Toolbox extends Component<Props> {
348 349
                         && this._renderDesktopSharingButton() }
349 350
                     { this._shouldShowButton('raisehand')
350 351
                         && <ToolbarButton
351
-                            accessibilityLabel = 'Raised hand'
352
+                            accessibilityLabel =
353
+                                { t('toolbar.accessibilityLabel.raiseHand') }
352 354
                             iconName = { _raisedHand
353 355
                                 ? 'icon-raised-hand toggled'
354 356
                                 : 'icon-raised-hand' }
@@ -357,7 +359,8 @@ class Toolbox extends Component<Props> {
357 359
                     { this._shouldShowButton('chat')
358 360
                         && <div className = 'toolbar-button-with-badge'>
359 361
                             <ToolbarButton
360
-                                accessibilityLabel = 'Chat'
362
+                                accessibilityLabel =
363
+                                    { t('toolbar.accessibilityLabel.chat') }
361 364
                                 iconName = { _chatOpen
362 365
                                     ? 'icon-chat toggled'
363 366
                                     : 'icon-chat' }
@@ -378,7 +381,8 @@ class Toolbox extends Component<Props> {
378 381
                     { this._shouldShowButton('invite')
379 382
                         && !_hideInviteButton
380 383
                         && <ToolbarButton
381
-                            accessibilityLabel = 'Invite'
384
+                            accessibilityLabel =
385
+                                { t('toolbar.accessibilityLabel.invite') }
382 386
                             iconName = 'icon-add'
383 387
                             onClick = { this._onToolbarOpenInvite }
384 388
                             tooltip = { t('toolbar.invite') } /> }
@@ -388,7 +392,7 @@ class Toolbox extends Component<Props> {
388 392
                             isOpen = { _overflowMenuVisible }
389 393
                             onVisibilityChange = { this._onSetOverflowVisible }>
390 394
                             <ul
391
-                                aria-label = 'Overflow menu'
395
+                                aria-label = { t(toolbarAccLabel) }
392 396
                                 className = 'overflow-menu'>
393 397
                                 { overflowMenuContent }
394 398
                             </ul>
@@ -946,7 +950,8 @@ class Toolbox extends Component<Props> {
946 950
 
947 951
         return (
948 952
             <ToolbarButton
949
-                accessibilityLabel = 'Screenshare'
953
+                accessibilityLabel
954
+                    = { t('toolbar.accessibilityLabel.shareYourScreen') }
950 955
                 iconName = { classNames }
951 956
                 onClick = { this._onToolbarToggleScreenshare }
952 957
                 tooltip = { tooltip } />
@@ -985,7 +990,8 @@ class Toolbox extends Component<Props> {
985 990
                     onClick = { this._onToolbarOpenVideoQuality } />,
986 991
             this._shouldShowButton('fullscreen')
987 992
                 && <OverflowMenuItem
988
-                    accessibilityLabel = 'Full screen'
993
+                    accessibilityLabel =
994
+                        { t('toolbar.accessibilityLabel.fullScreen') }
989 995
                     icon = { _fullScreen
990 996
                         ? 'icon-exit-full-screen'
991 997
                         : 'icon-full-screen' }
@@ -1005,7 +1011,8 @@ class Toolbox extends Component<Props> {
1005 1011
                 && this._renderRecordingButton(),
1006 1012
             this._shouldShowButton('sharedvideo')
1007 1013
                 && <OverflowMenuItem
1008
-                    accessibilityLabel = 'Shared video'
1014
+                    accessibilityLabel =
1015
+                        { t('toolbar.accessibilityLabel.sharedvideo') }
1009 1016
                     icon = 'icon-shared-video'
1010 1017
                     key = 'sharedvideo'
1011 1018
                     onClick = { this._onToolbarToggleSharedVideo }
@@ -1015,7 +1022,8 @@ class Toolbox extends Component<Props> {
1015 1022
             this._shouldShowButton('etherpad')
1016 1023
                 && _etherpadInitialized
1017 1024
                 && <OverflowMenuItem
1018
-                    accessibilityLabel = 'Etherpad'
1025
+                    accessibilityLabel =
1026
+                        { t('toolbar.accessibilityLabel.document') }
1019 1027
                     icon = 'icon-share-doc'
1020 1028
                     key = 'etherpad'
1021 1029
                     onClick = { this._onToolbarToggleEtherpad }
@@ -1028,7 +1036,8 @@ class Toolbox extends Component<Props> {
1028 1036
                 visible = { this._shouldShowButton('settings') } />,
1029 1037
             this._shouldShowButton('stats')
1030 1038
                 && <OverflowMenuItem
1031
-                    accessibilityLabel = 'Speaker stats'
1039
+                    accessibilityLabel =
1040
+                        { t('toolbar.accessibilityLabel.speakerStats') }
1032 1041
                     icon = 'icon-presentation'
1033 1042
                     key = 'stats'
1034 1043
                     onClick = { this._onToolbarOpenSpeakerStats }
@@ -1036,14 +1045,16 @@ class Toolbox extends Component<Props> {
1036 1045
             this._shouldShowButton('feedback')
1037 1046
                 && _feedbackConfigured
1038 1047
                 && <OverflowMenuItem
1039
-                    accessibilityLabel = 'Feedback'
1048
+                    accessibilityLabel =
1049
+                        { t('toolbar.accessibilityLabel.feedback') }
1040 1050
                     icon = 'icon-feedback'
1041 1051
                     key = 'feedback'
1042 1052
                     onClick = { this._onToolbarOpenFeedback }
1043 1053
                     text = { t('toolbar.feedback') } />,
1044 1054
             this._shouldShowButton('shortcuts')
1045 1055
                 && <OverflowMenuItem
1046
-                    accessibilityLabel = 'Shortcuts'
1056
+                    accessibilityLabel =
1057
+                        { t('toolbar.accessibilityLabel.shortcuts') }
1047 1058
                     icon = 'icon-open_in_new'
1048 1059
                     key = 'shortcuts'
1049 1060
                     onClick = { this._onToolbarOpenKeyboardShortcuts }
@@ -1067,7 +1078,8 @@ class Toolbox extends Component<Props> {
1067 1078
 
1068 1079
         return (
1069 1080
             <OverflowMenuItem
1070
-                accessibilityLabel = 'Record'
1081
+                accessibilityLabel =
1082
+                    { t('toolbar.accessibilityLabel.recording') }
1071 1083
                 icon = 'icon-camera-take-picture'
1072 1084
                 key = 'recording'
1073 1085
                 onClick = { this._onToolbarToggleRecording }

+ 2
- 1
react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js 查看文件

@@ -68,7 +68,8 @@ class OverflowMenuVideoQualityItem extends Component<Props> {
68 68
 
69 69
         return (
70 70
             <li
71
-                aria-label = 'Call quality'
71
+                aria-label =
72
+                    { this.props.t('toolbar.accessibilityLabel.callQuality') }
72 73
                 className = 'overflow-menu-item'
73 74
                 onClick = { this.props.onClick }>
74 75
                 <span className = 'overflow-menu-item-icon'>

+ 5
- 2
react/features/welcome/components/WelcomePage.native.js 查看文件

@@ -85,6 +85,7 @@ class WelcomePage extends AbstractWelcomePage {
85 85
      */
86 86
     render() {
87 87
         const { buttonStyle, pageStyle } = Header;
88
+        const roomnameAccLabel = 'welcomepage.accessibilityLabel.roomname';
88 89
         const { t } = this.props;
89 90
 
90 91
         return (
@@ -101,7 +102,7 @@ class WelcomePage extends AbstractWelcomePage {
101 102
                     <SafeAreaView style = { styles.roomContainer } >
102 103
                         <View style = { styles.joinControls } >
103 104
                             <TextInput
104
-                                accessibilityLabel = { 'Input room name.' }
105
+                                accessibilityLabel = { t(roomnameAccLabel) }
105 106
                                 autoCapitalize = 'none'
106 107
                                 autoComplete = { false }
107 108
                                 autoCorrect = { false }
@@ -219,6 +220,7 @@ class WelcomePage extends AbstractWelcomePage {
219 220
      * @returns {ReactElement}
220 221
      */
221 222
     _renderJoinButton() {
223
+        const { t } = this.props;
222 224
         let children;
223 225
 
224 226
         /* eslint-disable no-extra-parens */
@@ -248,7 +250,8 @@ class WelcomePage extends AbstractWelcomePage {
248 250
 
249 251
         return (
250 252
             <TouchableHighlight
251
-                accessibilityLabel = { 'Tap to Join.' }
253
+                accessibilityLabel =
254
+                    { t('welcomepage.accessibilityLabel.join') }
252 255
                 disabled = { buttonDisabled }
253 256
                 onPress = { this._onJoin }
254 257
                 style = { [

Loading…
取消
儲存