Skip to content

Commit 7aadc11

Browse files
chrisbobbesm-sayedi
authored andcommitted
msglist: Support viewing who reacted to a message
I experimented with using Semantics to help write human-centered tests, and I ended up adding some configuration that actually seemed to make a reasonable experience in the UI, at least in my testing with VoiceOver. Fixes #740.
1 parent 927eabf commit 7aadc11

19 files changed

+1079
-1
lines changed

assets/l10n/app_en.arb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,37 @@
140140
"@errorUnresolveTopicFailedTitle": {
141141
"description": "Error title when marking a topic as unresolved failed."
142142
},
143+
"actionSheetOptionSeeWhoReacted": "See who reacted",
144+
"@actionSheetOptionSeeWhoReacted": {
145+
"description": "Label for the 'See who reacted' button in the message action sheet."
146+
},
147+
"seeWhoReactedSheetNoReactions": "This message has no reactions.",
148+
"@seeWhoReactedSheetNoReactions": {
149+
"description": "Explanation on the 'See who reacted' sheet when the message has no reactions (because they were removed after the sheet was opened)."
150+
},
151+
"seeWhoReactedSheetHeaderLabel": "Emoji reactions ({num})",
152+
"@seeWhoReactedSheetHeaderLabel": {
153+
"description": "In the 'See who reacted' sheet, a label for the list of emoji reactions at the top, with the total number of reactions. (An accessibility label for assistive technology.)",
154+
"placeholders": {
155+
"num": {"type": "int", "example": "2"}
156+
}
157+
},
158+
"seeWhoReactedSheetEmojiNameWithVoteCount": "{emojiName}: {num, plural, =1{1 vote} other{{num} votes}}",
159+
"@seeWhoReactedSheetEmojiNameWithVoteCount": {
160+
"description": "In the 'See who reacted' sheet, an emoji reaction's name and how many votes it has. (An accessibility label for assistive technology.)",
161+
"placeholders": {
162+
"emojiName": {"type": "String", "example": "working_on_it"},
163+
"num": {"type": "int", "example": "2"}
164+
}
165+
},
166+
"seeWhoReactedSheetUserListLabel": "Votes for {emojiName} ({num})",
167+
"@seeWhoReactedSheetUserListLabel": {
168+
"description": "In the 'See who reacted' sheet, a label for the list of users who chose an emoji reaction, with the emoji's name and how many votes it has. (An accessibility label for assistive technology.)",
169+
"placeholders": {
170+
"emojiName": {"type": "String", "example": "working_on_it"},
171+
"num": {"type": "int", "example": "2"}
172+
}
173+
},
143174
"actionSheetOptionCopyMessageText": "Copy message text",
144175
"@actionSheetOptionCopyMessageText": {
145176
"description": "Label for copy message text button on action sheet."

lib/generated/l10n/zulip_localizations.dart

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,36 @@ abstract class ZulipLocalizations {
341341
/// **'Failed to mark topic as unresolved'**
342342
String get errorUnresolveTopicFailedTitle;
343343

344+
/// Label for the 'See who reacted' button in the message action sheet.
345+
///
346+
/// In en, this message translates to:
347+
/// **'See who reacted'**
348+
String get actionSheetOptionSeeWhoReacted;
349+
350+
/// Explanation on the 'See who reacted' sheet when the message has no reactions (because they were removed after the sheet was opened).
351+
///
352+
/// In en, this message translates to:
353+
/// **'This message has no reactions.'**
354+
String get seeWhoReactedSheetNoReactions;
355+
356+
/// In the 'See who reacted' sheet, a label for the list of emoji reactions at the top, with the total number of reactions. (An accessibility label for assistive technology.)
357+
///
358+
/// In en, this message translates to:
359+
/// **'Emoji reactions ({num})'**
360+
String seeWhoReactedSheetHeaderLabel(int num);
361+
362+
/// In the 'See who reacted' sheet, an emoji reaction's name and how many votes it has. (An accessibility label for assistive technology.)
363+
///
364+
/// In en, this message translates to:
365+
/// **'{emojiName}: {num, plural, =1{1 vote} other{{num} votes}}'**
366+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num);
367+
368+
/// In the 'See who reacted' sheet, a label for the list of users who chose an emoji reaction, with the emoji's name and how many votes it has. (An accessibility label for assistive technology.)
369+
///
370+
/// In en, this message translates to:
371+
/// **'Votes for {emojiName} ({num})'**
372+
String seeWhoReactedSheetUserListLabel(String emojiName, int num);
373+
344374
/// Label for copy message text button on action sheet.
345375
///
346376
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
121121
String get errorUnresolveTopicFailedTitle =>
122122
'Failed to mark topic as unresolved';
123123

124+
@override
125+
String get actionSheetOptionSeeWhoReacted => 'See who reacted';
126+
127+
@override
128+
String get seeWhoReactedSheetNoReactions => 'This message has no reactions.';
129+
130+
@override
131+
String seeWhoReactedSheetHeaderLabel(int num) {
132+
return 'Emoji reactions ($num)';
133+
}
134+
135+
@override
136+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num) {
137+
String _temp0 = intl.Intl.pluralLogic(
138+
num,
139+
locale: localeName,
140+
other: '$num votes',
141+
one: '1 vote',
142+
);
143+
return '$emojiName: $_temp0';
144+
}
145+
146+
@override
147+
String seeWhoReactedSheetUserListLabel(String emojiName, int num) {
148+
return 'Votes for $emojiName ($num)';
149+
}
150+
124151
@override
125152
String get actionSheetOptionCopyMessageText => 'Copy message text';
126153

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,33 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
124124
String get errorUnresolveTopicFailedTitle =>
125125
'Thema konnte nicht als ungelöst markiert werden';
126126

