fix(ui,localization): change label displayed when there is no photo or videos to attach
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
- [[#1424]](https://github.com/GetStream/stream-chat-flutter/issues/1424) Fixed a render issue when showing messages starting with 4 whitespaces.
|
||||
- Fixed a bug where the `AttachmentPickerBottomSheet` was not able to identify the mobile browser.
|
||||
|
||||
✅ Added
|
||||
- New `noPhotoOrVideoLabel` displayed when there is no files to choose.
|
||||
|
||||
## 5.2.0
|
||||
|
||||
✅ Added
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
+3
-3
@@ -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,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ class StreamChatLocalizationsDe extends GlobalStreamChatLocalizations {
|
||||
@override
|
||||
String get noUsersLabel => 'Derzeit gibt es keine User';
|
||||
|
||||
@override
|
||||
String get noPhotoOrVideoLabel => 'Es gibt kein Foto oder Video';
|
||||
|
||||
@override
|
||||
String get retryLabel => 'Erneut versuchen';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations {
|
||||
@override
|
||||
String get noUsersLabel => 'वर्तमान में कोई यूजर नहीं हैं';
|
||||
|
||||
@override
|
||||
String get noPhotoOrVideoLabel => "कोई फोटो या वीडियो नहीं है।";
|
||||
|
||||
@override
|
||||
String get retryLabel => 'पुन: प्रयास करे';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations {
|
||||
@override
|
||||
String get noUsersLabel => '現在、ユーザーはいません。';
|
||||
|
||||
@override
|
||||
String get noPhotoOrVideoLabel => '写真やビデオはありません';
|
||||
|
||||
@override
|
||||
String get retryLabel => '再試行';
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations {
|
||||
@override
|
||||
String get noUsersLabel => '현재 사용자가 없습니다';
|
||||
|
||||
@override
|
||||
String get noPhotoOrVideoLabel => '사진이나 동영상이 없습니다';
|
||||
|
||||
@override
|
||||
String get retryLabel => '다시 시도하십시오';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ class StreamChatLocalizationsPt extends GlobalStreamChatLocalizations {
|
||||
@override
|
||||
String get noUsersLabel => 'Nenhum usuário atualmente';
|
||||
|
||||
@override
|
||||
String get noPhotoOrVideoLabel => 'Não há foto ou vídeo';
|
||||
|
||||
@override
|
||||
String get retryLabel => 'Tente novamente';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user