Skip to content

Commit c1fbbe5

Browse files
committed
dialog: Sweep through error dialogs, giving message final punctuation
1 parent bf38693 commit c1fbbe5

File tree

8 files changed

+24
-18
lines changed

8 files changed

+24
-18
lines changed

assets/l10n/app_en.arb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
"server": {"type": "String", "example": "https://example.com"}
169169
}
170170
},
171-
"errorCouldNotFetchMessageSource": "Could not fetch message source",
171+
"errorCouldNotFetchMessageSource": "Could not fetch message source.",
172172
"@errorCouldNotFetchMessageSource": {
173173
"description": "Error message when the source of a message could not be fetched."
174174
},
@@ -561,7 +561,7 @@
561561
"url": {"type": "String", "example": "http://chat.example.com/"}
562562
}
563563
},
564-
"errorInvalidResponse": "The server sent an invalid response",
564+
"errorInvalidResponse": "The server sent an invalid response.",
565565
"@errorInvalidResponse": {
566566
"description": "Error message when an API call returned an invalid response."
567567
},
@@ -591,7 +591,7 @@
591591
"httpStatus": {"type": "int", "example": "500"}
592592
}
593593
},
594-
"errorVideoPlayerFailed": "Unable to play the video",
594+
"errorVideoPlayerFailed": "Unable to play the video.",
595595
"@errorVideoPlayerFailed": {
596596
"description": "Error message when a video fails to play."
597597
},

lib/generated/l10n/zulip_localizations.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ abstract class ZulipLocalizations {
359359
/// Error message when the source of a message could not be fetched.
360360
///
361361
/// In en, this message translates to:
362-
/// **'Could not fetch message source'**
362+
/// **'Could not fetch message source.'**
363363
String get errorCouldNotFetchMessageSource;
364364

365365
/// Error message when copying the text of a message to the user's system clipboard failed.
@@ -863,7 +863,7 @@ abstract class ZulipLocalizations {
863863
/// Error message when an API call returned an invalid response.
864864
///
865865
/// In en, this message translates to:
866-
/// **'The server sent an invalid response'**
866+
/// **'The server sent an invalid response.'**
867867
String get errorInvalidResponse;
868868

869869
/// Error message when a network request fails.
@@ -893,7 +893,7 @@ abstract class ZulipLocalizations {
893893
/// Error message when a video fails to play.
894894
///
895895
/// In en, this message translates to:
896-
/// **'Unable to play the video'**
896+
/// **'Unable to play the video.'**
897897
String get errorVideoPlayerFailed;
898898

899899
/// Error message when URL is empty

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
141141

142142
@override
143143
String get errorCouldNotFetchMessageSource =>
144-
'Could not fetch message source';
144+
'Could not fetch message source.';
145145

146146
@override
147147
String get errorCopyingFailed => 'Copying failed';
@@ -459,7 +459,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
459459
}
460460

461461
@override
462-
String get errorInvalidResponse => 'The server sent an invalid response';
462+
String get errorInvalidResponse => 'The server sent an invalid response.';
463463

464464
@override
465465
String get errorNetworkRequestFailed => 'Network request failed';
@@ -480,7 +480,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
480480
}
481481

482482
@override
483-
String get errorVideoPlayerFailed => 'Unable to play the video';
483+
String get errorVideoPlayerFailed => 'Unable to play the video.';
484484

485485
@override
486486
String get serverUrlValidationErrorEmpty => 'Please enter a URL.';

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
141141

142142
@override
143143
String get errorCouldNotFetchMessageSource =>
144-
'Could not fetch message source';
144+
'Could not fetch message source.';
145145

146146
@override
147147
String get errorCopyingFailed => 'Copying failed';
@@ -459,7 +459,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
459459
}
460460

461461
@override
462-
String get errorInvalidResponse => 'The server sent an invalid response';
462+
String get errorInvalidResponse => 'The server sent an invalid response.';
463463

464464
@override
465465
String get errorNetworkRequestFailed => 'Network request failed';
@@ -480,7 +480,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
480480
}
481481

482482
@override
483-
String get errorVideoPlayerFailed => 'Unable to play the video';
483+
String get errorVideoPlayerFailed => 'Unable to play the video.';
484484

485485
@override
486486
String get serverUrlValidationErrorEmpty => 'Please enter a URL.';

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
141141

142142
@override
143143
String get errorCouldNotFetchMessageSource =>
144-
'Could not fetch message source';
144+
'Could not fetch message source.';
145145

146146
@override
147147
String get errorCopyingFailed => 'Copying failed';
@@ -459,7 +459,7 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
459459
}
460460

461461
@override
462-
String get errorInvalidResponse => 'The server sent an invalid response';
462+
String get errorInvalidResponse => 'The server sent an invalid response.';
463463

464464
@override
465465
String get errorNetworkRequestFailed => 'Network request failed';
@@ -480,7 +480,7 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
480480
}
481481

482482
@override
483-
String get errorVideoPlayerFailed => 'Unable to play the video';
483+
String get errorVideoPlayerFailed => 'Unable to play the video.';
484484

485485
@override
486486
String get serverUrlValidationErrorEmpty => 'Please enter a URL.';

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
141141

142142
@override
143143
String get errorCouldNotFetchMessageSource =>
144-
'Could not fetch message source';
144+
'Could not fetch message source.';
145145

146146
@override
147147
String get errorCopyingFailed => 'Copying failed';
@@ -459,7 +459,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
459459
}
460460

461461
@override
462-
String get errorInvalidResponse => 'The server sent an invalid response';
462+
String get errorInvalidResponse => 'The server sent an invalid response.';
463463

464464
@override
465465
String get errorNetworkRequestFailed => 'Network request failed';
@@ -480,7 +480,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
480480
}
481481

482482
@override
483-
String get errorVideoPlayerFailed => 'Unable to play the video';
483+
String get errorVideoPlayerFailed => 'Unable to play the video.';
484484

485485
@override
486486
String get serverUrlValidationErrorEmpty => 'Please enter a URL.';

lib/log.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ typedef ReportErrorCallback = void Function(
8080
///
8181
/// If `details` is non-null, the [SnackBar] will contain a button that would
8282
/// open a dialog containing the error details.
83+
/// Prose in `details` should have final punctuation.
8384
// This gets set in [ZulipApp]. We need this indirection to keep `lib/log.dart`
8485
// from importing widget code, because the file is a dependency for the rest of
8586
// the app.
@@ -91,6 +92,8 @@ ReportErrorCancellablyCallback reportErrorToUserBriefly = defaultReportErrorToUs
9192
/// as the body. If called before the app's widget tree is ready
9293
/// (see [ZulipApp.ready]), then we give up on showing the message to the user,
9394
/// and just log the message to the console.
95+
///
96+
/// Prose in `message` should have final punctuation.
9497
// This gets set in [ZulipApp]. We need this indirection to keep `lib/log.dart`
9598
// from importing widget code, because the file is a dependency for the rest of
9699
// the app.

lib/widgets/dialog.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ class DialogStatus<T> {
4949
///
5050
/// The [DialogStatus.result] field of the return value can be used
5151
/// for waiting for the dialog to be closed.
52+
///
53+
/// Prose in [message] should have final punctuation:
54+
/// https://github.com/zulip/zulip-flutter/pull/1498#issuecomment-2853578577
5255
// This API is inspired by [ScaffoldManager.showSnackBar]. We wrap
5356
// [showDialog]'s return value, a [Future], inside [DialogStatus]
5457
// whose documentation can be accessed. This helps avoid confusion when

0 commit comments

Comments
 (0)