瀏覽代碼

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.
j8
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
         "showSpeakerStats": "Show speaker stats"
46
         "showSpeakerStats": "Show speaker stats"
47
     },
47
     },
48
     "welcomepage":{
48
     "welcomepage":{
49
+        "accessibilityLabel": {
50
+            "join": "Tap to join",
51
+            "roomname": "Enter room name"
52
+        },
49
         "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.",
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
         "audioVideoSwitch": {
54
         "audioVideoSwitch": {
51
             "audio": "Voice",
55
             "audio": "Voice",
72
         "rejoinKeyTitle": "Rejoin"
76
         "rejoinKeyTitle": "Rejoin"
73
     },
77
     },
74
     "toolbar": {
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
         "addPeople": "Add people to your call",
106
         "addPeople": "Add people to your call",
76
         "audioonly": "Enable / Disable audio only mode (saves bandwidth)",
107
         "audioonly": "Enable / Disable audio only mode (saves bandwidth)",
77
         "audioOnlyOn": "Enable audio only mode (saves bandwidth)",
108
         "audioOnlyOn": "Enable audio only mode (saves bandwidth)",
207
         "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>."
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
     "dialog": {
240
     "dialog": {
241
+        "accessibilityLabel": {
242
+            "liveStreaming": "Live Stream"
243
+        },
210
         "allow": "Allow",
244
         "allow": "Allow",
211
         "confirm": "Confirm",
245
         "confirm": "Confirm",
212
         "kickMessage": "Ouch! You have been kicked out of the meet!",
246
         "kickMessage": "Ouch! You have been kicked out of the meet!",
523
         "veryGood": "Very Good"
557
         "veryGood": "Very Good"
524
     },
558
     },
525
     "info": {
559
     "info": {
560
+        "accessibilityLabel": "Show info",
526
         "addPassword": "Add password",
561
         "addPassword": "Add password",
527
         "cancelPassword": "Cancel password",
562
         "cancelPassword": "Cancel password",
528
         "conferenceURL": "Link:",
563
         "conferenceURL": "Link:",

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

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

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

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

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

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

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

9
 export default class AbstractAudioMuteButton<P: Props, S: *>
9
 export default class AbstractAudioMuteButton<P: Props, S: *>
10
     extends AbstractButton<P, S> {
10
     extends AbstractButton<P, S> {
11
 
11
 
12
-    accessibilityLabel = 'Audio mute';
13
     iconName = 'icon-microphone';
12
     iconName = 'icon-microphone';
14
     toggledIconName = 'icon-mic-disabled toggled';
13
     toggledIconName = 'icon-mic-disabled toggled';
15
 
14
 

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

9
 export default class AbstractHangupButton<P : Props, S: *>
9
 export default class AbstractHangupButton<P : Props, S: *>
10
     extends AbstractButton<P, S> {
10
     extends AbstractButton<P, S> {
11
 
11
 
12
-    accessibilityLabel = 'Hangup';
13
     iconName = 'icon-hangup';
12
     iconName = 'icon-hangup';
14
 
13
 
15
     /**
14
     /**

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

146
         return this._maybeTranslateAttribute(this.props.tooltip);
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
      * Utility function to translate the given string, if a translation
161
      * Utility function to translate the given string, if a translation
151
      * function is available.
162
      * function is available.

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

9
 export default class AbstractVideoMuteButton<P : Props, S : *>
9
 export default class AbstractVideoMuteButton<P : Props, S : *>
10
     extends AbstractButton<P, S> {
10
     extends AbstractButton<P, S> {
11
 
11
 
12
-    accessibilityLabel = 'Video mute';
13
     iconName = 'icon-camera';
12
     iconName = 'icon-camera';
14
     toggledIconName = 'icon-camera-disabled toggled';
13
     toggledIconName = 'icon-camera-disabled toggled';
15
 
14
 

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

50
      */
50
      */
51
     _renderItem() {
51
     _renderItem() {
52
         const {
52
         const {
53
-            accessibilityLabel,
54
             disabled,
53
             disabled,
55
             onClick,
54
             onClick,
56
             showLabel,
55
             showLabel,
83
 
82
 
84
         return (
83
         return (
85
             <TouchableHighlight
84
             <TouchableHighlight
86
-                accessibilityLabel = { accessibilityLabel }
85
+                accessibilityLabel = { this.accessibilityLabel }
87
                 disabled = { disabled }
86
                 disabled = { disabled }
88
                 onPress = { onClick }
87
                 onPress = { onClick }
89
                 style = { style }
88
                 style = { style }

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

21
      */
21
      */
22
     _renderItem() {
22
     _renderItem() {
23
         const {
23
         const {
24
-            accessibilityLabel,
25
             onClick,
24
             onClick,
26
             showLabel
25
             showLabel
27
         } = this.props;
26
         } = this.props;
28
         const props = {
27
         const props = {
29
-            'aria-label': accessibilityLabel,
28
+            'aria-label': this.accessibilityLabel,
30
             className: showLabel ? 'overflow-menu-item' : 'toolbox-button',
29
             className: showLabel ? 'overflow-menu-item' : 'toolbox-button',
31
             onClick
30
             onClick
32
         };
31
         };

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
取消
儲存