Skip to content

Commit 7ca409a

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: #234
1 parent 5f8917a commit 7ca409a

18 files changed

+743
-86
lines changed

assets/l10n/app_ar.arb

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

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 servers."
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
@@ -957,6 +957,60 @@ abstract class ZulipLocalizations {
957957
/// **'Several people are typing…'**
958958
String get manyPeopleTyping;
959959

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

+27
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,33 @@ class ZulipLocalizationsNb 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 => 'Несколько человек набирают сообщения…';
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 => 'ИЗМЕНЕНО';
513540

lib/generated/l10n/zulip_localizations_sk.dart

+27
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,33 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
508508
@override
509509
String get manyPeopleTyping => 'Niekoľko ludí píše…';
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 => 'UPRAVENÉ';
513540

0 commit comments

Comments
 (0)