Skip to content

Commit 8eb76d1

Browse files
committed
dialog: Add "Learn more"-button param to showErrorDialog
And reportErrorToUserModally.
1 parent 53f93db commit 8eb76d1

14 files changed

+87
-5
lines changed

assets/l10n/app_en.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@
447447
"@dialogClose": {
448448
"description": "Button label in dialogs to close."
449449
},
450+
"errorDialogLearnMore": "Learn more",
451+
"@errorDialogLearnMore": {
452+
"description": "Button label in error dialogs to open a web page with more information."
453+
},
450454
"errorDialogContinue": "OK",
451455
"@errorDialogContinue": {
452456
"description": "Button label in error dialogs to acknowledge the error and close the dialog."

lib/generated/l10n/zulip_localizations.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,12 @@ abstract class ZulipLocalizations {
693693
/// **'Close'**
694694
String get dialogClose;
695695

696+
/// Button label in error dialogs to open a web page with more information.
697+
///
698+
/// In en, this message translates to:
699+
/// **'Learn more'**
700+
String get errorDialogLearnMore;
701+
696702
/// Button label in error dialogs to acknowledge the error and close the dialog.
697703
///
698704
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
348348
@override
349349
String get dialogClose => 'Close';
350350

351+
@override
352+
String get errorDialogLearnMore => 'Learn more';
353+
351354
@override
352355
String get errorDialogContinue => 'OK';
353356

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
348348
@override
349349
String get dialogClose => 'Close';
350350

351+
@override
352+
String get errorDialogLearnMore => 'Learn more';
353+
351354
@override
352355
String get errorDialogContinue => 'OK';
353356

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
348348
@override
349349
String get dialogClose => 'Close';
350350

351+
@override
352+
String get errorDialogLearnMore => 'Learn more';
353+
351354
@override
352355
String get errorDialogContinue => 'OK';
353356

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
348348
@override
349349
String get dialogClose => 'Close';
350350

351+
@override
352+
String get errorDialogLearnMore => 'Learn more';
353+
351354
@override
352355
String get errorDialogContinue => 'OK';
353356

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
348348
@override
349349
String get dialogClose => 'Zamknij';
350350

351+
@override
352+
String get errorDialogLearnMore => 'Learn more';
353+
351354
@override
352355
String get errorDialogContinue => 'OK';
353356

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
348348
@override
349349
String get dialogClose => 'Закрыть';
350350

351+
@override
352+
String get errorDialogLearnMore => 'Learn more';
353+
351354
@override
352355
String get errorDialogContinue => 'OK';
353356

lib/generated/l10n/zulip_localizations_sk.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
348348
@override
349349
String get dialogClose => 'Zavrieť';
350350

351+
@override
352+
String get errorDialogLearnMore => 'Learn more';
353+
351354
@override
352355
String get errorDialogContinue => 'OK';
353356

lib/log.dart

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ void profilePrint(String message) {
6262
// `null` for the `message` parameter and promptly dismiss the reported errors.
6363
typedef ReportErrorCancellablyCallback = void Function(String? message, {String? details});
6464

65-
typedef ReportErrorCallback = void Function(String title, {String? message});
65+
typedef ReportErrorCallback = void Function(
66+
String title, {
67+
String? message,
68+
Uri? learnMoreButtonUrl,
69+
});
6670

6771
/// Show the user an error message, without requiring them to interact with it.
6872
///
@@ -96,7 +100,11 @@ void defaultReportErrorToUserBriefly(String? message, {String? details}) {
96100
_reportErrorToConsole(message, details);
97101
}
98102

99-
void defaultReportErrorToUserModally(String title, {String? message}) {
103+
void defaultReportErrorToUserModally(
104+
String title, {
105+
String? message,
106+
Uri? learnMoreButtonUrl,
107+
}) {
100108
_reportErrorToConsole(title, message);
101109
}
102110

0 commit comments

Comments
 (0)