127+
@override
128+
String get actionSheetOptionSeeWhoReacted => 'See who reacted';
129+
130+
@override
131+
String get seeWhoReactedSheetNoReactions => 'This message has no reactions.';
132+
133+
@override
134+
String seeWhoReactedSheetHeaderLabel(int num) {
135+
return 'Emoji reactions ($num)';
136+
}
137+
138+
@override
139+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num) {
140+
String _temp0 = intl.Intl.pluralLogic(
141+
num,
142+
locale: localeName,
143+
other: '$num votes',
144+
one: '1 vote',
145+
);
146+
return '$emojiName: $_temp0';
147+
}
148+
149+
@override
150+
String seeWhoReactedSheetUserListLabel(String emojiName, int num) {
151+
return 'Votes for $emojiName ($num)';
152+
}
153+
127154
@override
128155
String get actionSheetOptionCopyMessageText => 'Nachrichtentext kopieren';
129156

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
121121
String get errorUnresolveTopicFailedTitle =>
122122
'Failed to mark topic as unresolved';
123123

124+
@override
125+
String get actionSheetOptionSeeWhoReacted => 'See who reacted';
126+
127+
@override
128+
String get seeWhoReactedSheetNoReactions => 'This message has no reactions.';
129+
130+
@override
131+
String seeWhoReactedSheetHeaderLabel(int num) {
132+
return 'Emoji reactions ($num)';
133+
}
134+
135+
@override
136+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num) {
137+
String _temp0 = intl.Intl.pluralLogic(
138+
num,
139+
locale: localeName,
140+
other: '$num votes',
141+
one: '1 vote',
142+
);
143+
return '$emojiName: $_temp0';
144+
}
145+
146+
@override
147+
String seeWhoReactedSheetUserListLabel(String emojiName, int num) {
148+
return 'Votes for $emojiName ($num)';
149+
}
150+
124151
@override
125152
String get actionSheetOptionCopyMessageText => 'Copy message text';
126153

lib/generated/l10n/zulip_localizations_fr.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
121121
String get errorUnresolveTopicFailedTitle =>
122122
'Failed to mark topic as unresolved';
123123

124+
@override
125+
String get actionSheetOptionSeeWhoReacted => 'See who reacted';
126+
127+
@override
128+
String get seeWhoReactedSheetNoReactions => 'This message has no reactions.';
129+
130+
@override
131+
String seeWhoReactedSheetHeaderLabel(int num) {
132+
return 'Emoji reactions ($num)';
133+
}
134+
135+
@override
136+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num) {
137+
String _temp0 = intl.Intl.pluralLogic(
138+
num,
139+
locale: localeName,
140+
other: '$num votes',
141+
one: '1 vote',
142+
);
143+
return '$emojiName: $_temp0';
144+
}
145+
146+
@override
147+
String seeWhoReactedSheetUserListLabel(String emojiName, int num) {
148+
return 'Votes for $emojiName ($num)';
149+
}
150+
124151
@override
125152
String get actionSheetOptionCopyMessageText => 'Copy message text';
126153

