fix: localize default button label for custom backgrounds

This commit is contained in:
Joao Victor 2022-05-31 11:38:24 -03:00
parent ae3355d685
commit 936829338d
2 changed files with 8 additions and 1 deletions

View File

@ -59,6 +59,10 @@ const intlMessages = defineMessages({
id: 'app.video.virtualBackground.background',
description: 'Label for the background word',
},
backgroundWithIndex: {
id: 'app.video.virtualBackground.backgroundWithIndex',
description: 'Label for the background word indexed',
},
...IMAGE_NAMES.reduce((prev, imageName) => {
const id = imageName.split('.').shift();
return {
@ -259,7 +263,9 @@ const VirtualBgSelector = ({
.concat(newCustomBackgrounds)
.map(({ filename, data, uniqueId }, index) => {
const imageIndex = index + IMAGE_NAMES.length + 2;
const label = `Background ${imageIndex}`;
const label = intl.formatMessage(intlMessages.backgroundWithIndex, {
0: imageIndex,
});
return (
<Styled.ThumbnailButtonWrapper key={`${filename}-${index}`}>

View File

@ -831,6 +831,7 @@
"app.video.virtualBackground.board": "Board",
"app.video.virtualBackground.coffeeshop": "Coffeeshop",
"app.video.virtualBackground.background": "Background",
"app.video.virtualBackground.backgroundWithIndex": "Background {0}",
"app.video.virtualBackground.custom": "Upload from your computer",
"app.video.virtualBackground.remove": "Remove added image",
"app.video.virtualBackground.genericError": "Failed to apply camera effect. Try again.",