-
Notifications
You must be signed in to change notification settings - Fork 386
Expand file tree
/
Copy pathtranslations.dart
More file actions
1678 lines (1212 loc) · 46.3 KB
/
Copy pathtranslations.dart
File metadata and controls
1678 lines (1212 loc) · 46.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ignore_for_file: lines_longer_than_80_chars
import 'package:intl/intl.dart';
import 'package:jiffy/jiffy.dart';
import 'package:stream_chat_flutter/src/localization/accessibility_translations.dart';
import 'package:stream_chat_flutter/src/message_list_view/message_list_view.dart';
import 'package:stream_chat_flutter/src/misc/connection_status_builder.dart';
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
/// Translation strings for the stream chat widgets
abstract class Translations {
/// Accessibility (a11y) translation strings.
///
/// Namespaced separately from visible strings because a11y translations
/// have different maintenance needs (screen-reader read-order testing,
/// pacing punctuation) and follow their own naming convention. See
/// [AccessibilityTranslations].
AccessibilityTranslations get accessibility;
/// The error shown when [launchURL] fails
String get launchUrlError;
/// The error shown when loading users fails
String get loadingUsersError;
/// The label for "retry" button
String get retryLabel;
/// The label for showing no users
String get noUsersLabel;
/// The label for showing no photo or video
String get noPhotoOrVideoLabel;
/// The text for showing user is online
String get userOnlineText;
/// The text for showing the last online of the user
String get userLastOnlineText;
/// The text shown when [users] starts typing
String userTypingText(Iterable<User> users);
/// The label for "thread reply"
String get threadReplyLabel;
/// The label for the thread view header ("Thread").
String get threadLabel;
/// The text for showing if the message is only visible to you
String get onlyVisibleToYouText;
/// The text for showing the thread reply count
String threadReplyCountText(int count);
/// The text for showing the attachments upload progress
String attachmentsUploadProgressText({
required int completed,
required int total,
});
/// The text for showing who pinned the message
String pinnedByUserText({
required User pinnedBy,
required User currentUser,
});
/// The text for showing there are empty messages
String get emptyMessagesText;
/// The text for showing generic error
String get genericErrorText;
/// The error shown when loading messages fails
String get loadingMessagesError;
/// The text for showing the result count in [StreamMessageSearchListView]
String resultCountText(int count);
/// The text for showing the message is deleted
String get messageDeletedText;
/// The label for message deleted
String get messageDeletedLabel;
/// The label for system message
String get systemMessageLabel;
/// The label for showing the message is edited
String get editedMessageLabel;
/// The label for message reactions
String get messageReactionsLabel;
/// The text for showing there are no chats
String get emptyChatMessagesText;
/// The text for showing the thread separator in case [StreamMessageListView]
/// contains a parent message
String threadSeparatorText(int replyCount);
/// The text for showing the unread messages count
/// in the [StreamMessageListView]
@Deprecated('Use unreadMessagesSeparatorLabel instead. Will be removed in the next major version.')
String unreadMessagesSeparatorText();
/// The label for the unread messages separator in the
/// [StreamMessageListView], e.g. "5 unread messages".
///
/// Falls back to the count-less `unreadMessagesSeparatorText`, so an
/// implementation written before this method existed — including one that
/// customises only that older string — keeps rendering its own text
/// rather than silently reverting to the built-in copy. Override this to
/// show the count.
///
/// Note that the fallback only helps classes that `extends` (or mix in)
/// [Translations]: Dart does not inherit method bodies through
/// `implements`, so a class implementing this interface directly has to
/// add this member. See the CHANGELOG for the migration.
String unreadMessagesSeparatorLabel({required int count}) {
// ignore: deprecated_member_use_from_same_package
return unreadMessagesSeparatorText();
}
/// The label for "connected" in [StreamConnectionStatusBuilder]
String get connectedLabel;
/// The label for "disconnected" in [StreamConnectionStatusBuilder]
String get disconnectedLabel;
/// The label for "reconnecting" in [StreamConnectionStatusBuilder]
String get reconnectingLabel;
/// The label for also send
/// as direct message "checkbox" in [StreamMessageComposer]
String get alsoSendAsDirectMessageLabel;
/// The label for search Gif
String get searchGifLabel;
/// The label for the MessageInput hint when permission denied on sendMessage
String get sendMessagePermissionError;
/// The label for add a comment or send in case of
/// attachments inside [StreamMessageComposer]
String get addACommentOrSendLabel;
/// The label for write a message in [StreamMessageComposer]
String get writeAMessageLabel;
/// The placeholder shown in [StreamMessageComposer] while slow mode is
/// active for the current user.
///
/// [cooldownTimeOut] is the number of seconds remaining before the user
/// can send another message. Defaults to `'Slow mode, wait ${cooldownTimeOut}s\u2026'`
/// which renders as e.g. "Slow mode, wait 9s…".
String slowModeOnLabel(int cooldownTimeOut);
/// The placeholder shown in the composer when a user-target command (for
/// example `/mute`, `/unmute`, `/ban`, `/unban`) is active.
///
/// Renders literally, for example as `@username`, to hint that the user
/// should select or type a username.
String get commandUsernameLabel;
/// The label for instant commands in [StreamMessageComposer]
String get instantCommandsLabel;
/// The error surfaced when the user taps a slash command while the
/// composer is editing a message.
String get commandUnavailableWhileEditingError;
/// The error surfaced when the user taps a moderation slash command
/// (e.g. `/mute`, `/ban`) while the composer is quoting another message.
String get commandUnavailableWhileQuotingError;
/// The generic error surfaced when a slash command is unavailable for a
/// reason not covered by [commandUnavailableWhileEditingError] or
/// [commandUnavailableWhileQuotingError].
String get commandUnavailableError;
/// The error shown in case the file is too large even after compression
/// while uploading via [StreamMessageComposer]
String fileTooLargeAfterCompressionError(double limitInMB);
/// The error shown in case the file is too large
/// while uploading via [StreamMessageComposer]
String fileTooLargeError(double limitInMB);
/// The error shown when a file's type (extension) is not allowed for upload.
///
/// [extension] is the raw extension without a leading dot (e.g. `'exe'`),
/// or `null` when the extension is unknown.
String fileTypeNotSupportedError(String? extension);
/// The error shown when the file being read has no bytes
String get couldNotReadBytesFromFileError;
/// The label for "add a file"
String get addAFileLabel;
/// The label for "upload a photo"
String get uploadAPhotoLabel;
/// The label for "upload a video"
String get uploadAVideoLabel;
/// The label for "photo from camera"
String get photoFromCameraLabel;
/// The label for "video from camera"
String get videoFromCameraLabel;
/// The label for "upload a file"
String get uploadAFileLabel;
/// The error shown when something went wrong
String get somethingWentWrongError;
/// The title shown when there is no internet connection.
String get connectionErrorTitle;
/// The description shown when there is no internet connection.
String get connectionErrorDescription;
/// The title shown when the connection is too slow or the request timed out.
String get slowConnectionErrorTitle;
/// The description shown when the connection is too slow or the request
/// timed out.
String get slowConnectionErrorDescription;
/// The title shown for a generic, uncategorised error.
String get genericErrorTitle;
/// The description shown for a generic, uncategorised error.
String get genericErrorDescription;
/// The label for "OK"
String get okLabel;
/// The label for a link disabled error
String get linkDisabledError;
/// The additional info on a link disabled error
String get linkDisabledDetails;
/// The label for "add more files"
String get addMoreFilesLabel;
/// The message shown for asking photo and video access permission
String get enablePhotoAndVideoAccessMessage;
/// The message shown for asking photo and video access permission
String get enableFileAccessMessage;
/// The message shown for asking gallery access permission
String get allowGalleryAccessMessage;
/// The message shown for asking file access permission
String get allowFileAccessMessage;
/// The label for "flag message"
String get flagMessageLabel;
/// The question asked while showing flag message dialog
String get flagMessageQuestion;
/// The label for "Flag"
String get flagLabel;
/// The label for "Cancel"
String get cancelLabel;
/// The label for successful message flag
String get flagMessageSuccessfulLabel;
/// The text for showing the message if successfully flagged
String get flagMessageSuccessfulText;
/// The label for "delete message"
String get deleteMessageLabel;
/// The question asked while showing delete message dialog
String get deleteMessageQuestion;
/// The label for "Delete"
String get deleteLabel;
/// The text for showing the operation could not be completed
String get operationCouldNotBeCompletedText;
/// The label for "Reply"
String get replyLabel;
/// The text for showing pin/un-pin functionality in [MessageWidget]
/// based on [pinned]
String togglePinUnpinText({required bool pinned});
/// The text for marking message as unread functionality in [MessageWidget]
String get markAsUnreadLabel;
/// The text for unread count indicator
String unreadCountIndicatorLabel({required int unreadCount});
/// The text of an error shown when marking a message as unread fails
String get markUnreadError;
/// The text for showing delete/retry-delete based on [isDeleteFailed]
String toggleDeleteRetryDeleteMessageText({required bool isDeleteFailed});
/// The label for "copy message"
String get copyMessageLabel;
/// The label for "edit message"
String get editMessageLabel;
/// The text for showing resend/resend-edited message
/// based on [isUpdateFailed]
String toggleResendOrResendEditedMessage({required bool isUpdateFailed});
/// The label for "Photos"
String get photosLabel;
/// The label for "Photos & Videos"
String get photosAndVideosLabel;
/// The text for showing on which [date] and [time] the message was sent
String sentAtText({required DateTime date, required DateTime time});
/// The label for "Today"
String get todayLabel;
/// The label for "Yesterday"
String get yesterdayLabel;
/// The label for "Just now", shown for timestamps within the last minute.
String get justNowLabel;
/// The text for showing the channel is muted
String get channelIsMutedText;
/// The text for showing there is no title
String get noTitleText;
/// The label for "let's start chatting"
String get letsStartChattingLabel;
/// The label for sending the first message
String get sendingFirstMessageLabel;
/// The label for "start a chat"
String get startAChatLabel;
/// The error shown when loading channel fails
String get loadingChannelsError;
/// The label for "Delete conversation"
String get deleteConversationLabel;
/// The question asked while showing delete conversation dialog
String get deleteConversationQuestion;
/// The label for "Stream Chat"
String get streamChatLabel;
/// The text for showing searching for network
String get searchingForNetworkText;
/// The label for "Offline"
String get offlineLabel;
/// The label for "Try again"
String get tryAgainLabel;
/// The text for showing the members count based on [count]
String membersCountText(int count);
/// The text for showing the watchers count based on [count]
String watchersCountText(int count);
/// The text for showing the combined members and online-watchers count in
/// the channel header subtitle of a group channel.
///
/// When [onlineCount] is `0`, the returned string is equivalent to
/// [membersCountText]. Otherwise, the result bakes in the separator and
/// word order chosen by the current locale — e.g. `'42 Members, 5 Online'`
/// in English or `'42人、5人がオンライン'` in Japanese.
String membersCountWithOnlineText({
required int memberCount,
required int onlineCount,
});
/// The label for "View Info"
String get viewInfoLabel;
/// The label for "Leave Group"
String get leaveGroupLabel;
/// The label for "Leave"
String get leaveLabel;
/// The label for "Leave conversation"
String get leaveConversationLabel;
/// The question asked while showing leave conversation dialog
String get leaveConversationQuestion;
/// The label for "Show in chat"
String get showInChatLabel;
/// The label for "Save Image"
String get saveImageLabel;
/// The label for "Save Video"
String get saveVideoLabel;
/// The label for "Upload Error"
String get uploadErrorLabel;
/// The label for "Giphy"
String get giphyLabel;
/// The label for "Shuffle"
String get shuffleLabel;
/// The label for "Send"
String get sendLabel;
/// The label for "With"
String get withText;
/// The text shown for "In"
String get inText;
/// The text shown for "You"
String get youText;
/// Gallery footer pagination text
String galleryPaginationText({
required int currentPage,
required int totalPages,
});
/// The text shown for "File"
String get fileText;
/// The label for "Reply to message"
String get replyToMessageLabel;
/// The label for the composer reply header when quoting another user's
/// message (e.g. "Reply to Alice").
String replyToUserLabel(String userName);
/// The label for "View library"
String get viewLibrary;
/// Label for "Attachment limit exceeded:
/// it's not possible to add more than $limit attachments"
String attachmentLimitExceedError(int limit);
/// The label for "Download"
String get downloadLabel;
/// The text for "Mute Group"/"Unmute Group" based on the value of [isMuted].
String toggleMuteUnmuteGroupText({required bool isMuted});
/// The text for "Mute User"/"Unmute User" based on the value of [isMuted].
String toggleMuteUnmuteUserText({required bool isMuted});
/// The text for "Block User"/"Unblock User" based on the value of [isBlocked].
String toggleBlockUnblockUserText({required bool isBlocked});
/// The text for "Are you sure you want to mute this group?"/"Are you sure you want to unmute this group?"
/// based on the value of [isMuted].
String toggleMuteUnmuteGroupQuestion({required bool isMuted});
/// The text for "Are you sure you want to mute this user?"/"Are you sure you want to unmute this user?"
/// based on the value of [isMuted].
String toggleMuteUnmuteUserQuestion({required bool isMuted});
/// The text for "MUTE"/"UNMUTE" based on the value of [isMuted].
String toggleMuteUnmuteAction({required bool isMuted});
/// The label for "Create poll".
///
/// If [isNew] is true, it returns "Create a new poll".
String createPollLabel({bool isNew = false});
/// The label for "Question".
///
/// If [isPlural] is true, it returns "Questions".
String questionLabel({bool isPlural = false});
/// The label for "Ask a question".
String get askAQuestionLabel;
/// The error shown when the poll question [length] is not within the [range].
///
/// Returns 'Question must be a least ${range.min} characters long' if the
/// question is too short and 'Question must be at most ${range.max}
/// characters long' if the question is too long.
String? pollQuestionValidationError(int length, Range<int> range);
/// The label for "Option".
///
/// If [isPlural] is true, it returns "Options".
String optionLabel({bool isPlural = false});
/// The error shown when the poll option text is empty.
String get pollOptionEmptyError;
/// The error shown when the poll option is a duplicate.
String get pollOptionDuplicateError;
/// The label for "Add an option".
String get addAnOptionLabel;
/// The label for "Multiple answers".
String get multipleAnswersLabel;
/// The description shown under the "Multiple answers" toggle in the poll
/// creator (e.g. "Select more than one option").
String get multipleAnswersDescription;
/// The label for "Maximum votes per person".
String get maximumVotesPerPersonLabel;
/// The description shown under the "Maximum votes per person" stepper in
/// the poll creator, describing the allowed vote range (e.g. "Choose
/// between 2–10 options").
String maximumVotesPerPersonDescription([Range<int>? range]);
/// The error shown when the max [votes] is not within the [range].
///
/// Returns 'Vote count must be at least ${range.min}' if the vote count is
/// too short and 'Vote count must be at most ${range.max}' if the vote count
/// is too long.
String? maxVotesPerPersonValidationError(int votes, Range<int> range);
/// The label for "Anonymous poll".
String get anonymousPollLabel;
/// The description shown under the "Anonymous poll" toggle in the poll
/// creator (e.g. "Hide who voted").
String get anonymousPollDescription;
/// The label for "Poll Options".
String get pollOptionsLabel;
/// The label for "Suggest an option".
String get suggestAnOptionLabel;
/// The description shown under the "Suggest an option" toggle in the poll
/// creator (e.g. "Let others add options").
String get suggestAnOptionDescription;
/// The label for "Enter a new option".
String get enterANewOptionLabel;
/// The label for "Add a comment".
String get addACommentLabel;
/// The description shown under the "Add a comment" toggle in the poll
/// creator (e.g. "Allow others to add comments").
String get addACommentDescription;
/// The label for "Poll comments".
String get pollCommentsLabel;
/// The label for "Update your comment".
String get updateYourCommentLabel;
/// The label for "Enter your comment".
String get enterYourCommentLabel;
/// The confirmation title shown when the user tries to end a poll.
String get endVoteConfirmationTitle;
/// The confirmation body message shown when the user tries to end a poll.
String get endVoteConfirmationMessage;
/// The label for "delete poll option"
String get deletePollOptionLabel;
/// The question asked while showing delete poll option dialog
String get deletePollOptionQuestion;
/// The label for "Create".
String get createLabel;
/// The label for "End".
String get endLabel;
/// The label for Poll voting mode.
///
/// Returns different labels based on the [votingMode].
///
/// eg: 'Vote ended', 'Select one', 'Select up to $count',
/// 'Select one or more'.
String pollVotingModeLabel(PollVotingMode votingMode);
/// The label for "See all options".
///
/// If [totalOptions] is provided, it returns "See all $count options".
String seeAllOptionsLabel({int? count});
/// The label for "View Comments".
String get viewCommentsLabel;
/// The label for "View Results".
String get viewResultsLabel;
/// The label for "End Poll".
String get endVoteLabel;
/// The label for "Poll Results".
String get pollResultsLabel;
/// The label for the poll votes screen app bar title (shown when viewing
/// all votes for a specific poll option).
String get pollVotesLabel;
/// The label for "$count votes".
String voteCountLabel({int? count});
/// The label for the total vote count footer in the poll results dialog,
/// e.g. "$count votes total".
String totalVoteCountLabel({int? count});
/// The label for "Show all votes".
///
/// If [count] is provided, it returns "Show all $count votes".
String showAllVotesLabel({int? count});
/// The label for a generic "View all" call-to-action, e.g. the footer
/// action of a truncated list.
String get viewAllLabel;
/// The label for "There are no poll votes currently".
String get noPollVotesLabel;
/// The label for "Error loading poll votes".
String get loadingPollVotesError;
/// The label for "replied to:"
String get repliedToLabel;
/// The label for "$count new threads"
String newThreadsLabel({required int count});
/// The label for "Loading..."
String get loadingLabel;
/// The label for "Slide to cancel"
String get slideToCancelLabel;
/// The label for "Hold to record"
String get holdToRecordLabel;
/// The label for "Send Anyway"
String get sendAnywayLabel;
/// Text shown when a message was blocked by moderation policies
String get moderatedMessageBlockedText;
/// The title of the moderated message warning dialog
String get moderationReviewModalTitle;
/// The content text of the moderated message warning dialog
String get moderationReviewModalDescription;
/// The text for empty message previews
String get emptyMessagePreviewText;
/// The text for voice recording in channel list preview
String get voiceRecordingText;
/// The text for audio attachment in channel list preview
String get audioAttachmentText;
/// The text for image attachment in channel list preview
String get imageAttachmentText;
/// The text for video attachment in channel list preview
String get videoAttachmentText;
/// The text for file attachment in channel list preview
String get fileAttachmentText;
/// The text for link attachment in channel list preview
String get linkAttachmentText;
/// The text for multiple files attachment in channel list preview
String filesAttachmentCountText(int count);
/// The text for multiple photos attachment in channel list preview
String photosAttachmentCountText(int count);
/// The text for multiple videos attachment in channel list preview
String videosAttachmentCountText(int count);
/// The text for poll when current user voted
String get pollYouVotedText;
/// The text for poll when someone voted
String pollSomeoneVotedText(String username);
/// The text for poll when current user created
String get pollYouCreatedText;
/// The text for poll when someone created
String pollSomeoneCreatedText(String username);
/// The label for draft message
String get draftLabel;
/// The label for location attachment.
///
/// [isLive] indicates if the location is live or not.
String locationLabel({bool isLive = false});
/// The text shown when there are no conversations yet.
String get noConversationsYetText;
/// The text shown when there are no threads yet.
String get replyToStartThreadText;
/// The text shown to prompt the user to send a message.
String get sendMessageToStartConversationText;
/// The label for the "Saved for later" message annotation.
String get savedForLaterLabel;
/// The annotation label shown on a message that was replied to a thread,
/// displayed in channel view (e.g. "Replied to a thread").
String get repliedToThreadAnnotationLabel;
/// The annotation label shown on a message that was also sent in channel,
/// displayed in thread view (e.g. "Also sent in channel").
String get alsoSentInChannelAnnotationLabel;
/// The "View" link label used in message annotations.
String get viewLabel;
/// The annotation label for a reminder (e.g. "Reminder set").
String get reminderSetLabel;
/// The text displaying the reminder time (e.g. "Today at 3:00 PM").
String reminderAtText(String time);
/// The label for "Create a poll and let everyone vote!"
String get createPollPromptLabel;
/// The label for "Take a photo and share"
String get takePhotoAndShareLabel;
/// The label for "Take a video and share"
String get takeVideoAndShareLabel;
/// The label for "Open camera"
String get openCameraLabel;
/// The label for "Select files to share"
String get selectFilesToShareLabel;
/// The label for "Open files"
String get openFilesLabel;
/// The label for unsupported attachment types
String get unsupportedAttachmentLabel;
/// The label for "CONFIRM" (e.g. [StreamMessageActionConfirmationModal]).
String get confirmLabel;
/// The text shown when there are no reactions on a message.
String get emptyReactionsText;
/// The error shown when the reactions list fails to load.
String get loadingReactionsError;
/// The label hint shown next to the viewer's own reaction indicating the
/// reaction can be tapped to remove it.
String get tapToRemoveReactionLabel;
/// The header text for the reaction detail sheet showing the count of
/// visible reactions (e.g. "1 Reaction" / "5 Reactions").
String reactionsCountText(int count);
/// The text shown under the "@channel" entry in the mention autocomplete,
/// describing that it notifies every channel member.
String get notifyChannelText;
/// The text shown under the "@here" entry in the mention autocomplete,
/// describing that it notifies every online channel member.
String get notifyHereText;
/// The text shown under a role mention entry in the mention autocomplete,
/// describing that it notifies every member holding the role named [role].
String notifyRoleText(String role);
}
/// Default implementation of Translation strings for the stream chat widgets
class DefaultTranslations implements Translations {
const DefaultTranslations._();
/// Singleton instance of [DefaultTranslations]
static const instance = DefaultTranslations._();
@override
AccessibilityTranslations get accessibility => const DefaultAccessibilityTranslations();
@override
String get launchUrlError => 'Cannot launch the url';
@override
String get loadingUsersError => 'Error loading users';
@override
String get noUsersLabel => 'There are no users currently';
@override
String get noPhotoOrVideoLabel => 'There is no photo or video';
@override
String get retryLabel => 'Retry';
@override
String get userLastOnlineText => 'Last online';
@override
String get userOnlineText => 'Online';
@override
String userTypingText(Iterable<User> users) {
if (users.isEmpty) return '';
final first = users.first;
if (users.length == 1) {
return '${first.name} is typing';
}
return '${first.name} and ${users.length - 1} more are typing';
}
@override
String get threadReplyLabel => 'Thread Reply';
@override
String get threadLabel => 'Thread';
@override
String get onlyVisibleToYouText => 'Only visible to you';
@override
String threadReplyCountText(int count) => count == 1 ? '1 reply' : '$count replies';
@override
String attachmentsUploadProgressText({
required int completed,
required int total,
}) => 'Uploaded $completed of $total ...';
@override
String pinnedByUserText({
required User pinnedBy,
required User currentUser,
}) {
final pinnedByCurrentUser = currentUser.id == pinnedBy.id;
if (pinnedByCurrentUser) return 'Pinned by You';
return 'Pinned by ${pinnedBy.name}';
}
@override
String get sendMessagePermissionError => "You don't have permission to send messages";
@override
String get emptyMessagesText => 'No messages yet';
@override
String get genericErrorText => 'Something went wrong';
@override
String get loadingMessagesError => 'Error loading messages';
@override
String resultCountText(int count) => '$count results';
@override
String get messageDeletedText => 'This message is deleted.';
@override
String get messageDeletedLabel => 'Message deleted';
@override
String get systemMessageLabel => 'System Message';
@override
String get editedMessageLabel => 'Edited';
@override
String get messageReactionsLabel => 'Message Reactions';
@override
String get emptyChatMessagesText => 'No chats here yet...';
@override
String threadSeparatorText(int replyCount) {
if (replyCount == 1) return '1 reply';
return '$replyCount replies';
}
@override
String get connectedLabel => 'Connected';
@override
String get disconnectedLabel => 'Disconnected';
@override
String get reconnectingLabel => 'Reconnecting...';
@override
String get alsoSendAsDirectMessageLabel => 'Also send in Channel';
@override
String get addACommentOrSendLabel => 'Add a comment or send';
@override
String get searchGifLabel => 'Search GIFs';
@override
String get writeAMessageLabel => 'Send a message';
@override
String get instantCommandsLabel => 'Instant Commands';
@override
String get commandUnavailableWhileEditingError => 'Not available while editing';
@override
String get commandUnavailableWhileQuotingError => 'Not available while replying';
@override
String get commandUnavailableError => 'Command not available';
@override
String fileTooLargeAfterCompressionError(double limitInMB) =>
'The file is too large to upload. '
'The file size limit is $limitInMB MB. '
'We tried compressing it, but it was not enough.';
@override
String fileTooLargeError(double limitInMB) =>
'The file is too large to upload. The file size limit is $limitInMB MB.';
@override
String fileTypeNotSupportedError(String? extension) {
if (extension != null) return "'.$extension' files are not supported for upload.";
return 'This file type is not supported for upload.';
}
@override
String get couldNotReadBytesFromFileError => 'Could not read bytes from file.';
@override
String get addAFileLabel => 'Add a file';
@override
String get photoFromCameraLabel => 'Photo from camera';
@override
String get uploadAFileLabel => 'Upload a file';
@override
String get uploadAPhotoLabel => 'Upload a photo';
@override
String get uploadAVideoLabel => 'Upload a video';
@override
String get videoFromCameraLabel => 'Video from camera';
@override
String get okLabel => 'OK';
@override
String get somethingWentWrongError => 'Something went wrong';
@override
String get connectionErrorTitle => 'No Internet Connection';
@override
String get connectionErrorDescription => 'Please check your internet connection';
@override
String get slowConnectionErrorTitle => 'Slow Internet Connection';
@override
String get slowConnectionErrorDescription => 'There seems to be a problem with your internet connection';
@override
String get genericErrorTitle => 'Error';