hand raised message differentiates between one and multiple users

This commit is contained in:
Philipp Memmel 2021-04-22 12:08:25 +02:00
parent a307c28d79
commit e7da98283f
2 changed files with 9 additions and 2 deletions

View File

@ -20,7 +20,11 @@ const messages = defineMessages({
}, },
raisedHandDesc: { raisedHandDesc: {
id: 'app.statusNotifier.raisedHandDesc', id: 'app.statusNotifier.raisedHandDesc',
description: 'label for user with raised hands', description: 'label for multiple users with raised hands',
},
raisedHandDescOneUser: {
id: 'app.statusNotifier.raisedHandDescOneUser',
description: 'label for a single user with raised hand',
}, },
and: { and: {
id: 'app.statusNotifier.and', id: 'app.statusNotifier.and',
@ -110,7 +114,9 @@ class StatusNotifier extends Component {
break; break;
} }
return intl.formatMessage(messages.raisedHandDesc, { 0: formattedNames }); const raisedHandMessageString
= length === 1 ? messages.raisedHandDescOneUser : messages.raisedHandDesc;
return intl.formatMessage(raisedHandMessageString, { 0: formattedNames });
} }
raisedHandAvatars() { raisedHandAvatars() {

View File

@ -375,6 +375,7 @@
"app.statusNotifier.lowerHands": "Lower Hands", "app.statusNotifier.lowerHands": "Lower Hands",
"app.statusNotifier.raisedHandsTitle": "Raised Hands", "app.statusNotifier.raisedHandsTitle": "Raised Hands",
"app.statusNotifier.raisedHandDesc": "{0} raised their hand", "app.statusNotifier.raisedHandDesc": "{0} raised their hand",
"app.statusNotifier.raisedHandDescOneUser": "{0} raised the hand",
"app.statusNotifier.and": "and", "app.statusNotifier.and": "and",
"app.switch.onLabel": "ON", "app.switch.onLabel": "ON",
"app.switch.offLabel": "OFF", "app.switch.offLabel": "OFF",