Skip to content

Commit 8bf7576

Browse files
committed
dialog: Sweep through error dialogs, giving message final punctuation
1 parent f8af659 commit 8bf7576

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
},
@@ -554,7 +554,7 @@
554554
"url": {"type": "String", "example": "http://chat.example.com/"}
555555
}
556556
},
557-
"errorInvalidResponse": "The server sent an invalid response",
557+
"errorInvalidResponse": "The server sent an invalid response.",
558558
"@errorInvalidResponse": {
559559
"description": "Error message when an API call returned an invalid response."
560560
},
@@ -584,7 +584,7 @@
584584
"httpStatus": {"type": "int", "example": "500"}
585585
}
586586
},
587-
"errorVideoPlayerFailed": "Unable to play the video",
587+
"errorVideoPlayerFailed": "Unable to play the video.",
588588
"@errorVideoPlayerFailed": {
589589
"description": "Error message when a video fails to play."
590590
},

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.
@@ -857,7 +857,7 @@ abstract class ZulipLocalizations {
857857
/// Error message when an API call returned an invalid response.
858858
///
859859
/// In en, this message translates to:
860-
/// **'The server sent an invalid response'**
860+
/// **'The server sent an invalid response.'**
861861
String get errorInvalidResponse;
862862

863863
/// Error message when a network request fails.
@@ -887,7 +887,7 @@ abstract class ZulipLocalizations {
887887
/// Error message when a video fails to play.
888888
///
889889
/// In en, this message translates to:
890-
/// **'Unable to play the video'**
890+
/// **'Unable to play the video.'**
891891
String get errorVideoPlayerFailed;
892892

893893
/// 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';
@@ -454,7 +454,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
454454
}
455455

456456
@override
457-
String get errorInvalidResponse => 'The server sent an invalid response';
457+
String get errorInvalidResponse => 'The server sent an invalid response.';
458458

459459
@override
460460
String get errorNetworkRequestFailed => 'Network request failed';
@@ -475,7 +475,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
475475
}
476476

477477
@override
478-
String get errorVideoPlayerFailed => 'Unable to play the video';
478+
String get errorVideoPlayerFailed => 'Unable to play the video.';
479479

480480
@override
481481
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';
@@ -454,7 +454,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
454454
}
455455

456456
@override
457-
String get errorInvalidResponse => 'The server sent an invalid response';
457+
String get errorInvalidResponse => 'The server sent an invalid response.';
458458

459459
@override
460460
String get errorNetworkRequestFailed => 'Network request failed';
@@ -475,7 +475,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
475475
}
476476

477477
@override
478-
String get errorVideoPlayerFailed => 'Unable to play the video';
478+
String get errorVideoPlayerFailed => 'Unable to play the video.';
479479

480480
@override
481481
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';
@@ -454,7 +454,7 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
454454
}
455455

456456
@override
457-
String get errorInvalidResponse => 'The server sent an invalid response';
457+
String get errorInvalidResponse => 'The server sent an invalid response.';
458458

459459
@override
460460
String get errorNetworkRequestFailed => 'Network request failed';
@@ -475,7 +475,7 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
475475
}
476476

477477
@override
478-
String get errorVideoPlayerFailed => 'Unable to play the video';
478+
String get errorVideoPlayerFailed => 'Unable to play the video.';
479479

480480
@override
481481
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';
@@ -454,7 +454,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
454454
}
455455

456456
@override
457-
String get errorInvalidResponse => 'The server sent an invalid response';
457+
String get errorInvalidResponse => 'The server sent an invalid response.';
458458

459459
@override
460460
String get errorNetworkRequestFailed => 'Network request failed';
@@ -475,7 +475,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
475475
}
476476

477477
@override
478-
String get errorVideoPlayerFailed => 'Unable to play the video';
478+
String get errorVideoPlayerFailed => 'Unable to play the video.';
479479

480480
@override
481481
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)