chore(ui, localization): add doc-comments

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-07-22 17:18:51 +05:30
committed by xsahil03x
parent 6ceb010f0c
commit 3e552ab4f6
16 changed files with 153 additions and 39 deletions
@@ -6,8 +6,11 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart'
show StreamChatLocalizations, User;
part 'stream_chat_localizations_en.dart';
part 'stream_chat_localizations_fr.dart';
part 'stream_chat_localizations_it.dart';
part 'stream_chat_localizations_hi.dart';
/// The set of supported languages, as language code strings.
@@ -28,8 +31,8 @@ const kStreamChatSupportedLanguages = {
/// Creates a [GlobalStreamChatLocalizations] instance for the given `locale`.
///
/// All of the function's arguments except `locale` will be passed to the
/// [GlobalStreamChatLocalizations] constructor. (The `localeName` argument of that
/// constructor is specified by the actual subclass constructor by this
/// [GlobalStreamChatLocalizations] constructor. (The `localeName` argument
/// of that constructor is specified by the actual subclass constructor by this
/// function.)
///
/// The following locales are supported by this package:
@@ -92,13 +95,15 @@ abstract class GlobalStreamChatLocalizations
required String localeName,
}) : _localeName = localeName;
// ignore: unused_field
final String _localeName;
/// A [LocalizationsDelegate] for [StreamChatLocalizations].
///
/// Most internationalized apps will use [GlobalStreamChatLocalizations.delegates]
/// as the value of [MaterialApp.localizationsDelegates] to include
/// the localizations for both the flutter and stream chat widget libraries.
/// Most internationalized apps will use
/// [GlobalStreamChatLocalizations.delegates] as the value of
/// [MaterialApp.localizationsDelegates] to include the localizations for both
/// the flutter and stream chat widget libraries.
static const LocalizationsDelegate<StreamChatLocalizations> delegate =
_StreamChatLocalizationsDelegate();
@@ -79,7 +79,7 @@ class StreamChatLocalizationsEn extends GlobalStreamChatLocalizations {
String get messageDeletedLabel => 'Message deleted';
@override
String get messageReactionsText => 'Message Reactions';
String get messageReactionsLabel => 'Message Reactions';
@override
String get emptyChatMessagesText => 'No chats here yet...';
@@ -149,7 +149,7 @@ class StreamChatLocalizationsEn extends GlobalStreamChatLocalizations {
String get okLabel => 'OK';
@override
String get somethingWentWrongLabel => 'Something went wrong';
String get somethingWentWrongError => 'Something went wrong';
@override
String get addMoreFilesLabel => 'Add more files';
@@ -280,7 +280,7 @@ class StreamChatLocalizationsEn extends GlobalStreamChatLocalizations {
String get streamChatLabel => 'Stream Chat';
@override
String get searchingForNetworkLabel => 'Searching for Network';
String get searchingForNetworkText => 'Searching for Network';
@override
String get offlineLabel => 'Offline...';
@@ -1,6 +1,6 @@
part of 'stream_chat_localizations.dart';
/// The translations for English (`fr`).
/// The translations for French (`fr`).
class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations {
/// Create an instance of the translation bundle for French.
const StreamChatLocalizationsFr({String localeName = 'fr'})
@@ -42,7 +42,7 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations {
@override
String threadReplyCountText(int count) =>
"$count Réponses au fil de discussion";
'$count Réponses au fil de discussion';
@override
String attachmentsUploadProgressText({
@@ -80,7 +80,7 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations {
String get messageDeletedLabel => 'Message supprimé';
@override
String get messageReactionsText => 'Réactions aux messages';
String get messageReactionsLabel => 'Réactions aux messages';
@override
String get emptyChatMessagesText => 'Pas encore de chats ici...';
@@ -124,7 +124,8 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations {
@override
String fileTooLargeError(double limitInMB) =>
'Le fichier est trop volumineux pour être téléchargé. La taille limite du fichier est de $limitInMB Mo.';
'Le fichier est trop volumineux pour être téléchargé. '
'La taille limite du fichier est de $limitInMB Mo.';
@override
String emojiMatchingQueryText(String query) =>
@@ -152,7 +153,7 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations {
String get okLabel => 'OK';
@override
String get somethingWentWrongLabel => 'Quelque chose a mal tourné';
String get somethingWentWrongError => 'Quelque chose a mal tourné';
@override
String get addMoreFilesLabel => "Ajouter d'autres fichiers";
@@ -283,7 +284,7 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations {
String get streamChatLabel => 'Stream Chat';
@override
String get searchingForNetworkLabel => 'Recherche de réseau';
String get searchingForNetworkText => 'Recherche de réseau';
@override
String get offlineLabel => 'Hors ligne...';
@@ -79,7 +79,7 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations {
String get messageDeletedLabel => 'संदेश हटाये';
@override
String get messageReactionsText => 'संदेश प्रतिक्रियाएं';
String get messageReactionsLabel => 'संदेश प्रतिक्रियाएं';
@override
String get emptyChatMessagesText => 'यहां अभी तक कोई चैट नहीं...';
@@ -149,7 +149,7 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations {
String get okLabel => 'ठीक';
@override
String get somethingWentWrongLabel => 'लोड करने में समस्या';
String get somethingWentWrongError => 'लोड करने में समस्या';
@override
String get addMoreFilesLabel => 'और फ़ाइलें जोड़ें';
@@ -279,7 +279,7 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations {
String get streamChatLabel => 'स्ट्रीम चैट';
@override
String get searchingForNetworkLabel => 'नेटवर्क खोज रहे हैं';
String get searchingForNetworkText => 'नेटवर्क खोज रहे हैं';
@override
String get offlineLabel => 'ऑफलाइन...';
@@ -1,8 +1,8 @@
part of 'stream_chat_localizations.dart';
/// The translations for English (`hi`).
/// The translations for Italian (`it`).
class StreamChatLocalizationsIt extends GlobalStreamChatLocalizations {
/// Create an instance of the translation bundle for Hindi.
/// Create an instance of the translation bundle for Italian.
const StreamChatLocalizationsIt({String localeName = 'it'})
: super(localeName: localeName);
@@ -80,7 +80,7 @@ class StreamChatLocalizationsIt extends GlobalStreamChatLocalizations {
String get messageDeletedLabel => 'Messaggio cancellato';
@override
String get messageReactionsText => 'Reazioni al messaggio';
String get messageReactionsLabel => 'Reazioni al messaggio';
@override
String get emptyChatMessagesText => 'Nessuna conversazione al momento...';
@@ -151,7 +151,7 @@ Il file è troppo grande per essere caricato. Il limite è di $limitInMB MB.''';
String get okLabel => 'Ok';
@override
String get somethingWentWrongLabel => 'Qualcosa è andato storto';
String get somethingWentWrongError => 'Qualcosa è andato storto';
@override
String get addMoreFilesLabel => 'Aggiungi altri file';
@@ -281,7 +281,7 @@ Inviato il ${_getDay(date)} alle ${Jiffy(time.toLocal()).format('HH:mm')}''';
String get streamChatLabel => 'Stream Chat';
@override
String get searchingForNetworkLabel => 'Cercando una connessione';
String get searchingForNetworkText => 'Cercando una connessione';
@override
String get offlineLabel => 'Offline...';
@@ -51,7 +51,7 @@ void main() {
expect(localizations.resultCountText(3), isNotNull);
expect(localizations.messageDeletedText, isNotNull);
expect(localizations.messageDeletedLabel, isNotNull);
expect(localizations.messageReactionsText, isNotNull);
expect(localizations.messageReactionsLabel, isNotNull);
expect(localizations.emptyChatMessagesText, isNotNull);
expect(localizations.threadSeparatorText(3), isNotNull);
expect(localizations.connectedLabel, isNotNull);
@@ -72,7 +72,7 @@ void main() {
expect(localizations.uploadAVideoLabel, isNotNull);
expect(localizations.videoFromCameraLabel, isNotNull);
expect(localizations.okLabel, isNotNull);
expect(localizations.somethingWentWrongLabel, isNotNull);
expect(localizations.somethingWentWrongError, isNotNull);
expect(localizations.addMoreFilesLabel, isNotNull);
expect(localizations.enablePhotoAndVideoAccessMessage, isNotNull);
expect(localizations.allowGalleryAccessMessage, isNotNull);
@@ -131,7 +131,7 @@ void main() {
expect(localizations.loadingChannelsError, isNotNull);
expect(localizations.deleteConversationQuestion, isNotNull);
expect(localizations.streamChatLabel, isNotNull);
expect(localizations.searchingForNetworkLabel, isNotNull);
expect(localizations.searchingForNetworkText, isNotNull);
expect(localizations.offlineLabel, isNotNull);
expect(localizations.tryAgainLabel, isNotNull);
// 1 member