diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 69f4fc7f..6e1d8e09 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -9,6 +9,9 @@ - Fixed a bug where the `AttachmentPickerBottomSheet` was not able to identify the mobile browser. - Fixed uploading files on Windows - fixed temp file path. +✅ Added +- New `noPhotoOrVideoLabel` displayed when there is no files to choose. + ## 5.2.0 ✅ Added diff --git a/packages/stream_chat_flutter/lib/src/localization/translations.dart b/packages/stream_chat_flutter/lib/src/localization/translations.dart index d41dfcb8..b7436d4b 100644 --- a/packages/stream_chat_flutter/lib/src/localization/translations.dart +++ b/packages/stream_chat_flutter/lib/src/localization/translations.dart @@ -18,6 +18,9 @@ abstract class Translations { /// 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; @@ -373,6 +376,9 @@ class DefaultTranslations implements Translations { @override String get noUsersLabel => 'There are no users currently'; + @override + String get noPhotoOrVideoLabel => 'There is no photo or video'; + @override String get retryLabel => 'Retry'; diff --git a/packages/stream_chat_flutter/lib/src/scroll_view/photo_gallery/stream_photo_gallery.dart b/packages/stream_chat_flutter/lib/src/scroll_view/photo_gallery/stream_photo_gallery.dart index 257eae22..8af231a5 100644 --- a/packages/stream_chat_flutter/lib/src/scroll_view/photo_gallery/stream_photo_gallery.dart +++ b/packages/stream_chat_flutter/lib/src/scroll_view/photo_gallery/stream_photo_gallery.dart @@ -366,7 +366,7 @@ class StreamPhotoGallery extends StatelessWidget { color: chatThemeData.colorTheme.disabled, ), emptyTitle: Text( - context.translations.noUsersLabel, + context.translations.noPhotoOrVideoLabel, style: chatThemeData.textTheme.headline, ), ), @@ -377,7 +377,7 @@ class StreamPhotoGallery extends StatelessWidget { return StreamScrollViewLoadMoreError.grid( onTap: controller.retry, error: Text( - context.translations.loadingUsersError, + context.translations.genericErrorText, textAlign: TextAlign.center, ), ); @@ -400,7 +400,7 @@ class StreamPhotoGallery extends StatelessWidget { return errorBuilder?.call(context, error) ?? Center( child: StreamScrollViewErrorWidget( - errorTitle: Text(context.translations.loadingUsersError), + errorTitle: Text(context.translations.genericErrorText), onRetryPressed: controller.refresh, ), ); diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index 07a266d0..878a73fd 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -3,6 +3,7 @@ ✅ Added * Added support for [Catalan](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart) locale. +* Added translations for new `noPhotoOrVideoLabel` label. 🔄 Changed diff --git a/packages/stream_chat_localizations/example/lib/add_new_lang.dart b/packages/stream_chat_localizations/example/lib/add_new_lang.dart index c52761a8..f71d4e1b 100644 --- a/packages/stream_chat_localizations/example/lib/add_new_lang.dart +++ b/packages/stream_chat_localizations/example/lib/add_new_lang.dart @@ -38,6 +38,9 @@ class NnStreamChatLocalizations extends GlobalStreamChatLocalizations { @override String get noUsersLabel => 'There are no users currently'; + @override + String get noPhotoOrVideoLabel => 'There is no photo or video'; + @override String get retryLabel => 'Retry'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart index 68b6c3cd..d28f7b96 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsCa extends GlobalStreamChatLocalizations { @override String get noUsersLabel => 'Actualment no hi ha usuaris'; + @override + String get noPhotoOrVideoLabel => 'No hi ha fotos ni vídeos'; + @override String get retryLabel => 'Torna-ho a provar'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart index 0c0d5660..88d7c596 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsDe extends GlobalStreamChatLocalizations { @override String get noUsersLabel => 'Derzeit gibt es keine User'; + @override + String get noPhotoOrVideoLabel => 'Es gibt keine Foto oder Video'; + @override String get retryLabel => 'Erneut versuchen'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart index 34cf5fef..70bab06d 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsEn extends GlobalStreamChatLocalizations { @override String get noUsersLabel => 'There are no users currently'; + @override + String get noPhotoOrVideoLabel => 'There is no photo or video'; + @override String get retryLabel => 'Retry'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart index 40f7d52f..1e77071e 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsEs extends GlobalStreamChatLocalizations { @override String get noUsersLabel => 'No hay usuarios actualmente'; + @override + String get noPhotoOrVideoLabel => 'No hay fotos ni vídeos'; + @override String get retryLabel => 'Inténtelo de nuevo'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart index 16834958..75f5cd4f 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations { @override String get noUsersLabel => "Il n'y a pas d'utilisateurs actuellement"; + @override + String get noPhotoOrVideoLabel => "Il n'y a ni photo ni vidéo"; + @override String get retryLabel => 'Réessayer'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart index 0887f57f..c00ab269 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations { @override String get noUsersLabel => 'वर्तमान में कोई यूजर नहीं हैं'; + @override + String get noPhotoOrVideoLabel => 'कोई फोटो या वीडियो नहीं है।'; + @override String get retryLabel => 'पुन: प्रयास करे'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart index 3e5d7d62..b79e2a6d 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsIt extends GlobalStreamChatLocalizations { @override String get noUsersLabel => "Non c'é nessun utente al momento"; + @override + String get noPhotoOrVideoLabel => 'Non ci sono foto o video'; + @override String get retryLabel => 'Riprova'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart index b6384d4b..f26d8f85 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { @override String get noUsersLabel => '現在、ユーザーはいません。'; + @override + String get noPhotoOrVideoLabel => '写真やビデオはありません'; + @override String get retryLabel => '再試行'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart index b1b929a4..7dac84a5 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { @override String get noUsersLabel => '현재 사용자가 없습니다'; + @override + String get noPhotoOrVideoLabel => '사진이나 동영상이 없습니다'; + @override String get retryLabel => '다시 시도하십시오'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart index db231a86..4a18fd6b 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsNo extends GlobalStreamChatLocalizations { @override String get noUsersLabel => 'Det er ingen brukere akkurat nå'; + @override + String get noPhotoOrVideoLabel => 'Det er ingen bilde eller video'; + @override String get retryLabel => 'Prøv igjen'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart index afecb220..3613e91c 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart @@ -14,6 +14,9 @@ class StreamChatLocalizationsPt extends GlobalStreamChatLocalizations { @override String get noUsersLabel => 'Nenhum usuário atualmente'; + @override + String get noPhotoOrVideoLabel => 'Não há fotos ou vídeos'; + @override String get retryLabel => 'Tente novamente'; @@ -66,7 +69,8 @@ class StreamChatLocalizationsPt extends GlobalStreamChatLocalizations { String get genericErrorText => 'Ocorreu um problema'; @override - String get loadingMessagesError => 'Ocorreu um problema ao carregar a mensagem'; + String get loadingMessagesError => + 'Ocorreu um problema ao carregar a mensagem'; @override String resultCountText(int count) => '$count resultados';