lib/generated/l10n/zulip_localizations_it.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,33 @@ class ZulipLocalizationsIt extends ZulipLocalizations {
123123
String get errorUnresolveTopicFailedTitle =>
124124
'Impossibile contrassegnare l\'argomento come irrisolto';
125125

126+
@override
127+
String get actionSheetOptionSeeWhoReacted => 'See who reacted';
128+
129+
@override
130+
String get seeWhoReactedSheetNoReactions => 'This message has no reactions.';
131+
132+
@override
133+
String seeWhoReactedSheetHeaderLabel(int num) {
134+
return 'Emoji reactions ($num)';
135+
}
136+
137+
@override
138+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num) {
139+
String _temp0 = intl.Intl.pluralLogic(
140+
num,
141+
locale: localeName,
142+
other: '$num votes',
143+
one: '1 vote',
144+
);
145+
return '$emojiName: $_temp0';
146+
}
147+
148+
@override
149+
String seeWhoReactedSheetUserListLabel(String emojiName, int num) {
150+
return 'Votes for $emojiName ($num)';
151+
}
152+
126153
@override
127154
String get actionSheetOptionCopyMessageText => 'Copia il testo del messaggio';
128155

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,33 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
119119
@override
120120
String get errorUnresolveTopicFailedTitle => 'トピックを未解決にできませんでした';
121121

122+
@override
123+
String get actionSheetOptionSeeWhoReacted => 'See who reacted';
124+
125+
@override
126+
String get seeWhoReactedSheetNoReactions => 'This message has no reactions.';
127+
128+
@override
129+
String seeWhoReactedSheetHeaderLabel(int num) {
130+
return 'Emoji reactions ($num)';
131+
}
132+
133+
@override
134+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num) {
135+
String _temp0 = intl.Intl.pluralLogic(
136+
num,
137+
locale: localeName,
138+
other: '$num votes',
139+
one: '1 vote',
140+
);
141+
return '$emojiName: $_temp0';
142+
}
143+
144+
@override
145+
String seeWhoReactedSheetUserListLabel(String emojiName, int num) {
146+
return 'Votes for $emojiName ($num)';
147+
}
148+
122149
@override
123150
String get actionSheetOptionCopyMessageText => 'メッセージ本文をコピー';
124151

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
121121
String get errorUnresolveTopicFailedTitle =>
122122
'Failed to mark topic as unresolved';
123123

124+
@override
125+
String get actionSheetOptionSeeWhoReacted => 'See who reacted';
126+
127+
@override
128+
String get seeWhoReactedSheetNoReactions => 'This message has no reactions.';
129+
130+
@override
131+
String seeWhoReactedSheetHeaderLabel(int num) {
132+
return 'Emoji reactions ($num)';
133+
}
134+
135+
@override
136+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num) {
137+
String _temp0 = intl.Intl.pluralLogic(
138+
num,
139+
locale: localeName,
140+
other: '$num votes',
141+
one: '1 vote',
142+
);
143+
return '$emojiName: $_temp0';
144+
}
145+
146+
@override
147+
String seeWhoReactedSheetUserListLabel(String emojiName, int num) {
148+
return 'Votes for $emojiName ($num)';
149+
}
150+
124151
@override
125152
String get actionSheetOptionCopyMessageText => 'Copy message text';
126153

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,33 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
124124
String get errorUnresolveTopicFailedTitle =>
125125
'Nie udało się oznaczyć brak rozwiązania';
126126

127+
@override
128+
String get actionSheetOptionSeeWhoReacted => 'See who reacted';
129+
130+
@override
131+
String get seeWhoReactedSheetNoReactions => 'This message has no reactions.';
132+
133+
@override
134+
String seeWhoReactedSheetHeaderLabel(int num) {
135+
return 'Emoji reactions ($num)';
136+
}
137+
138+
@override
139+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num) {
140+
String _temp0 = intl.Intl.pluralLogic(
141+
num,
142+
locale: localeName,
143+
other: '$num votes',
144+
one: '1 vote',
145+
);
146+
return '$emojiName: $_temp0';
147+
}
148+
149+
@override
150+
String seeWhoReactedSheetUserListLabel(String emojiName, int num) {
151+
return 'Votes for $emojiName ($num)';
152+
}
153+
127154
@override
128155
String get actionSheetOptionCopyMessageText => 'Skopiuj tekst wiadomości';
129156

0 commit comments

Comments
 (0)