From fbeaf87dbd2be89d1dfa85332739e13a8ad55351 Mon Sep 17 00:00:00 2001 From: KDSBrowne Date: Mon, 17 Aug 2020 16:19:45 +0000 Subject: [PATCH] localize the dropdown values for webcam quality --- .../ui/components/video-preview/component.jsx | 27 ++++++++++++++++--- .../private/config/settings.yml | 6 ++--- bigbluebutton-html5/private/locales/en.json | 4 +++ 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/video-preview/component.jsx b/bigbluebutton-html5/imports/ui/components/video-preview/component.jsx index 8cdc647f5e..cc4c8f80b6 100755 --- a/bigbluebutton-html5/imports/ui/components/video-preview/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/video-preview/component.jsx @@ -62,6 +62,22 @@ const intlMessages = defineMessages({ id: 'app.videoPreview.profileLabel', description: 'Quality dropdown label', }, + low: { + id: 'app.videoPreview.quality.low', + description: 'Low quality option label', + }, + medium: { + id: 'app.videoPreview.quality.medium', + description: 'Medium quality option label', + }, + high: { + id: 'app.videoPreview.quality.high', + description: 'High quality option label', + }, + hd: { + id: 'app.videoPreview.quality.hd', + description: 'High definition option label', + }, cancelLabel: { id: 'app.videoPreview.cancelLabel', description: 'Cancel button label', @@ -540,11 +556,16 @@ class VideoPreview extends Component { onChange={this.handleSelectProfile} disabled={skipVideoPreview} > - {availableProfiles.map(profile => ( + {availableProfiles.map(profile => { + const label = intlMessages[`${profile.id}`] + ? intl.formatMessage(intlMessages[`${profile.id}`]) + : profile.name; + + return ( - ))} + )})} ) : ( diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index 4958a10c7d..6d1eba12f2 100755 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -160,15 +160,15 @@ public: constraints: frameRate: 10 - id: low - name: Low quality + name: Low default: false bitrate: 100 - id: medium - name: Medium quality + name: Medium default: true bitrate: 200 - id: high - name: High quality + name: High default: false bitrate: 500 - id: hd diff --git a/bigbluebutton-html5/private/locales/en.json b/bigbluebutton-html5/private/locales/en.json index b53f1c3997..739ef555bb 100755 --- a/bigbluebutton-html5/private/locales/en.json +++ b/bigbluebutton-html5/private/locales/en.json @@ -542,6 +542,10 @@ "app.recording.stopDescription": "Are you sure you want to pause the recording? You can resume by selecting the record button again.", "app.videoPreview.cameraLabel": "Camera", "app.videoPreview.profileLabel": "Quality", + "app.videoPreview.quality.low": "Low", + "app.videoPreview.quality.medium": "Medium", + "app.videoPreview.quality.high": "High", + "app.videoPreview.quality.hd": "High definition", "app.videoPreview.cancelLabel": "Cancel", "app.videoPreview.closeLabel": "Close", "app.videoPreview.findingWebcamsLabel": "Finding webcams",