Merge pull request #10280 from KDSBrowne/2.2-localize-cam-quality

Localize drop-down values for webcam quality
This commit is contained in:
Anton Georgiev 2020-08-19 15:33:11 -04:00 committed by GitHub
commit 4d688fee20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 6 deletions

View File

@ -62,6 +62,22 @@ const intlMessages = defineMessages({
id: 'app.videoPreview.profileLabel', id: 'app.videoPreview.profileLabel',
description: 'Quality dropdown label', 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: { cancelLabel: {
id: 'app.videoPreview.cancelLabel', id: 'app.videoPreview.cancelLabel',
description: 'Cancel button label', description: 'Cancel button label',
@ -540,11 +556,16 @@ class VideoPreview extends Component {
onChange={this.handleSelectProfile} onChange={this.handleSelectProfile}
disabled={skipVideoPreview} disabled={skipVideoPreview}
> >
{availableProfiles.map(profile => ( {availableProfiles.map(profile => {
const label = intlMessages[`${profile.id}`]
? intl.formatMessage(intlMessages[`${profile.id}`])
: profile.name;
return (
<option key={profile.id} value={profile.id}> <option key={profile.id} value={profile.id}>
{profile.name} {`${label} ${profile.id === 'hd' ? '' : intl.formatMessage(intlMessages.qualityLabel).toLowerCase()}`}
</option> </option>
))} )})}
</select> </select>
) )
: ( : (

View File

@ -160,15 +160,15 @@ public:
constraints: constraints:
frameRate: 10 frameRate: 10
- id: low - id: low
name: Low quality name: Low
default: false default: false
bitrate: 100 bitrate: 100
- id: medium - id: medium
name: Medium quality name: Medium
default: true default: true
bitrate: 200 bitrate: 200
- id: high - id: high
name: High quality name: High
default: false default: false
bitrate: 500 bitrate: 500
- id: hd - id: hd

View File

@ -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.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.cameraLabel": "Camera",
"app.videoPreview.profileLabel": "Quality", "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.cancelLabel": "Cancel",
"app.videoPreview.closeLabel": "Close", "app.videoPreview.closeLabel": "Close",
"app.videoPreview.findingWebcamsLabel": "Finding webcams", "app.videoPreview.findingWebcamsLabel": "Finding webcams",