From aae2bf6d6062020bb14bc251a4ed2db2f33e9e12 Mon Sep 17 00:00:00 2001 From: ericz Date: Sun, 8 Nov 2026 00:40:23 +0100 Subject: [PATCH] Backup&Restore --- documentation/README.md | 2 +- documentation/settings.md | 16 +- lib/connector/meshcore_connector.dart | 30 + lib/connector/meshcore_protocol.dart | 14 + lib/connector/pending_command_replies.dart | 16 + lib/l10n/app_en.arb | 35 ++ lib/l10n/app_localizations.dart | 180 ++++++ lib/l10n/app_localizations_bg.dart | 103 ++++ lib/l10n/app_localizations_de.dart | 103 ++++ lib/l10n/app_localizations_en.dart | 103 ++++ lib/l10n/app_localizations_es.dart | 103 ++++ lib/l10n/app_localizations_fr.dart | 103 ++++ lib/l10n/app_localizations_hu.dart | 103 ++++ lib/l10n/app_localizations_it.dart | 103 ++++ lib/l10n/app_localizations_ja.dart | 103 ++++ lib/l10n/app_localizations_ko.dart | 103 ++++ lib/l10n/app_localizations_nl.dart | 103 ++++ lib/l10n/app_localizations_pl.dart | 103 ++++ lib/l10n/app_localizations_pt.dart | 103 ++++ lib/l10n/app_localizations_ru.dart | 103 ++++ lib/l10n/app_localizations_sk.dart | 103 ++++ lib/l10n/app_localizations_sl.dart | 103 ++++ lib/l10n/app_localizations_sv.dart | 103 ++++ lib/l10n/app_localizations_uk.dart | 103 ++++ lib/l10n/app_localizations_zh.dart | 103 ++++ lib/screens/settings_screen.dart | 144 +---- .../meshcore_protocol_strings_test.dart | 20 + .../pending_command_replies_test.dart | 15 + untranslated.json | 563 +++++++++++++++++- 29 files changed, 2769 insertions(+), 120 deletions(-) diff --git a/documentation/README.md b/documentation/README.md index 683894b9..1cb54c80 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -17,7 +17,7 @@ MeshCore Open is an open-source Flutter client for MeshCore LoRa mesh networking 4. [Chat & Messaging](chat-and-messaging.md) - Direct messages, location sharing, message status, reactions, and retries 5. [Channels](channels.md) - Broadcast channels, communities, channel chat, and auto-resend 6. [Map & Location](map-and-location.md) - Node map, shared pins, path tracing, line-of-sight, and offline caching -7. [Settings](settings.md) - Device settings, app settings, radio configuration, and exports +7. [Settings](settings.md) - Device settings, app settings, radio configuration, backup/restore, and exports 8. [Notifications](notifications.md) - System notifications, replies from watches and Android Auto, unread badges, and notification preferences 9. [Repeater Management](repeater-management.md) - Repeater hub, status, CLI, telemetry, and neighbors 10. [Additional Features](additional-features.md) - GIF picker, localization, debug logs, SMAZ compression, and more diff --git a/documentation/settings.md b/documentation/settings.md index 76fc4f9e..406663c2 100644 --- a/documentation/settings.md +++ b/documentation/settings.md @@ -16,7 +16,7 @@ The settings screen is a scrollable list of cards: 3. [Location](#location) 4. [App Settings](#app-settings) (link to sub-screen) 5. [Actions](#actions) -6. [Export](#export) +6. [Backup & Restore and Export](#export) 7. [Debug](#debug) 8. [About](#about) @@ -206,7 +206,19 @@ One-tap device operations: --- -## Export +## Backup & Restore and Export + +The settings card links to **Backup & Restore** and **Export** subpages. + +### Backup & Restore + +Choose which information to include or restore: node name, identity, radio settings and regions; location, contact and privacy settings; app preferences; contacts and their filters and settings, groups, direct-message and route history; discovered contacts; and channels, filters, communities, settings and history. A radio connection is required to back up or restore radio settings and contact or channel lists. Contact and channel lists are restored to the connected radio; message history and groups are restored in the app. + +Node Settings includes the radio's identity and private key. Some radio firmware does not allow identity backup or restore; the app will let you know if this feature is unavailable. Restoring Node Settings replaces the connected radio's identity after confirmation. + +A password protects the backup file. Leave the password blank to create an unprotected file. Backups may contain your radio's private key, channel keys, messages and saved passwords, so store them carefully. Downloaded models, received image files and cached map tiles are not included. + +### GPX Export Three GPX export options (not available on web): diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 0b8ff9f8..f2f3a132 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -4334,6 +4334,36 @@ class MeshCoreConnector extends ChangeNotifier { } catch (_) {} } + Future exportPrivateKey() async { + if (!isConnected) throw StateError('Not connected to a MeshCore device'); + final response = Completer(); + final subscription = receivedFrames.listen((frame) { + if (frame.isNotEmpty && + frame[0] == respCodePrivateKey && + !response.isCompleted) { + response.complete(Uint8List.fromList(frame)); + } + }); + try { + await sendFrame(buildExportPrivateKeyFrame(), waitForGenericAck: true); + final frame = await response.future.timeout(const Duration(seconds: 1)); + if (frame.length != 65) { + throw FormatException('Firmware returned an invalid private-key frame'); + } + return Uint8List.fromList(frame.sublist(1)); + } finally { + await subscription.cancel(); + } + } + + Future importPrivateKey(Uint8List keyData) async { + if (!isConnected) throw StateError('Not connected to a MeshCore device'); + await sendFrame( + buildImportPrivateKeyFrame(keyData), + waitForGenericAck: true, + ); + } + /// Sends CMD_SET_RADIO_PARAMS (same arguments as [buildSetRadioParamsFrame]) /// and waits for the reply. Returns false when the firmware rejects it with /// ERR_ILLEGAL_ARG (values out of range, or [clientRepeat] on a frequency diff --git a/lib/connector/meshcore_protocol.dart b/lib/connector/meshcore_protocol.dart index 22476f63..9f14c789 100644 --- a/lib/connector/meshcore_protocol.dart +++ b/lib/connector/meshcore_protocol.dart @@ -195,6 +195,8 @@ const int cmdImportContact = 18; const int cmdReboot = 19; const int cmdGetBattAndStorage = 20; const int cmdDeviceQuery = 22; +const int cmdExportPrivateKey = 23; +const int cmdImportPrivateKey = 24; const int cmdSendLogin = 26; const int cmdSendStatusReq = 27; const int cmdGetContactByKey = 30; @@ -259,6 +261,8 @@ const int respCodeNoMoreMessages = 10; const int respCodeExportContact = 11; const int respCodeBattAndStorage = 12; const int respCodeDeviceInfo = 13; +const int respCodePrivateKey = 14; +const int respCodeDisabled = 15; const int respCodeContactMsgRecvV3 = 16; const int respCodeChannelMsgRecvV3 = 17; const int respCodeChannelInfo = 18; @@ -1087,6 +1091,16 @@ Uint8List buildTraceReq(int tag, int auth, int flag, {Uint8List? payload}) { return writer.toBytes(); } +Uint8List buildExportPrivateKeyFrame() => + Uint8List.fromList([cmdExportPrivateKey]); + +Uint8List buildImportPrivateKeyFrame(Uint8List keyData) { + if (keyData.length != 64) { + throw ArgumentError.value(keyData.length, 'keyData.length', 'must be 64'); + } + return Uint8List.fromList([cmdImportPrivateKey, ...keyData]); +} + // Build a export contact frame // [cmd][pub_key x32 / if empty exports your contact info] Uint8List buildExportContactFrame(Uint8List pubKey) { diff --git a/lib/connector/pending_command_replies.dart b/lib/connector/pending_command_replies.dart index 094846e2..7a11a519 100644 --- a/lib/connector/pending_command_replies.dart +++ b/lib/connector/pending_command_replies.dart @@ -63,6 +63,7 @@ int? replyCodeForCommand(Uint8List data) { case cmdRemoveContact: case cmdShareContact: case cmdImportContact: + case cmdImportPrivateKey: case cmdSetChannel: case cmdSetOtherParams: case cmdSetCustomVar: @@ -95,6 +96,8 @@ int? replyCodeForCommand(Uint8List data) { return respCodeCurrTime; case cmdExportContact: return respCodeExportContact; + case cmdExportPrivateKey: + return respCodePrivateKey; case cmdGetBattAndStorage: return respCodeBattAndStorage; case cmdGetChannel: @@ -180,6 +183,19 @@ class PendingCommandReplies { if (frame.isEmpty) return false; _pruneStale(); final code = frame[0]; + if (code == respCodeDisabled) { + final index = _queue.indexWhere( + (pending) => + pending.commandCode == cmdExportPrivateKey || + pending.commandCode == cmdImportPrivateKey, + ); + if (index < 0) return false; + final pending = _queue.removeAt(index); + pending.completer?.completeError( + UnsupportedError('Private-key transfer is disabled by firmware'), + ); + return true; + } if (code == respCodeOk || code == respCodeErr) return false; final key = code == respCodeContact && frame.length >= 1 + pubKeySize ? frame.sublist(1, 1 + pubKeySize) diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 0d4cbf92..f69db281 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -190,6 +190,41 @@ "settings_deviceInfo": "Device Info", "settings_appSettings": "App Settings", "settings_appSettingsSubtitle": "Notifications, messaging, and map preferences", + "settings_export": "Export", + "settings_exportSubtitle": "Export contacts and repeaters as GPX", + "backupRestore_title": "Backup & Restore", + "backupRestore_subtitle": "Save or restore app data and radio settings", + "backupRestore_import": "Import", + "backupRestore_selectImportFile": "Import File", + "backupRestore_password": "Password (optional)", + "backupRestore_passwordHelp": "A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.", + "backupRestore_items": "Backup and restore items", + "backupRestore_nodeSettings": "Node Settings", + "backupRestore_nodeSettingsDescription": "Device name, private and public keys, radio settings, and regions", + "backupRestore_locationSettings": "Location Settings", + "backupRestore_locationSettingsDescription": "Location, contact settings, and privacy settings", + "backupRestore_appSettings": "App Settings", + "backupRestore_appSettingsDescription": "App preferences and appearance settings", + "backupRestore_contacts": "Contacts", + "backupRestore_contactsDescription": "Contacts, per-contact filters and settings, groups, and message history", + "backupRestore_discoveredContacts": "Discovered Contacts", + "backupRestore_discoveredContactsDescription": "Discovered contacts and their saved details", + "backupRestore_channels": "Channels", + "backupRestore_channelsDescription": "Channels, channel filters, communities, and message history", + "backupRestore_backup": "Create Backup", + "backupRestore_restore": "Restore Selected", + "backupRestore_backupComplete": "Backup file created.", + "backupRestore_restoreComplete": "Restore complete. Reconnect the radio to refresh its data.", + "backupRestore_failed": "Backup operation failed: {error}", + "@backupRestore_failed": { + "placeholders": { + "error": {"type": "String"} + } + }, + "backupRestore_fileTooLarge": "Backup file is larger than the 100 MB limit.", + "backupRestore_selectAtLeastOne": "Select at least one item.", + "backupRestore_replaceIdentityTitle": "Replace radio identity?", + "backupRestore_replaceIdentityMessage": "Restoring Node Settings replaces the connected radio's private key and changes its identity. Continue only if this is intended.", "settings_nodeSettings": "Node Settings", "settings_nodeName": "Node Name", "settings_nodeNameNotSet": "Not set", diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 9f3e8f9f..4b7b8e08 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -814,6 +814,186 @@ abstract class AppLocalizations { /// **'Notifications, messaging, and map preferences'** String get settings_appSettingsSubtitle; + /// No description provided for @settings_export. + /// + /// In en, this message translates to: + /// **'Export'** + String get settings_export; + + /// No description provided for @settings_exportSubtitle. + /// + /// In en, this message translates to: + /// **'Export contacts and repeaters as GPX'** + String get settings_exportSubtitle; + + /// No description provided for @backupRestore_title. + /// + /// In en, this message translates to: + /// **'Backup & Restore'** + String get backupRestore_title; + + /// No description provided for @backupRestore_subtitle. + /// + /// In en, this message translates to: + /// **'Save or restore app data and radio settings'** + String get backupRestore_subtitle; + + /// No description provided for @backupRestore_import. + /// + /// In en, this message translates to: + /// **'Import'** + String get backupRestore_import; + + /// No description provided for @backupRestore_selectImportFile. + /// + /// In en, this message translates to: + /// **'Import File'** + String get backupRestore_selectImportFile; + + /// No description provided for @backupRestore_password. + /// + /// In en, this message translates to: + /// **'Password (optional)'** + String get backupRestore_password; + + /// No description provided for @backupRestore_passwordHelp. + /// + /// In en, this message translates to: + /// **'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'** + String get backupRestore_passwordHelp; + + /// No description provided for @backupRestore_items. + /// + /// In en, this message translates to: + /// **'Backup and restore items'** + String get backupRestore_items; + + /// No description provided for @backupRestore_nodeSettings. + /// + /// In en, this message translates to: + /// **'Node Settings'** + String get backupRestore_nodeSettings; + + /// No description provided for @backupRestore_nodeSettingsDescription. + /// + /// In en, this message translates to: + /// **'Device name, private and public keys, radio settings, and regions'** + String get backupRestore_nodeSettingsDescription; + + /// No description provided for @backupRestore_locationSettings. + /// + /// In en, this message translates to: + /// **'Location Settings'** + String get backupRestore_locationSettings; + + /// No description provided for @backupRestore_locationSettingsDescription. + /// + /// In en, this message translates to: + /// **'Location, contact settings, and privacy settings'** + String get backupRestore_locationSettingsDescription; + + /// No description provided for @backupRestore_appSettings. + /// + /// In en, this message translates to: + /// **'App Settings'** + String get backupRestore_appSettings; + + /// No description provided for @backupRestore_appSettingsDescription. + /// + /// In en, this message translates to: + /// **'App preferences and appearance settings'** + String get backupRestore_appSettingsDescription; + + /// No description provided for @backupRestore_contacts. + /// + /// In en, this message translates to: + /// **'Contacts'** + String get backupRestore_contacts; + + /// No description provided for @backupRestore_contactsDescription. + /// + /// In en, this message translates to: + /// **'Contacts, per-contact filters and settings, groups, and message history'** + String get backupRestore_contactsDescription; + + /// No description provided for @backupRestore_discoveredContacts. + /// + /// In en, this message translates to: + /// **'Discovered Contacts'** + String get backupRestore_discoveredContacts; + + /// No description provided for @backupRestore_discoveredContactsDescription. + /// + /// In en, this message translates to: + /// **'Discovered contacts and their saved details'** + String get backupRestore_discoveredContactsDescription; + + /// No description provided for @backupRestore_channels. + /// + /// In en, this message translates to: + /// **'Channels'** + String get backupRestore_channels; + + /// No description provided for @backupRestore_channelsDescription. + /// + /// In en, this message translates to: + /// **'Channels, channel filters, communities, and message history'** + String get backupRestore_channelsDescription; + + /// No description provided for @backupRestore_backup. + /// + /// In en, this message translates to: + /// **'Create Backup'** + String get backupRestore_backup; + + /// No description provided for @backupRestore_restore. + /// + /// In en, this message translates to: + /// **'Restore Selected'** + String get backupRestore_restore; + + /// No description provided for @backupRestore_backupComplete. + /// + /// In en, this message translates to: + /// **'Backup file created.'** + String get backupRestore_backupComplete; + + /// No description provided for @backupRestore_restoreComplete. + /// + /// In en, this message translates to: + /// **'Restore complete. Reconnect the radio to refresh its data.'** + String get backupRestore_restoreComplete; + + /// No description provided for @backupRestore_failed. + /// + /// In en, this message translates to: + /// **'Backup operation failed: {error}'** + String backupRestore_failed(String error); + + /// No description provided for @backupRestore_fileTooLarge. + /// + /// In en, this message translates to: + /// **'Backup file is larger than the 100 MB limit.'** + String get backupRestore_fileTooLarge; + + /// No description provided for @backupRestore_selectAtLeastOne. + /// + /// In en, this message translates to: + /// **'Select at least one item.'** + String get backupRestore_selectAtLeastOne; + + /// No description provided for @backupRestore_replaceIdentityTitle. + /// + /// In en, this message translates to: + /// **'Replace radio identity?'** + String get backupRestore_replaceIdentityTitle; + + /// No description provided for @backupRestore_replaceIdentityMessage. + /// + /// In en, this message translates to: + /// **'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'** + String get backupRestore_replaceIdentityMessage; + /// No description provided for @settings_nodeSettings. /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index 435c6fdf..1c6f29f0 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -399,6 +399,109 @@ class AppLocalizationsBg extends AppLocalizations { String get settings_appSettingsSubtitle => 'Уведомления, съобщения и предпочитания за карта'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Настройки на възела'; diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index c0a36e3d..93d4740c 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -402,6 +402,109 @@ class AppLocalizationsDe extends AppLocalizations { String get settings_appSettingsSubtitle => 'Benachrichtigungen, Nachrichten und Karten-Einstellungen'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Knoteneinstellungen'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 8ff30407..398c66dc 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -395,6 +395,109 @@ class AppLocalizationsEn extends AppLocalizations { String get settings_appSettingsSubtitle => 'Notifications, messaging, and map preferences'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Node Settings'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index ed0cdfb7..a6762562 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -400,6 +400,109 @@ class AppLocalizationsEs extends AppLocalizations { String get settings_appSettingsSubtitle => 'Notificaciones, mensajes y preferencias de mapa'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Configuración del Nodo'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index a8fcec54..06b802f3 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -402,6 +402,109 @@ class AppLocalizationsFr extends AppLocalizations { String get settings_appSettingsSubtitle => 'Notifications, messagerie et préférences de carte'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Paramètres du nœud'; diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index c5fbbbaa..c05ff030 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -398,6 +398,109 @@ class AppLocalizationsHu extends AppLocalizations { String get settings_appSettingsSubtitle => 'Értesítések, üzenetküldés és térképbeállítások'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Csomópont beállításai'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 31cf6cbb..5c712f66 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -402,6 +402,109 @@ class AppLocalizationsIt extends AppLocalizations { String get settings_appSettingsSubtitle => 'Notifiche, messaggi e preferenze della mappa'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Impostazioni Nodo'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index e2d696c2..676b9c1b 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -383,6 +383,109 @@ class AppLocalizationsJa extends AppLocalizations { @override String get settings_appSettingsSubtitle => '通知、メッセージング、および地図の表示設定'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'ノード設定'; diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 0a347c7a..a1f61083 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -383,6 +383,109 @@ class AppLocalizationsKo extends AppLocalizations { @override String get settings_appSettingsSubtitle => '알림, 메시징, 지도 설정'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => '노드 설정'; diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index b0c52ee1..2eb8d6d2 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -398,6 +398,109 @@ class AppLocalizationsNl extends AppLocalizations { String get settings_appSettingsSubtitle => 'Notificaties, berichten en kaartinstellingen'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Node Instellingen'; diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index 1784cfb4..43790915 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -405,6 +405,109 @@ class AppLocalizationsPl extends AppLocalizations { String get settings_appSettingsSubtitle => 'Powiadomienia, wiadomości i preferencje mapy'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Ustawienia węzła'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index e9ccc7c7..2a70fb29 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -401,6 +401,109 @@ class AppLocalizationsPt extends AppLocalizations { String get settings_appSettingsSubtitle => 'Notificações, mensagens e preferências de mapa'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Configurações do Nó'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index b00cc8fc..224d80a0 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -401,6 +401,109 @@ class AppLocalizationsRu extends AppLocalizations { String get settings_appSettingsSubtitle => 'Уведомления, сообщения и настройки карты'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Настройки ноды'; diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index 751efb15..f52aab24 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -401,6 +401,109 @@ class AppLocalizationsSk extends AppLocalizations { String get settings_appSettingsSubtitle => 'Upozornenia, správy a nastavenia mapy'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Nastavenia uzla'; diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index 71ddd940..5fdc42f9 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -400,6 +400,109 @@ class AppLocalizationsSl extends AppLocalizations { String get settings_appSettingsSubtitle => 'Obveščanja, sporoščanje in zemljevidi.'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Nastavitev časa'; diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index 4a4bc187..4723c8f2 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -396,6 +396,109 @@ class AppLocalizationsSv extends AppLocalizations { String get settings_appSettingsSubtitle => 'Notifieringar, meddelanden och kartinställningar'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Nodinställningar'; diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index b9a6c535..8c15697e 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -400,6 +400,109 @@ class AppLocalizationsUk extends AppLocalizations { String get settings_appSettingsSubtitle => 'Сповіщення, повідомлення та налаштування карти'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => 'Налаштування вузла'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index ef525c93..6e95a003 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -377,6 +377,109 @@ class AppLocalizationsZh extends AppLocalizations { @override String get settings_appSettingsSubtitle => '通知、消息和地图偏好'; + @override + String get settings_export => 'Export'; + + @override + String get settings_exportSubtitle => 'Export contacts and repeaters as GPX'; + + @override + String get backupRestore_title => 'Backup & Restore'; + + @override + String get backupRestore_subtitle => + 'Save or restore app data and radio settings'; + + @override + String get backupRestore_import => 'Import'; + + @override + String get backupRestore_selectImportFile => 'Import File'; + + @override + String get backupRestore_password => 'Password (optional)'; + + @override + String get backupRestore_passwordHelp => + 'A password encrypts the file. Blank saves plaintext that may include private/channel keys, history, and credentials.'; + + @override + String get backupRestore_items => 'Backup and restore items'; + + @override + String get backupRestore_nodeSettings => 'Node Settings'; + + @override + String get backupRestore_nodeSettingsDescription => + 'Device name, private and public keys, radio settings, and regions'; + + @override + String get backupRestore_locationSettings => 'Location Settings'; + + @override + String get backupRestore_locationSettingsDescription => + 'Location, contact settings, and privacy settings'; + + @override + String get backupRestore_appSettings => 'App Settings'; + + @override + String get backupRestore_appSettingsDescription => + 'App preferences and appearance settings'; + + @override + String get backupRestore_contacts => 'Contacts'; + + @override + String get backupRestore_contactsDescription => + 'Contacts, per-contact filters and settings, groups, and message history'; + + @override + String get backupRestore_discoveredContacts => 'Discovered Contacts'; + + @override + String get backupRestore_discoveredContactsDescription => + 'Discovered contacts and their saved details'; + + @override + String get backupRestore_channels => 'Channels'; + + @override + String get backupRestore_channelsDescription => + 'Channels, channel filters, communities, and message history'; + + @override + String get backupRestore_backup => 'Create Backup'; + + @override + String get backupRestore_restore => 'Restore Selected'; + + @override + String get backupRestore_backupComplete => 'Backup file created.'; + + @override + String get backupRestore_restoreComplete => + 'Restore complete. Reconnect the radio to refresh its data.'; + + @override + String backupRestore_failed(String error) { + return 'Backup operation failed: $error'; + } + + @override + String get backupRestore_fileTooLarge => + 'Backup file is larger than the 100 MB limit.'; + + @override + String get backupRestore_selectAtLeastOne => 'Select at least one item.'; + + @override + String get backupRestore_replaceIdentityTitle => 'Replace radio identity?'; + + @override + String get backupRestore_replaceIdentityMessage => + 'Restoring Node Settings replaces the connected radio\'s private key and changes its identity. Continue only if this is intended.'; + @override String get settings_nodeSettings => '节点设置'; diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index adcd9919..733038eb 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:meshcore_open/utils/gpx_export.dart'; import 'package:meshcore_open/widgets/elements_ui.dart'; import 'package:provider/provider.dart'; import 'package:package_info_plus/package_info_plus.dart'; @@ -24,7 +23,8 @@ import '../widgets/radio_stats_entry.dart'; import 'telemetry_screen.dart'; import '../widgets/sync_progress_overlay.dart'; import 'region_management_screen.dart'; -import '../utils/share_origin.dart'; +import 'backup_restore_screen.dart'; +import 'export_screen.dart'; class SettingsScreen extends StatefulWidget { const SettingsScreen({super.key}); @@ -164,13 +164,34 @@ class _SettingsScreenState extends State { ), ), - // EXPORT section - SectionHeader(l10n.settings_gpxExportRepeaters), + // BACKUP AND EXPORT + SectionHeader(l10n.settings_export), MeshCard( padding: EdgeInsets.zero, - child: _buildExportCardContent( - context, - context.read(), + child: Column( + children: [ + MeshNavTile( + icon: Icons.backup_outlined, + title: l10n.backupRestore_title, + subtitle: l10n.backupRestore_subtitle, + onTap: () => Navigator.push( + context, + MaterialPageRoute( + builder: (_) => const BackupRestoreScreen(), + ), + ), + ), + const Divider(height: 1, indent: 16), + MeshNavTile( + icon: Icons.download_outlined, + title: l10n.settings_export, + subtitle: l10n.settings_exportSubtitle, + onTap: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => const ExportScreen()), + ), + ), + ], ), ), @@ -682,70 +703,6 @@ class _SettingsScreenState extends State { ); } - Widget _buildExportCardContent( - BuildContext context, - MeshCoreConnector connector, - ) { - final l10n = context.l10n; - return Column( - children: [ - MeshNavTile( - icon: Icons.download_outlined, - title: l10n.settings_gpxExportRepeaters, - subtitle: l10n.settings_gpxExportRepeatersSubtitle, - onTap: () async { - final exporter = GpxExport(connector); - exporter.addRepeaters(); - _gpxExport( - exporter, - l10n.map_repeater, - l10n.settings_gpxExportRepeatersRoom, - 'meshcore_repeaters_', - l10n.settings_gpxExportShareText, - l10n.settings_gpxExportShareSubject, - ); - }, - ), - const Divider(height: 1, indent: 16), - MeshNavTile( - icon: Icons.download_outlined, - title: l10n.settings_gpxExportContacts, - subtitle: l10n.settings_gpxExportContactsSubtitle, - onTap: () async { - final exporter = GpxExport(connector); - exporter.addContacts(); - _gpxExport( - exporter, - l10n.map_repeater, - l10n.settings_gpxExportChat, - 'meshcore_contacts_', - l10n.settings_gpxExportShareText, - l10n.settings_gpxExportShareSubject, - ); - }, - ), - const Divider(height: 1, indent: 16), - MeshNavTile( - icon: Icons.download_outlined, - title: l10n.settings_gpxExportAll, - subtitle: l10n.settings_gpxExportAllSubtitle, - onTap: () async { - final exporter = GpxExport(connector); - exporter.addAll(); - _gpxExport( - exporter, - l10n.map_repeater, - l10n.settings_gpxExportAllContacts, - 'meshcore_all_', - l10n.settings_gpxExportShareText, - l10n.settings_gpxExportShareSubject, - ); - }, - ), - ], - ); - } - Widget _buildDebugCardContent(BuildContext context) { final l10n = context.l10n; return Column( @@ -1066,51 +1023,6 @@ class _SettingsScreenState extends State { ); } - Future _gpxExport( - GpxExport exporter, - String name, - String description, - String filename, - String shareText, - String subject, - ) async { - final l10n = context.l10n; - final result = await exporter.exportGPX( - name, - description, - filename, - shareText, - subject, - sharePositionOrigin: shareOriginOf(context), - ); - if (!mounted) return; - switch (result) { - case gpxExportSuccess: - showDismissibleSnackBar( - context, - content: Text(l10n.settings_gpxExportSuccess), - ); - case gpxExportNoContacts: - showDismissibleSnackBar( - context, - content: Text(l10n.settings_gpxExportNoContacts), - ); - break; - case gpxExportNotAvailable: - showDismissibleSnackBar( - context, - content: Text(l10n.settings_gpxExportNotAvailable), - ); - break; - case gpxExportFailed: - showDismissibleSnackBar( - context, - content: Text(l10n.settings_gpxExportError), - ); - break; - } - } - void _editAutoAddConfig(BuildContext context, MeshCoreConnector connector) { final l10n = context.l10n; // The dialog's context is gone once it pops; report through the screen. diff --git a/test/connector/meshcore_protocol_strings_test.dart b/test/connector/meshcore_protocol_strings_test.dart index 8219b58e..85d05f76 100644 --- a/test/connector/meshcore_protocol_strings_test.dart +++ b/test/connector/meshcore_protocol_strings_test.dart @@ -38,6 +38,26 @@ void main() { }); }); + group('private-key backup frames', () { + test('uses the firmware command codes and 64-byte identity payload', () { + final keyData = Uint8List.fromList(List.generate(64, (index) => index)); + expect(buildExportPrivateKeyFrame(), [cmdExportPrivateKey]); + final frame = buildImportPrivateKeyFrame(keyData); + expect(frame.length, 65); + expect(frame.first, cmdImportPrivateKey); + expect(frame.sublist(1), keyData); + expect(respCodePrivateKey, 14); + expect(respCodeDisabled, 15); + }); + + test('rejects identity data with the wrong length', () { + expect( + () => buildImportPrivateKeyFrame(Uint8List(63)), + throwsArgumentError, + ); + }); + }); + group('BufferWriter.writeCString', () { test('NUL-terminates and truncates on a character boundary', () { final writer = BufferWriter()..writeCString('#${'ё' * 20}', 32); diff --git a/test/connector/pending_command_replies_test.dart b/test/connector/pending_command_replies_test.dart index b9b116c9..d64eb316 100644 --- a/test/connector/pending_command_replies_test.dart +++ b/test/connector/pending_command_replies_test.dart @@ -51,6 +51,21 @@ void main() { expect(queue.length, 0); }); + test('firmware-disabled private-key transfer fails its waiter', () async { + final queue = newQueue(); + final pending = queue.track( + buildExportPrivateKeyFrame(), + waitForReply: true, + ); + + expect(queue.completeReply(frame([respCodeDisabled])), isTrue); + await expectLater( + pending!.completer!.future, + throwsA(isA()), + ); + expect(queue.length, 0); + }); + test('untracked commands are not enrolled', () { final queue = newQueue(); expect(queue.track(buildSyncNextMessageFrame()), isNull); diff --git a/untranslated.json b/untranslated.json index 9e26dfee..c7b11627 100644 --- a/untranslated.json +++ b/untranslated.json @@ -1 +1,562 @@ -{} \ No newline at end of file +{ + "bg": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "de": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "es": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "fr": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "hu": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "it": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "ja": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "ko": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "nl": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "pl": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "pt": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "ru": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "sk": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "sl": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "sv": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "uk": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ], + + "zh": [ + "settings_export", + "settings_exportSubtitle", + "backupRestore_title", + "backupRestore_subtitle", + "backupRestore_import", + "backupRestore_selectImportFile", + "backupRestore_password", + "backupRestore_passwordHelp", + "backupRestore_items", + "backupRestore_nodeSettings", + "backupRestore_nodeSettingsDescription", + "backupRestore_locationSettings", + "backupRestore_locationSettingsDescription", + "backupRestore_appSettings", + "backupRestore_appSettingsDescription", + "backupRestore_contacts", + "backupRestore_contactsDescription", + "backupRestore_discoveredContacts", + "backupRestore_discoveredContactsDescription", + "backupRestore_channels", + "backupRestore_channelsDescription", + "backupRestore_backup", + "backupRestore_restore", + "backupRestore_backupComplete", + "backupRestore_restoreComplete", + "backupRestore_failed", + "backupRestore_fileTooLarge", + "backupRestore_selectAtLeastOne", + "backupRestore_replaceIdentityTitle", + "backupRestore_replaceIdentityMessage" + ] +}