Skip to content

Commit c263ae7

Browse files
rajveermalviyagnprice
authored andcommitted
notif: Fix error message when account not found in store
[greg: cherry-picked from zulip#1379]
1 parent 5636e72 commit c263ae7

16 files changed

+29
-37
lines changed

assets/l10n/app_en.arb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,9 +919,9 @@
919919
"@errorNotificationOpenTitle": {
920920
"description": "Error title when notification opening fails"
921921
},
922-
"errorNotificationOpenAccountMissing": "The account associated with this notification no longer exists.",
923-
"@errorNotificationOpenAccountMissing": {
924-
"description": "Error message when the account associated with the notification is not found"
922+
"errorNotificationOpenAccountNotFound": "The account associated with this notification could not be found.",
923+
"@errorNotificationOpenAccountNotFound": {
924+
"description": "Error message when the account associated with the notification could not be found"
925925
},
926926
"errorReactionAddingFailedTitle": "Adding reaction failed",
927927
"@errorReactionAddingFailedTitle": {

assets/l10n/app_pl.arb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,6 @@
557557
"@errorNotificationOpenTitle": {
558558
"description": "Error title when notification opening fails"
559559
},
560-
"errorNotificationOpenAccountMissing": "Konto związane z tym powiadomieniem już nie istnieje.",
561-
"@errorNotificationOpenAccountMissing": {
562-
"description": "Error message when the account associated with the notification is not found"
563-
},
564560
"aboutPageOpenSourceLicenses": "Licencje otwartego źródła",
565561
"@aboutPageOpenSourceLicenses": {
566562
"description": "Item title in About Zulip page to navigate to Licenses page"

assets/l10n/app_ru.arb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,6 @@
287287
"@errorNotificationOpenTitle": {
288288
"description": "Error title when notification opening fails"
289289
},
290-
"errorNotificationOpenAccountMissing": "Учетной записи, связанной с этим оповещением, больше нет.",
291-
"@errorNotificationOpenAccountMissing": {
292-
"description": "Error message when the account associated with the notification is not found"
293-
},
294290
"switchAccountButton": "Сменить учетную запись",
295291
"@switchAccountButton": {
296292
"description": "Label for main-menu button leading to the choose-account page."

lib/generated/l10n/zulip_localizations.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,11 +1367,11 @@ abstract class ZulipLocalizations {
13671367
/// **'Failed to open notification'**
13681368
String get errorNotificationOpenTitle;
13691369

1370-
/// Error message when the account associated with the notification is not found
1370+
/// Error message when the account associated with the notification could not be found
13711371
///
13721372
/// In en, this message translates to:
1373-
/// **'The account associated with this notification no longer exists.'**
1374-
String get errorNotificationOpenAccountMissing;
1373+
/// **'The account associated with this notification could not be found.'**
1374+
String get errorNotificationOpenAccountNotFound;
13751375

13761376
/// Error title when adding a message reaction fails
13771377
///

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,8 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
747747
String get errorNotificationOpenTitle => 'Failed to open notification';
748748

749749
@override
750-
String get errorNotificationOpenAccountMissing =>
751-
'The account associated with this notification no longer exists.';
750+
String get errorNotificationOpenAccountNotFound =>
751+
'The account associated with this notification could not be found.';
752752

753753
@override
754754
String get errorReactionAddingFailedTitle => 'Adding reaction failed';

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,8 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
747747
String get errorNotificationOpenTitle => 'Failed to open notification';
748748

749749
@override
750-
String get errorNotificationOpenAccountMissing =>
751-
'The account associated with this notification no longer exists.';
750+
String get errorNotificationOpenAccountNotFound =>
751+
'The account associated with this notification could not be found.';
752752

753753
@override
754754
String get errorReactionAddingFailedTitle => 'Adding reaction failed';

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,8 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
747747
String get errorNotificationOpenTitle => 'Failed to open notification';
748748

749749
@override
750-
String get errorNotificationOpenAccountMissing =>
751-
'The account associated with this notification no longer exists.';
750+
String get errorNotificationOpenAccountNotFound =>
751+
'The account associated with this notification could not be found.';
752752

753753
@override
754754
String get errorReactionAddingFailedTitle => 'Adding reaction failed';

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,8 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
747747
String get errorNotificationOpenTitle => 'Failed to open notification';
748748

749749
@override
750-
String get errorNotificationOpenAccountMissing =>
751-
'The account associated with this notification no longer exists.';
750+
String get errorNotificationOpenAccountNotFound =>
751+
'The account associated with this notification could not be found.';
752752

753753
@override
754754
String get errorReactionAddingFailedTitle => 'Adding reaction failed';

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,8 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
747747
String get errorNotificationOpenTitle => 'Failed to open notification';
748748

749749
@override
750-
String get errorNotificationOpenAccountMissing =>
751-
'The account associated with this notification no longer exists.';
750+
String get errorNotificationOpenAccountNotFound =>
751+
'The account associated with this notification could not be found.';
752752

753753
@override
754754
String get errorReactionAddingFailedTitle => 'Adding reaction failed';

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,8 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
757757
'Otwieranie powiadomienia bez powodzenia';
758758

759759
@override
760-
String get errorNotificationOpenAccountMissing =>
761-
'Konto związane z tym powiadomieniem już nie istnieje.';
760+
String get errorNotificationOpenAccountNotFound =>
761+
'The account associated with this notification could not be found.';
762762

763763
@override
764764
String get errorReactionAddingFailedTitle => 'Dodanie reakcji bez powodzenia';

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,8 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
761761
String get errorNotificationOpenTitle => 'Не удалось открыть оповещения';
762762

763763
@override
764-
String get errorNotificationOpenAccountMissing =>
765-
'Учетной записи, связанной с этим оповещением, больше нет.';
764+
String get errorNotificationOpenAccountNotFound =>
765+
'The account associated with this notification could not be found.';
766766

767767
@override
768768
String get errorReactionAddingFailedTitle => 'Не удалось добавить реакцию';

lib/generated/l10n/zulip_localizations_sk.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,8 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
749749
String get errorNotificationOpenTitle => 'Nepodarilo sa otvoriť oznámenie';
750750

751751
@override
752-
String get errorNotificationOpenAccountMissing =>
753-
'The account associated with this notification no longer exists.';
752+
String get errorNotificationOpenAccountNotFound =>
753+
'The account associated with this notification could not be found.';
754754

755755
@override
756756
String get errorReactionAddingFailedTitle => 'Nepodarilo sa pridať reakciu';

lib/generated/l10n/zulip_localizations_uk.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,8 @@ class ZulipLocalizationsUk extends ZulipLocalizations {
761761
String get errorNotificationOpenTitle => 'Не вдалося відкрити сповіщення';
762762

763763
@override
764-
String get errorNotificationOpenAccountMissing =>
765-
'Обліковий запис, пов’язаний із цим сповіщенням, більше не існує.';
764+
String get errorNotificationOpenAccountNotFound =>
765+
'The account associated with this notification could not be found.';
766766

767767
@override
768768
String get errorReactionAddingFailedTitle => 'Не вдалося додати реакцію';

lib/generated/l10n/zulip_localizations_zh.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,8 @@ class ZulipLocalizationsZh extends ZulipLocalizations {
747747
String get errorNotificationOpenTitle => 'Failed to open notification';
748748

749749
@override
750-
String get errorNotificationOpenAccountMissing =>
751-
'The account associated with this notification no longer exists.';
750+
String get errorNotificationOpenAccountNotFound =>
751+
'The account associated with this notification could not be found.';
752752

753753
@override
754754
String get errorReactionAddingFailedTitle => 'Adding reaction failed';

lib/notifications/display.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ class NotificationDisplayManager {
507507
final zulipLocalizations = ZulipLocalizations.of(context);
508508
showErrorDialog(context: context,
509509
title: zulipLocalizations.errorNotificationOpenTitle,
510-
message: zulipLocalizations.errorNotificationOpenAccountMissing);
510+
message: zulipLocalizations.errorNotificationOpenAccountNotFound);
511511
return null;
512512
}
513513

test/notifications/display_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ void main() {
11371137
check(pushedRoutes.single).isA<DialogRoute<void>>();
11381138
await tester.tap(find.byWidget(checkErrorDialog(tester,
11391139
expectedTitle: zulipLocalizations.errorNotificationOpenTitle,
1140-
expectedMessage: zulipLocalizations.errorNotificationOpenAccountMissing)));
1140+
expectedMessage: zulipLocalizations.errorNotificationOpenAccountNotFound)));
11411141
});
11421142

11431143
testWidgets('mismatching account', (tester) async {
@@ -1149,7 +1149,7 @@ void main() {
11491149
check(pushedRoutes.single).isA<DialogRoute<void>>();
11501150
await tester.tap(find.byWidget(checkErrorDialog(tester,
11511151
expectedTitle: zulipLocalizations.errorNotificationOpenTitle,
1152-
expectedMessage: zulipLocalizations.errorNotificationOpenAccountMissing)));
1152+
expectedMessage: zulipLocalizations.errorNotificationOpenAccountNotFound)));
11531153
});
11541154

11551155
testWidgets('find account among several', (tester) async {

0 commit comments

Comments
 (0)