diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index d5741612..17f60520 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -248,10 +248,14 @@ class ContactSyncShortfall { final int received; final int keptLocally; + /// Saved contacts the radio answered "not found" for (#764). + final int confirmedGone; + const ContactSyncShortfall({ required this.declared, required this.received, required this.keptLocally, + this.confirmedGone = 0, }); } @@ -4057,6 +4061,7 @@ class MeshCoreConnector extends ChangeNotifier { declared: declared, received: accounted, keptLocally: kept, + confirmedGone: _recoveryGone.length, ); _contactSyncDecisionPending = true; final message = diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 9eb299ca..fdf9b684 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -3136,7 +3136,7 @@ "@contactSyncShortfallTitle": { "description": "Persistent banner title when the radio sent fewer contacts than it reported (#668)." }, - "contactSyncShortfallBody": "The radio reported {declared} contacts but sent {received}. Your saved contacts were kept.", + "contactSyncShortfallBody": "The radio reported {declared} contacts; after checking again the app has {received}. Your saved contacts were kept.", "@contactSyncShortfallBody": { "description": "Persistent banner body for a short contact sync (#668).", "placeholders": { @@ -3148,7 +3148,7 @@ } } }, - "contactSyncShortfallBodyNoTotal": "The radio did not report how many contacts it holds and sent {received}. Your saved contacts were kept.", + "contactSyncShortfallBodyNoTotal": "The radio did not report how many contacts it holds; after checking again the app has {received}. Your saved contacts were kept.", "@contactSyncShortfallBodyNoTotal": { "description": "Persistent banner body for a contact sync whose total the radio did not report (#668).", "placeholders": { @@ -3161,7 +3161,7 @@ "@contactSyncDecisionTitle": { "description": "Dialog title after the automatic retry of a short contact sync was also short (#668)." }, - "contactSyncDecisionBody": "The radio sent only {received} contacts again. Keep your saved contacts, or use the radio's list? Using the radio's list removes {removed} contacts from this app.", + "contactSyncDecisionBody": "After checking again the app still has only {received} of the radio's contacts. Keep your saved contacts, or use the radio's list? Using the radio's list removes {removed} contacts from this app.", "@contactSyncDecisionBody": { "description": "Dialog body asking whether to keep saved contacts or accept the radio's shorter list (#668).", "placeholders": { @@ -3180,5 +3180,14 @@ "contactSyncUseRadio": "Use the radio's list", "@contactSyncUseRadio": { "description": "Dialog action: replace the saved contacts with the radio's shorter list (#668)." + }, + "contactSyncConfirmedGone": "{count, plural, =1{1 saved contact is no longer on the radio.} other{{count} saved contacts are no longer on the radio.}}", + "@contactSyncConfirmedGone": { + "description": "Extra sentence on the short-sync banner and dialog: saved contacts the radio answered 'not found' for (#764).", + "placeholders": { + "count": { + "type": "int" + } + } } } diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index e56b5319..44ba49de 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -8941,13 +8941,13 @@ abstract class AppLocalizations { /// Persistent banner body for a short contact sync (#668). /// /// In en, this message translates to: - /// **'The radio reported {declared} contacts but sent {received}. Your saved contacts were kept.'** + /// **'The radio reported {declared} contacts; after checking again the app has {received}. Your saved contacts were kept.'** String contactSyncShortfallBody(int declared, int received); /// Persistent banner body for a contact sync whose total the radio did not report (#668). /// /// In en, this message translates to: - /// **'The radio did not report how many contacts it holds and sent {received}. Your saved contacts were kept.'** + /// **'The radio did not report how many contacts it holds; after checking again the app has {received}. Your saved contacts were kept.'** String contactSyncShortfallBodyNoTotal(int received); /// Dialog title after the automatic retry of a short contact sync was also short (#668). @@ -8959,7 +8959,7 @@ abstract class AppLocalizations { /// Dialog body asking whether to keep saved contacts or accept the radio's shorter list (#668). /// /// In en, this message translates to: - /// **'The radio sent only {received} contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes {removed} contacts from this app.'** + /// **'After checking again the app still has only {received} of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes {removed} contacts from this app.'** String contactSyncDecisionBody(int received, int removed); /// Default dialog action: keep the saved contact list after a short sync (#668). @@ -8973,6 +8973,12 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Use the radio\'s list'** String get contactSyncUseRadio; + + /// Extra sentence on the short-sync banner and dialog: saved contacts the radio answered 'not found' for (#764). + /// + /// In en, this message translates to: + /// **'{count, plural, =1{1 saved contact is no longer on the radio.} other{{count} saved contacts are no longer on the radio.}}'** + String contactSyncConfirmedGone(int count); } class _AppLocalizationsDelegate diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index cb9ad8a4..2fd77ebc 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -5268,12 +5268,12 @@ class AppLocalizationsBg extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5281,7 +5281,7 @@ class AppLocalizationsBg extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5289,4 +5289,15 @@ class AppLocalizationsBg extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index f070e591..1f63620c 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -5285,12 +5285,12 @@ class AppLocalizationsDe extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5298,7 +5298,7 @@ class AppLocalizationsDe extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5306,4 +5306,15 @@ class AppLocalizationsDe extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index c22f0706..7ebc75d8 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -5191,12 +5191,12 @@ class AppLocalizationsEn extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5204,7 +5204,7 @@ class AppLocalizationsEn extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5212,4 +5212,15 @@ class AppLocalizationsEn extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index e84eed0d..0d527d9f 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -5273,12 +5273,12 @@ class AppLocalizationsEs extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5286,7 +5286,7 @@ class AppLocalizationsEs extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5294,4 +5294,15 @@ class AppLocalizationsEs extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 798b877f..d1cf3027 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -5301,12 +5301,12 @@ class AppLocalizationsFr extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5314,7 +5314,7 @@ class AppLocalizationsFr extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5322,4 +5322,15 @@ class AppLocalizationsFr extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index 3e5c22b3..a516594c 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -5290,12 +5290,12 @@ class AppLocalizationsHu extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5303,7 +5303,7 @@ class AppLocalizationsHu extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5311,4 +5311,15 @@ class AppLocalizationsHu extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 5a7cf985..de89e16b 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -5278,12 +5278,12 @@ class AppLocalizationsIt extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5291,7 +5291,7 @@ class AppLocalizationsIt extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5299,4 +5299,15 @@ class AppLocalizationsIt extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index 95326b27..b8362371 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -5044,12 +5044,12 @@ class AppLocalizationsJa extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5057,7 +5057,7 @@ class AppLocalizationsJa extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5065,4 +5065,15 @@ class AppLocalizationsJa extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index adcf7492..1de3d95f 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -5045,12 +5045,12 @@ class AppLocalizationsKo extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5058,7 +5058,7 @@ class AppLocalizationsKo extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5066,4 +5066,15 @@ class AppLocalizationsKo extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index e854d1f7..da8decb5 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -5253,12 +5253,12 @@ class AppLocalizationsNl extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5266,7 +5266,7 @@ class AppLocalizationsNl extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5274,4 +5274,15 @@ class AppLocalizationsNl extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index 9aedb9b5..e5e4f026 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -5290,12 +5290,12 @@ class AppLocalizationsPl extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5303,7 +5303,7 @@ class AppLocalizationsPl extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5311,4 +5311,15 @@ class AppLocalizationsPl extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index c497f3f9..d4b996fe 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -5266,12 +5266,12 @@ class AppLocalizationsPt extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5279,7 +5279,7 @@ class AppLocalizationsPt extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5287,4 +5287,15 @@ class AppLocalizationsPt extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index 34d9e036..09fe6091 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -5284,12 +5284,12 @@ class AppLocalizationsRu extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5297,7 +5297,7 @@ class AppLocalizationsRu extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5305,4 +5305,15 @@ class AppLocalizationsRu extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index 997e971a..b6f39379 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -5250,12 +5250,12 @@ class AppLocalizationsSk extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5263,7 +5263,7 @@ class AppLocalizationsSk extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5271,4 +5271,15 @@ class AppLocalizationsSk extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index 19431a54..e6703edb 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -5248,12 +5248,12 @@ class AppLocalizationsSl extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5261,7 +5261,7 @@ class AppLocalizationsSl extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5269,4 +5269,15 @@ class AppLocalizationsSl extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index 78353fd2..6496c2c5 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -5223,12 +5223,12 @@ class AppLocalizationsSv extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5236,7 +5236,7 @@ class AppLocalizationsSv extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5244,4 +5244,15 @@ class AppLocalizationsSv extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index 4c785841..ed5534da 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -5285,12 +5285,12 @@ class AppLocalizationsUk extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -5298,7 +5298,7 @@ class AppLocalizationsUk extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -5306,4 +5306,15 @@ class AppLocalizationsUk extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index 4f49a26a..939a329a 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -4918,12 +4918,12 @@ class AppLocalizationsZh extends AppLocalizations { @override String contactSyncShortfallBody(int declared, int received) { - return 'The radio reported $declared contacts but sent $received. Your saved contacts were kept.'; + return 'The radio reported $declared contacts; after checking again the app has $received. Your saved contacts were kept.'; } @override String contactSyncShortfallBodyNoTotal(int received) { - return 'The radio did not report how many contacts it holds and sent $received. Your saved contacts were kept.'; + return 'The radio did not report how many contacts it holds; after checking again the app has $received. Your saved contacts were kept.'; } @override @@ -4931,7 +4931,7 @@ class AppLocalizationsZh extends AppLocalizations { @override String contactSyncDecisionBody(int received, int removed) { - return 'The radio sent only $received contacts again. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; + return 'After checking again the app still has only $received of the radio\'s contacts. Keep your saved contacts, or use the radio\'s list? Using the radio\'s list removes $removed contacts from this app.'; } @override @@ -4939,4 +4939,15 @@ class AppLocalizationsZh extends AppLocalizations { @override String get contactSyncUseRadio => 'Use the radio\'s list'; + + @override + String contactSyncConfirmedGone(int count) { + String _temp0 = intl.Intl.pluralLogic( + count, + locale: localeName, + other: '$count saved contacts are no longer on the radio.', + one: '1 saved contact is no longer on the radio.', + ); + return '$_temp0'; + } } diff --git a/lib/widgets/contact_sync_shortfall_banner.dart b/lib/widgets/contact_sync_shortfall_banner.dart index 5deb5958..5b3a0110 100644 --- a/lib/widgets/contact_sync_shortfall_banner.dart +++ b/lib/widgets/contact_sync_shortfall_banner.dart @@ -4,9 +4,10 @@ import '../connector/meshcore_connector.dart'; import '../l10n/l10n.dart'; /// Shown above the whole app when a full contact sync delivered fewer contacts -/// than the radio reported (#668). The banner stays until dismissed. When the -/// automatic retry was also short, a modal asks whether to keep the saved -/// contacts (the default) or accept the radio's shorter list. +/// than the radio reported (#668), after the forced resync (#703) has tried +/// and is still short. The banner stays until dismissed, and a modal asks +/// whether to keep the saved contacts (the default) or accept the radio's +/// shorter list. /// /// SAFELANE ยง6: the short sync that silently replaced 350 saved contacts with /// 106 (#660) must now be loud. Sits in `MaterialApp.builder`, above the @@ -50,18 +51,31 @@ class ContactSyncShortfallBanner extends StatelessWidget { children: [ content, const ModalBarrier(dismissible: false, color: Colors.black54), - Center(child: _decision(context, current?.received ?? 0)), + Center( + child: _decision( + context, + current?.received ?? 0, + current?.confirmedGone ?? 0, + ), + ), ], ); } + static String _withGone(String text, int gone, BuildContext context) => + gone > 0 ? '$text ${context.l10n.contactSyncConfirmedGone(gone)}' : text; + Widget _banner(BuildContext context, ContactSyncShortfall current) { final l10n = context.l10n; final scheme = Theme.of(context).colorScheme; final declared = current.declared; - final body = declared == null - ? l10n.contactSyncShortfallBodyNoTotal(current.received) - : l10n.contactSyncShortfallBody(declared, current.received); + final body = _withGone( + declared == null + ? l10n.contactSyncShortfallBodyNoTotal(current.received) + : l10n.contactSyncShortfallBody(declared, current.received), + current.confirmedGone, + context, + ); return Material( color: scheme.errorContainer, child: SafeArea( @@ -109,11 +123,17 @@ class ContactSyncShortfallBanner extends StatelessWidget { ); } - Widget _decision(BuildContext context, int received) { + Widget _decision(BuildContext context, int received, int gone) { final l10n = context.l10n; return AlertDialog( title: Text(l10n.contactSyncDecisionTitle), - content: Text(l10n.contactSyncDecisionBody(received, undeliveredCount)), + content: Text( + _withGone( + l10n.contactSyncDecisionBody(received, undeliveredCount), + gone, + context, + ), + ), actions: [ TextButton( onPressed: onUseRadio, diff --git a/test/widgets/contact_sync_shortfall_banner_test.dart b/test/widgets/contact_sync_shortfall_banner_test.dart index ddf747b6..bade02a7 100644 --- a/test/widgets/contact_sync_shortfall_banner_test.dart +++ b/test/widgets/contact_sync_shortfall_banner_test.dart @@ -53,13 +53,77 @@ void main() { expect(find.text('Contact sync incomplete'), findsOneWidget); expect( - find.textContaining('reported 350 contacts but sent 106'), + find.textContaining( + 'reported 350 contacts; after checking again the app has 106', + ), findsOneWidget, ); expect(find.text('APP'), findsOneWidget); expect(find.byType(AlertDialog), findsNothing); }); + // #764: contacts the radio answered "not found" for are named, and only + // when there are any. + group('confirmed gone', () { + const withGone = ContactSyncShortfall( + declared: 350, + received: 340, + keptLocally: 10, + confirmedGone: 4, + ); + + testWidgets('banner names them when there are some', (tester) async { + await tester.pumpWidget(build(shortfall: withGone)); + + expect( + find.textContaining('4 saved contacts are no longer on the radio.'), + findsOneWidget, + ); + }); + + testWidgets('one reads in the singular', (tester) async { + await tester.pumpWidget( + build( + shortfall: const ContactSyncShortfall( + declared: 350, + received: 349, + keptLocally: 1, + confirmedGone: 1, + ), + ), + ); + + expect( + find.textContaining('1 saved contact is no longer on the radio.'), + findsOneWidget, + ); + }); + + testWidgets('banner says nothing about it when there are none', ( + tester, + ) async { + await tester.pumpWidget(build(shortfall: short)); + + expect(find.textContaining('no longer on the radio'), findsNothing); + }); + + testWidgets('the decision dialog names them too', (tester) async { + await tester.pumpWidget( + build(shortfall: withGone, decisionPending: true, undelivered: 10), + ); + + expect( + find.descendant( + of: find.byType(AlertDialog), + matching: find.textContaining( + '4 saved contacts are no longer on the radio.', + ), + ), + findsOneWidget, + ); + }); + }); + testWidgets('no declared total uses its own wording', (tester) async { await tester.pumpWidget( build( diff --git a/untranslated.json b/untranslated.json index c16582f6..33eda239 100644 --- a/untranslated.json +++ b/untranslated.json @@ -230,7 +230,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "de": [ @@ -464,7 +465,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "es": [ @@ -698,7 +700,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "fr": [ @@ -932,7 +935,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "hu": [ @@ -1166,7 +1170,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "it": [ @@ -1400,7 +1405,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "ja": [ @@ -1634,7 +1640,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "ko": [ @@ -1868,7 +1875,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "nl": [ @@ -2102,7 +2110,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "pl": [ @@ -2336,7 +2345,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "pt": [ @@ -2570,7 +2580,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "ru": [ @@ -2804,7 +2815,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "sk": [ @@ -3038,7 +3050,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "sl": [ @@ -3272,7 +3285,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "sv": [ @@ -3506,7 +3520,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "uk": [ @@ -3740,7 +3755,8 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ], "zh": [ @@ -3974,6 +3990,7 @@ "contactSyncDecisionTitle", "contactSyncDecisionBody", "contactSyncKeep", - "contactSyncUseRadio" + "contactSyncUseRadio", + "contactSyncConfirmedGone" ] }