Skip to content

Commit d0f7d15

Browse files
committed
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 8ee79b4 commit d0f7d15

18 files changed

+1052
-1
lines changed

assets/l10n/app_en.arb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,37 @@
136136
"@errorUnresolveTopicFailedTitle": {
137137
"description": "Error title when marking a topic as unresolved failed."
138138
},
139+
"actionSheetOptionSeeWhoReacted": "See who reacted",
140+
"@actionSheetOptionSeeWhoReacted": {
141+
"description": "Label for the 'See who reacted' button in the message action sheet."
142+
},
143+
"seeWhoReactedSheetNoReactions": "This message has no reactions.",
144+
"@seeWhoReactedSheetNoReactions": {
145+
"description": "Explanation on the 'See who reacted' sheet when the message has no reactions (because they were removed after the sheet was opened)."
146+
},
147+
"seeWhoReactedSheetHeaderLabel": "Emoji reactions ({num})",
148+
"@seeWhoReactedSheetHeaderLabel": {
149+
"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.)",
150+
"placeholders": {
151+
"num": {"type": "int", "example": "2"}
152+
}
153+
},
154+
"seeWhoReactedSheetEmojiNameWithVoteCount": "{emojiName}: {num, plural, =1{1 vote} other{{num} votes}}",
155+
"@seeWhoReactedSheetEmojiNameWithVoteCount": {
156+
"description": "In the 'See who reacted' sheet, an emoji reaction's name and how many votes it has. (An accessibility label for assistive technology.)",
157+
"placeholders": {
158+
"emojiName": {"type": "String", "example": "working_on_it"},
159+
"num": {"type": "int", "example": "2"}
160+
}
161+
},
162+
"seeWhoReactedSheetUserListLabel": "Votes for {emojiName} ({num})",
163+
"@seeWhoReactedSheetUserListLabel": {
164+
"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.)",
165+
"placeholders": {
166+
"emojiName": {"type": "String", "example": "working_on_it"},
167+
"num": {"type": "int", "example": "2"}
168+
}
169+
},
139170
"actionSheetOptionCopyMessageText": "Copy message text",
140171
"@actionSheetOptionCopyMessageText": {
141172
"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
@@ -333,6 +333,36 @@ abstract class ZulipLocalizations {
333333
/// **'Failed to mark topic as unresolved'**
334334
String get errorUnresolveTopicFailedTitle;
335335

336+
/// Label for the 'See who reacted' button in the message action sheet.
337+
///
338+
/// In en, this message translates to:
339+
/// **'See who reacted'**
340+
String get actionSheetOptionSeeWhoReacted;
341+
342+
/// Explanation on the 'See who reacted' sheet when the message has no reactions (because they were removed after the sheet was opened).
343+
///
344+
/// In en, this message translates to:
345+
/// **'This message has no reactions.'**
346+
String get seeWhoReactedSheetNoReactions;
347+
348+
/// 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.)
349+
///
350+
/// In en, this message translates to:
351+
/// **'Emoji reactions ({num})'**
352+
String seeWhoReactedSheetHeaderLabel(int num);
353+
354+
/// In the 'See who reacted' sheet, an emoji reaction's name and how many votes it has. (An accessibility label for assistive technology.)
355+
///
356+
/// In en, this message translates to:
357+
/// **'{emojiName}: {num, plural, =1{1 vote} other{{num} votes}}'**
358+
String seeWhoReactedSheetEmojiNameWithVoteCount(String emojiName, int num);
359+
360+
/// 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.)
361+
///
362+
/// In en, this message translates to:
363+
/// **'Votes for {emojiName} ({num})'**
364+
String seeWhoReactedSheetUserListLabel(String emojiName, int num);
365+
336366
/// Label for copy message text button on action sheet.
337367
///
338368
/// 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
@@ -118,6 +118,33 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
118118
String get errorUnresolveTopicFailedTitle =>
119119
'Failed to mark topic as unresolved';
120120

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

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
121121
String get errorUnresolveTopicFailedTitle =>
122122
'Thema konnte nicht als ungelöst markiert werden';
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 => 'Nachrichtentext kopieren';
126153

lib/generated/l10n/zulip_localizations_en.dart

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

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

lib/generated/l10n/zulip_localizations_it.dart

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

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

lib/generated/l10n/zulip_localizations_ja.dart

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

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

lib/generated/l10n/zulip_localizations_nb.dart

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

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

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
121121
String get errorUnresolveTopicFailedTitle =>
122122
'Nie udało się oznaczyć brak rozwiązania';
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 => 'Skopiuj tekst wiadomości';
126153

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
121121
String get errorUnresolveTopicFailedTitle =>
122122
'Не удалось отметить тему как нерешенную';
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 => 'Скопировать текст сообщения';
126153

0 commit comments

Comments
 (0)