diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 4cb49d8c1e..b33bdd271d 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -902,9 +902,7 @@ module.exports = React.createClass({ }, _mapWebRtcDevicesToSpans: function(devices) { - return Object.keys(devices).map( - (deviceId) => {devices[deviceId]} - ); + return Object.keys(devices).map((deviceId) => {devices[deviceId]}); }, _setAudioInput: function(deviceId) { @@ -928,8 +926,8 @@ module.exports = React.createClass({ function() { const ErrorDialog = sdk.getComponent('dialogs.ErrorDialog'); Modal.createDialog(ErrorDialog, { - title: "No media permissions", - description: "You may need to manually permit Riot to access your microphone/webcam", + title: _t('No media permissions'), + description: _t('You may need to manually permit Riot to access your microphone/webcam'), }); }, ]); @@ -939,10 +937,10 @@ module.exports = React.createClass({ _renderWebRtcSettings: function() { if (this.state.mediaDevices === false) { return
-

WebRTC

+

{_t('VoIP')}

- Missing Media Permissions, click here to request. + {_t('Missing Media Permissions, click here to request.')}

; @@ -950,11 +948,11 @@ module.exports = React.createClass({ const Dropdown = sdk.getComponent('elements.Dropdown'); - let microphoneDropdown =

No Microphones detected

; - let webcamDropdown =

No Webcams detected

; + let microphoneDropdown =

{_t('No Microphones detected')}

; + let webcamDropdown =

{_t('No Webcams detected')}

; const audioInputs = this.state.mediaDevices.audioinput; - if ('default' in audioInputs) { + if (Object.keys(videoInputs).length > 0) { microphoneDropdown =

Microphone

0) { webcamDropdown =

Cameras

-

WebRTC

+

{_t('VoIP')}

{microphoneDropdown} {webcamDropdown} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 211d164c2a..44a1af57fa 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -129,6 +129,12 @@ "Add email address": "Add email address", "Add phone number": "Add phone number", "Admin": "Admin", + "VoIP": "VoIP", + "Missing Media Permissions, click here to request.": "Missing Media Permissions, click here to request.", + "No Microphones detected": "No Microphones detected", + "No Webcams detected": "No Webcams detected", + "No media permissions": "No media permissions", + "You may need to manually permit Riot to access your microphone/webcam": "You may need to manually permit Riot to access your microphone/webcam", "Advanced": "Advanced", "Algorithm": "Algorithm", "Always show message timestamps": "Always show message timestamps",