Skip to content

Commit c21fe24

Browse files
committed
autocomplete: Support @-wildcard in user-mention autocomplete
The implementation logic is similar to the zulip-mobile implementation: https://github.com/zulip/zulip-mobile/blob/a115df1f71c9dc31e9b41060a8d57b51c017d786/src/autocomplete/WildcardMentionItem.js Fixes: zulip#234
1 parent ac613f5 commit c21fe24

16 files changed

+676
-81
lines changed

assets/l10n/app_ar.arb

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
{
2-
2+
"wildcardMentionAll": "الجميع",
3+
"wildcardMentionEveryone": "الكل",
4+
"wildcardMentionChannel": "القناة",
5+
"wildcardMentionStream": "الدفق",
6+
"wildcardMentionTopic": "الموضوع",
7+
"wildcardMentionChannelDescription": "إخطار القناة",
8+
"wildcardMentionStreamDescription": "إخطار الدفق",
9+
"wildcardMentionAllDmDescription": "إخطار المستلمين",
10+
"wildcardMentionTopicDescription": "إخطار الموضوع"
311
}

assets/l10n/app_en.arb

+36
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,42 @@
641641
"@manyPeopleTyping": {
642642
"description": "Text to display when there are multiple users typing."
643643
},
644+
"wildcardMentionAll": "all",
645+
"@wildcardMentionAll": {
646+
"description": "Text for \"@all\" wildcard-mention autocomplete option when writing a channel or DM message."
647+
},
648+
"wildcardMentionEveryone": "everyone",
649+
"@wildcardMentionEveryone": {
650+
"description": "Text for \"@everyone\" wildcard-mention autocomplete option when writing a channel or DM message."
651+
},
652+
"wildcardMentionChannel": "channel",
653+
"@wildcardMentionChannel": {
654+
"description": "Text for \"@channel\" wildcard-mention autocomplete option when writing a channel message."
655+
},
656+
"wildcardMentionStream": "stream",
657+
"@wildcardMentionStream": {
658+
"description": "Text for \"@stream\" wildcard-mention autocomplete option when writing a channel message in older servers."
659+
},
660+
"wildcardMentionTopic": "topic",
661+
"@wildcardMentionTopic": {
662+
"description": "Text for \"@topic\" wildcard-mention autocomplete option when writing a channel message."
663+
},
664+
"wildcardMentionChannelDescription": "Notify channel",
665+
"@wildcardMentionChannelDescription": {
666+
"description": "Description for \"@all\", \"@everyone\", \"@channel\", and \"@stream\" wildcard-mention autocomplete options when writing a channel message."
667+
},
668+
"wildcardMentionStreamDescription": "Notify stream",
669+
"@wildcardMentionStreamDescription": {
670+
"description": "Description for \"@all\", \"@everyone\", and \"@stream\" wildcard-mention autocomplete options when writing a channel message in older severs."
671+
},
672+
"wildcardMentionAllDmDescription": "Notify recipients",
673+
"@wildcardMentionAllDmDescription": {
674+
"description": "Description for \"@all\" and \"@everyone\" wildcard-mention autocomplete options when writing a DM message."
675+
},
676+
"wildcardMentionTopicDescription": "Notify topic",
677+
"@wildcardMentionTopicDescription": {
678+
"description": "Description for \"@topic\" wildcard-mention autocomplete options when writing a channel message."
679+
},
644680
"messageIsEditedLabel": "EDITED",
645681
"@messageIsEditedLabel": {
646682
"description": "Label for an edited message. (Use ALL CAPS for cased alphabets: Latin, Greek, Cyrillic, etc.)"

lib/generated/l10n/zulip_localizations.dart

+54
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,60 @@ abstract class ZulipLocalizations {
955955
/// **'Several people are typing…'**
956956
String get manyPeopleTyping;
957957

958+
/// Text for "@all" wildcard-mention autocomplete option when writing a channel or DM message.
959+
///
960+
/// In en, this message translates to:
961+
/// **'all'**
962+
String get wildcardMentionAll;
963+
964+
/// Text for "@everyone" wildcard-mention autocomplete option when writing a channel or DM message.
965+
///
966+
/// In en, this message translates to:
967+
/// **'everyone'**
968+
String get wildcardMentionEveryone;
969+
970+
/// Text for "@channel" wildcard-mention autocomplete option when writing a channel message.
971+
///
972+
/// In en, this message translates to:
973+
/// **'channel'**
974+
String get wildcardMentionChannel;
975+
976+
/// Text for "@stream" wildcard-mention autocomplete option when writing a channel message in older servers.
977+
///
978+
/// In en, this message translates to:
979+
/// **'stream'**
980+
String get wildcardMentionStream;
981+
982+
/// Text for "@topic" wildcard-mention autocomplete option when writing a channel message.
983+
///
984+
/// In en, this message translates to:
985+
/// **'topic'**
986+
String get wildcardMentionTopic;
987+
988+
/// Description for "@all", "@everyone", "@channel", and "@stream" wildcard-mention autocomplete options when writing a channel message.
989+
///
990+
/// In en, this message translates to:
991+
/// **'Notify channel'**
992+
String get wildcardMentionChannelDescription;
993+
994+
/// Description for "@all", "@everyone", and "@stream" wildcard-mention autocomplete options when writing a channel message in older severs.
995+
///
996+
/// In en, this message translates to:
997+
/// **'Notify stream'**
998+
String get wildcardMentionStreamDescription;
999+
1000+
/// Description for "@all" and "@everyone" wildcard-mention autocomplete options when writing a DM message.
1001+
///
1002+
/// In en, this message translates to:
1003+
/// **'Notify recipients'**
1004+
String get wildcardMentionAllDmDescription;
1005+
1006+
/// Description for "@topic" wildcard-mention autocomplete options when writing a channel message.
1007+
///
1008+
/// In en, this message translates to:
1009+
/// **'Notify topic'**
1010+
String get wildcardMentionTopicDescription;
1011+
9581012
/// Label for an edited message. (Use ALL CAPS for cased alphabets: Latin, Greek, Cyrillic, etc.)
9591013
///
9601014
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

+27
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,33 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
508508
@override
509509
String get manyPeopleTyping => 'Several people are typing…';
510510

511+
@override
512+
String get wildcardMentionAll => 'الجميع';
513+
514+
@override
515+
String get wildcardMentionEveryone => 'الكل';
516+
517+
@override
518+
String get wildcardMentionChannel => 'القناة';
519+
520+
@override
521+
String get wildcardMentionStream => 'الدفق';
522+
523+
@override
524+
String get wildcardMentionTopic => 'الموضوع';
525+
526+
@override
527+
String get wildcardMentionChannelDescription => 'إخطار القناة';
528+
529+
@override
530+
String get wildcardMentionStreamDescription => 'إخطار الدفق';
531+
532+
@override
533+
String get wildcardMentionAllDmDescription => 'إخطار المستلمين';
534+
535+
@override
536+
String get wildcardMentionTopicDescription => 'إخطار الموضوع';
537+
511538
@override
512539
String get messageIsEditedLabel => 'EDITED';
513540

lib/generated/l10n/zulip_localizations_en.dart

+27
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,33 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
508508
@override
509509
String get manyPeopleTyping => 'Several people are typing…';
510510

511+
@override
512+
String get wildcardMentionAll => 'all';
513+
514+
@override
515+
String get wildcardMentionEveryone => 'everyone';
516+
517+
@override
518+
String get wildcardMentionChannel => 'channel';
519+
520+
@override
521+
String get wildcardMentionStream => 'stream';
522+
523+
@override
524+
String get wildcardMentionTopic => 'topic';
525+
526+
@override
527+
String get wildcardMentionChannelDescription => 'Notify channel';
528+
529+
@override
530+
String get wildcardMentionStreamDescription => 'Notify stream';
531+
532+
@override
533+
String get wildcardMentionAllDmDescription => 'Notify recipients';
534+
535+
@override
536+
String get wildcardMentionTopicDescription => 'Notify topic';
537+
511538
@override
512539
String get messageIsEditedLabel => 'EDITED';
513540

lib/generated/l10n/zulip_localizations_fr.dart

+27
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,33 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
508508
@override
509509
String get manyPeopleTyping => 'Several people are typing…';
510510

511+
@override
512+
String get wildcardMentionAll => 'all';
513+
514+
@override
515+
String get wildcardMentionEveryone => 'everyone';
516+
517+
@override
518+
String get wildcardMentionChannel => 'channel';
519+
520+
@override
521+
String get wildcardMentionStream => 'stream';
522+
523+
@override
524+
String get wildcardMentionTopic => 'topic';
525+
526+
@override
527+
String get wildcardMentionChannelDescription => 'Notify channel';
528+
529+
@override
530+
String get wildcardMentionStreamDescription => 'Notify stream';
531+
532+
@override
533+
String get wildcardMentionAllDmDescription => 'Notify recipients';
534+
535+
@override
536+
String get wildcardMentionTopicDescription => 'Notify topic';
537+
511538
@override
512539
String get messageIsEditedLabel => 'EDITED';
513540

lib/generated/l10n/zulip_localizations_ja.dart

+27
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,33 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
508508
@override
509509
String get manyPeopleTyping => 'Several people are typing…';
510510

511+
@override
512+
String get wildcardMentionAll => 'all';
513+
514+
@override
515+
String get wildcardMentionEveryone => 'everyone';
516+
517+
@override
518+
String get wildcardMentionChannel => 'channel';
519+
520+
@override
521+
String get wildcardMentionStream => 'stream';
522+
523+
@override
524+
String get wildcardMentionTopic => 'topic';
525+
526+
@override
527+
String get wildcardMentionChannelDescription => 'Notify channel';
528+
529+
@override
530+
String get wildcardMentionStreamDescription => 'Notify stream';
531+
532+
@override
533+
String get wildcardMentionAllDmDescription => 'Notify recipients';
534+
535+
@override
536+
String get wildcardMentionTopicDescription => 'Notify topic';
537+
511538
@override
512539
String get messageIsEditedLabel => 'EDITED';
513540

lib/generated/l10n/zulip_localizations_pl.dart

+27
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,33 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
508508
@override
509509
String get manyPeopleTyping => 'Wielu ludzi coś pisze…';
510510

511+
@override
512+
String get wildcardMentionAll => 'all';
513+
514+
@override
515+
String get wildcardMentionEveryone => 'everyone';
516+
517+
@override
518+
String get wildcardMentionChannel => 'channel';
519+
520+
@override
521+
String get wildcardMentionStream => 'stream';
522+
523+
@override
524+
String get wildcardMentionTopic => 'topic';
525+
526+
@override
527+
String get wildcardMentionChannelDescription => 'Notify channel';
528+
529+
@override
530+
String get wildcardMentionStreamDescription => 'Notify stream';
531+
532+
@override
533+
String get wildcardMentionAllDmDescription => 'Notify recipients';
534+
535+
@override
536+
String get wildcardMentionTopicDescription => 'Notify topic';
537+
511538
@override
512539
String get messageIsEditedLabel => 'ZMIENIONO';
513540

lib/generated/l10n/zulip_localizations_ru.dart

+27
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,33 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
508508
@override
509509
String get manyPeopleTyping => 'Several people are typing…';
510510

511+
@override
512+
String get wildcardMentionAll => 'all';
513+
514+
@override
515+
String get wildcardMentionEveryone => 'everyone';
516+
517+
@override
518+
String get wildcardMentionChannel => 'channel';
519+
520+
@override
521+
String get wildcardMentionStream => 'stream';
522+
523+
@override
524+
String get wildcardMentionTopic => 'topic';
525+
526+
@override
527+
String get wildcardMentionChannelDescription => 'Notify channel';
528+
529+
@override
530+
String get wildcardMentionStreamDescription => 'Notify stream';
531+
532+
@override
533+
String get wildcardMentionAllDmDescription => 'Notify recipients';
534+
535+
@override
536+
String get wildcardMentionTopicDescription => 'Notify topic';
537+
511538
@override
512539
String get messageIsEditedLabel => 'EDITED';
513540

0 commit comments

Comments
 (0)