Add Slovenian localization for trail management and device configuration

- Updated `app_localizations_sl.dart` with new strings for trail management, device information, and error messages.
- Enhanced `app_sl.arb` with corresponding translations for the new strings.
- Refactored `device_config_screen.dart` to utilize localized strings for device information and error handling.
- Modified `map_tab.dart` to remove unused trail stats overlay.
- Improved `ble_response_handler.dart` to include additional debug information for parsed contacts and advertisements.
- Updated `trail_controls.dart` to use localized strings for trail management UI, including trail visibility toggle and confirmation dialogs.
This commit is contained in:
Janez T
2025-10-18 21:35:47 +02:00
parent 00b239ab26
commit da03592980
23 changed files with 14448 additions and 99 deletions

2100
lib/l10n/app_de.arb Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1886,5 +1886,215 @@
"offlineLayers": "Offline Layers",
"@offlineLayers": {
"description": "Section header for offline map layers (MBTiles)"
},
"locationTrail": "Location Trail",
"@locationTrail": {
"description": "Location trail title"
},
"showTrailOnMap": "Show Trail on Map",
"@showTrailOnMap": {
"description": "Toggle to show/hide trail on map"
},
"trailVisible": "Trail is visible on the map",
"@trailVisible": {
"description": "Trail visibility status - visible"
},
"trailHiddenRecording": "Trail is hidden (still recording)",
"@trailHiddenRecording": {
"description": "Trail visibility status - hidden but recording"
},
"distance": "Distance",
"@distance": {
"description": "Distance label"
},
"duration": "Duration",
"@duration": {
"description": "Duration label"
},
"points": "Points",
"@points": {
"description": "Trail points count label"
},
"clearTrail": "Clear Trail",
"@clearTrail": {
"description": "Button to clear location trail"
},
"clearTrailQuestion": "Clear Trail?",
"@clearTrailQuestion": {
"description": "Confirmation dialog title"
},
"clearTrailConfirmation": "Are you sure you want to clear the current location trail? This action cannot be undone.",
"@clearTrailConfirmation": {
"description": "Confirmation dialog message"
},
"noTrailRecorded": "No trail recorded yet",
"@noTrailRecorded": {
"description": "Message when no trail exists"
},
"startTrackingToRecord": "Start location tracking to record your trail",
"@startTrackingToRecord": {
"description": "Instructions to start trail recording"
},
"trailControls": "Trail Controls",
"@trailControls": {
"description": "Trail controls tooltip"
},
"deviceInformation": "Device Information",
"@deviceInformation": {
"description": "Device information section header"
},
"bleName": "BLE Name",
"@bleName": {
"description": "Bluetooth Low Energy device name label"
},
"meshName": "Mesh Name",
"@meshName": {
"description": "Mesh network name label"
},
"notSet": "Not set",
"@notSet": {
"description": "Label when a value is not set"
},
"model": "Model",
"@model": {
"description": "Device model label"
},
"version": "Version",
"@version": {
"description": "Version label"
},
"buildDate": "Build Date",
"@buildDate": {
"description": "Firmware build date label"
},
"firmware": "Firmware",
"@firmware": {
"description": "Firmware label"
},
"maxContacts": "Max Contacts",
"@maxContacts": {
"description": "Maximum contacts capacity label"
},
"maxChannels": "Max Channels",
"@maxChannels": {
"description": "Maximum channels capacity label"
},
"publicInfo": "Public Info",
"@publicInfo": {
"description": "Public information section header"
},
"meshNetworkName": "Mesh Network Name",
"@meshNetworkName": {
"description": "Mesh network name field label"
},
"nameBroadcastInMesh": "Name broadcast in mesh advertisements",
"@nameBroadcastInMesh": {
"description": "Helper text for mesh network name field"
},
"telemetryAndLocationSharing": "Telemetry & Location Sharing",
"@telemetryAndLocationSharing": {
"description": "Telemetry and location sharing toggle label"
},
"lat": "Lat",
"@lat": {
"description": "Latitude field label (short form)"
},
"lon": "Lon",
"@lon": {
"description": "Longitude field label (short form)"
},
"useCurrentLocation": "Use current location",
"@useCurrentLocation": {
"description": "Tooltip for use current location button"
},
"noneUnknown": "None/Unknown",
"@noneUnknown": {
"description": "Device type: none or unknown"
},
"chatNode": "Chat Node",
"@chatNode": {
"description": "Device type: chat node"
},
"repeater": "Repeater",
"@repeater": {
"description": "Device type: repeater"
},
"roomChannel": "Room/Channel",
"@roomChannel": {
"description": "Device type: room or channel"
},
"typeNumber": "Type {number}",
"@typeNumber": {
"description": "Generic device type with number",
"placeholders": {
"number": {
"type": "int"
}
}
},
"copiedToClipboardShort": "Copied {label} to clipboard",
"@copiedToClipboardShort": {
"description": "Short success message when copying to clipboard",
"placeholders": {
"label": {
"type": "String"
}
}
},
"failedToSave": "Failed to save: {error}",
"@failedToSave": {
"description": "Generic error message for save failures",
"placeholders": {
"error": {
"type": "String"
}
}
},
"failedToGetLocation": "Failed to get location: {error}",
"@failedToGetLocation": {
"description": "Error message when getting location fails",
"placeholders": {
"error": {
"type": "String"
}
}
}
}

2095
lib/l10n/app_es.arb Normal file

File diff suppressed because it is too large Load Diff

2100
lib/l10n/app_fr.arb Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -632,5 +632,81 @@
"onlineLayers": "Mrežni slojevi",
"offlineLayers": "Offline slojevi"
"offlineLayers": "Offline slojevi",
"locationTrail": "Putanja lokacije",
"showTrailOnMap": "Prikaži putanju na karti",
"trailVisible": "Putanja je vidljiva na karti",
"trailHiddenRecording": "Putanja je skrivena (još se snima)",
"distance": "Udaljenost",
"duration": "Trajanje",
"points": "Točke",
"clearTrail": "Obriši putanju",
"clearTrailQuestion": "Obrisati putanju?",
"clearTrailConfirmation": "Jeste li sigurni da želite obrisati trenutnu putanju lokacije? Ova radnja se ne može poništiti.",
"noTrailRecorded": "Još nije snimljena putanja",
"startTrackingToRecord": "Pokrenite praćenje lokacije za snimanje putanje",
"trailControls": "Upravljanje putanjom",
"deviceInformation": "Informacije o uređaju",
"bleName": "BLE naziv",
"meshName": "Mesh naziv",
"notSet": "Nije postavljeno",
"model": "Model",
"version": "Verzija",
"buildDate": "Datum izgradnje",
"firmware": "Firmware",
"maxContacts": "Maks. kontakata",
"maxChannels": "Maks. kanala",
"publicInfo": "Javne informacije",
"meshNetworkName": "Naziv mesh mreže",
"nameBroadcastInMesh": "Naziv koji se emitira u mesh oglasima",
"telemetryAndLocationSharing": "Telemetrija i dijeljenje lokacije",
"lat": "Šir",
"lon": "Dug",
"useCurrentLocation": "Koristi trenutnu lokaciju",
"noneUnknown": "Nema/Nepoznato",
"chatNode": "Čvorište za razgovor",
"repeater": "Repetitor",
"roomChannel": "Soba/Kanal",
"typeNumber": "Tip {number}",
"copiedToClipboardShort": "Kopirano {label} u međuspremnik",
"failedToSave": "Neuspjelo spremanje: {error}",
"failedToGetLocation": "Neuspjelo dohvaćanje lokacije: {error}"
}

2100
lib/l10n/app_it.arb Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -5,8 +5,12 @@ import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;
import 'app_localizations_de.dart';
import 'app_localizations_en.dart';
import 'app_localizations_es.dart';
import 'app_localizations_fr.dart';
import 'app_localizations_hr.dart';
import 'app_localizations_it.dart';
import 'app_localizations_sl.dart';
// ignore_for_file: type=lint
@@ -95,8 +99,12 @@ abstract class AppLocalizations {
/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[
Locale('de'),
Locale('en'),
Locale('es'),
Locale('fr'),
Locale('hr'),
Locale('it'),
Locale('sl'),
];
@@ -2024,6 +2032,228 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Offline Layers'**
String get offlineLayers;
/// Location trail title
///
/// In en, this message translates to:
/// **'Location Trail'**
String get locationTrail;
/// Toggle to show/hide trail on map
///
/// In en, this message translates to:
/// **'Show Trail on Map'**
String get showTrailOnMap;
/// Trail visibility status - visible
///
/// In en, this message translates to:
/// **'Trail is visible on the map'**
String get trailVisible;
/// Trail visibility status - hidden but recording
///
/// In en, this message translates to:
/// **'Trail is hidden (still recording)'**
String get trailHiddenRecording;
/// Duration label
///
/// In en, this message translates to:
/// **'Duration'**
String get duration;
/// Trail points count label
///
/// In en, this message translates to:
/// **'Points'**
String get points;
/// Button to clear location trail
///
/// In en, this message translates to:
/// **'Clear Trail'**
String get clearTrail;
/// Confirmation dialog title
///
/// In en, this message translates to:
/// **'Clear Trail?'**
String get clearTrailQuestion;
/// Confirmation dialog message
///
/// In en, this message translates to:
/// **'Are you sure you want to clear the current location trail? This action cannot be undone.'**
String get clearTrailConfirmation;
/// Message when no trail exists
///
/// In en, this message translates to:
/// **'No trail recorded yet'**
String get noTrailRecorded;
/// Instructions to start trail recording
///
/// In en, this message translates to:
/// **'Start location tracking to record your trail'**
String get startTrackingToRecord;
/// Trail controls tooltip
///
/// In en, this message translates to:
/// **'Trail Controls'**
String get trailControls;
/// Device information section header
///
/// In en, this message translates to:
/// **'Device Information'**
String get deviceInformation;
/// Bluetooth Low Energy device name label
///
/// In en, this message translates to:
/// **'BLE Name'**
String get bleName;
/// Mesh network name label
///
/// In en, this message translates to:
/// **'Mesh Name'**
String get meshName;
/// Label when a value is not set
///
/// In en, this message translates to:
/// **'Not set'**
String get notSet;
/// Device model label
///
/// In en, this message translates to:
/// **'Model'**
String get model;
/// Version label
///
/// In en, this message translates to:
/// **'Version'**
String get version;
/// Firmware build date label
///
/// In en, this message translates to:
/// **'Build Date'**
String get buildDate;
/// Firmware label
///
/// In en, this message translates to:
/// **'Firmware'**
String get firmware;
/// Maximum contacts capacity label
///
/// In en, this message translates to:
/// **'Max Contacts'**
String get maxContacts;
/// Maximum channels capacity label
///
/// In en, this message translates to:
/// **'Max Channels'**
String get maxChannels;
/// Public information section header
///
/// In en, this message translates to:
/// **'Public Info'**
String get publicInfo;
/// Mesh network name field label
///
/// In en, this message translates to:
/// **'Mesh Network Name'**
String get meshNetworkName;
/// Helper text for mesh network name field
///
/// In en, this message translates to:
/// **'Name broadcast in mesh advertisements'**
String get nameBroadcastInMesh;
/// Telemetry and location sharing toggle label
///
/// In en, this message translates to:
/// **'Telemetry & Location Sharing'**
String get telemetryAndLocationSharing;
/// Latitude field label (short form)
///
/// In en, this message translates to:
/// **'Lat'**
String get lat;
/// Longitude field label (short form)
///
/// In en, this message translates to:
/// **'Lon'**
String get lon;
/// Tooltip for use current location button
///
/// In en, this message translates to:
/// **'Use current location'**
String get useCurrentLocation;
/// Device type: none or unknown
///
/// In en, this message translates to:
/// **'None/Unknown'**
String get noneUnknown;
/// Device type: chat node
///
/// In en, this message translates to:
/// **'Chat Node'**
String get chatNode;
/// Device type: repeater
///
/// In en, this message translates to:
/// **'Repeater'**
String get repeater;
/// Device type: room or channel
///
/// In en, this message translates to:
/// **'Room/Channel'**
String get roomChannel;
/// Generic device type with number
///
/// In en, this message translates to:
/// **'Type {number}'**
String typeNumber(int number);
/// Short success message when copying to clipboard
///
/// In en, this message translates to:
/// **'Copied {label} to clipboard'**
String copiedToClipboardShort(String label);
/// Generic error message for save failures
///
/// In en, this message translates to:
/// **'Failed to save: {error}'**
String failedToSave(String error);
/// Error message when getting location fails
///
/// In en, this message translates to:
/// **'Failed to get location: {error}'**
String failedToGetLocation(String error);
}
class _AppLocalizationsDelegate
@@ -2036,8 +2266,15 @@ class _AppLocalizationsDelegate
}
@override
bool isSupported(Locale locale) =>
<String>['en', 'hr', 'sl'].contains(locale.languageCode);
bool isSupported(Locale locale) => <String>[
'de',
'en',
'es',
'fr',
'hr',
'it',
'sl',
].contains(locale.languageCode);
@override
bool shouldReload(_AppLocalizationsDelegate old) => false;
@@ -2046,10 +2283,18 @@ class _AppLocalizationsDelegate
AppLocalizations lookupAppLocalizations(Locale locale) {
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'de':
return AppLocalizationsDe();
case 'en':
return AppLocalizationsEn();
case 'es':
return AppLocalizationsEs();
case 'fr':
return AppLocalizationsFr();
case 'hr':
return AppLocalizationsHr();
case 'it':
return AppLocalizationsIt();
case 'sl':
return AppLocalizationsSl();
}

File diff suppressed because it is too large Load Diff

View File

@@ -1104,4 +1104,125 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get offlineLayers => 'Offline Layers';
@override
String get locationTrail => 'Location Trail';
@override
String get showTrailOnMap => 'Show Trail on Map';
@override
String get trailVisible => 'Trail is visible on the map';
@override
String get trailHiddenRecording => 'Trail is hidden (still recording)';
@override
String get duration => 'Duration';
@override
String get points => 'Points';
@override
String get clearTrail => 'Clear Trail';
@override
String get clearTrailQuestion => 'Clear Trail?';
@override
String get clearTrailConfirmation =>
'Are you sure you want to clear the current location trail? This action cannot be undone.';
@override
String get noTrailRecorded => 'No trail recorded yet';
@override
String get startTrackingToRecord =>
'Start location tracking to record your trail';
@override
String get trailControls => 'Trail Controls';
@override
String get deviceInformation => 'Device Information';
@override
String get bleName => 'BLE Name';
@override
String get meshName => 'Mesh Name';
@override
String get notSet => 'Not set';
@override
String get model => 'Model';
@override
String get version => 'Version';
@override
String get buildDate => 'Build Date';
@override
String get firmware => 'Firmware';
@override
String get maxContacts => 'Max Contacts';
@override
String get maxChannels => 'Max Channels';
@override
String get publicInfo => 'Public Info';
@override
String get meshNetworkName => 'Mesh Network Name';
@override
String get nameBroadcastInMesh => 'Name broadcast in mesh advertisements';
@override
String get telemetryAndLocationSharing => 'Telemetry & Location Sharing';
@override
String get lat => 'Lat';
@override
String get lon => 'Lon';
@override
String get useCurrentLocation => 'Use current location';
@override
String get noneUnknown => 'None/Unknown';
@override
String get chatNode => 'Chat Node';
@override
String get repeater => 'Repeater';
@override
String get roomChannel => 'Room/Channel';
@override
String typeNumber(int number) {
return 'Type $number';
}
@override
String copiedToClipboardShort(String label) {
return 'Copied $label to clipboard';
}
@override
String failedToSave(String error) {
return 'Failed to save: $error';
}
@override
String failedToGetLocation(String error) {
return 'Failed to get location: $error';
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1105,4 +1105,125 @@ class AppLocalizationsHr extends AppLocalizations {
@override
String get offlineLayers => 'Offline slojevi';
@override
String get locationTrail => 'Putanja lokacije';
@override
String get showTrailOnMap => 'Prikaži putanju na karti';
@override
String get trailVisible => 'Putanja je vidljiva na karti';
@override
String get trailHiddenRecording => 'Putanja je skrivena (još se snima)';
@override
String get duration => 'Trajanje';
@override
String get points => 'Točke';
@override
String get clearTrail => 'Obriši putanju';
@override
String get clearTrailQuestion => 'Obrisati putanju?';
@override
String get clearTrailConfirmation =>
'Jeste li sigurni da želite obrisati trenutnu putanju lokacije? Ova radnja se ne može poništiti.';
@override
String get noTrailRecorded => 'Još nije snimljena putanja';
@override
String get startTrackingToRecord =>
'Pokrenite praćenje lokacije za snimanje putanje';
@override
String get trailControls => 'Upravljanje putanjom';
@override
String get deviceInformation => 'Informacije o uređaju';
@override
String get bleName => 'BLE naziv';
@override
String get meshName => 'Mesh naziv';
@override
String get notSet => 'Nije postavljeno';
@override
String get model => 'Model';
@override
String get version => 'Verzija';
@override
String get buildDate => 'Datum izgradnje';
@override
String get firmware => 'Firmware';
@override
String get maxContacts => 'Maks. kontakata';
@override
String get maxChannels => 'Maks. kanala';
@override
String get publicInfo => 'Javne informacije';
@override
String get meshNetworkName => 'Naziv mesh mreže';
@override
String get nameBroadcastInMesh => 'Naziv koji se emitira u mesh oglasima';
@override
String get telemetryAndLocationSharing => 'Telemetrija i dijeljenje lokacije';
@override
String get lat => 'Šir';
@override
String get lon => 'Dug';
@override
String get useCurrentLocation => 'Koristi trenutnu lokaciju';
@override
String get noneUnknown => 'Nema/Nepoznato';
@override
String get chatNode => 'Čvorište za razgovor';
@override
String get repeater => 'Repetitor';
@override
String get roomChannel => 'Soba/Kanal';
@override
String typeNumber(int number) {
return 'Tip $number';
}
@override
String copiedToClipboardShort(String label) {
return 'Kopirano $label u međuspremnik';
}
@override
String failedToSave(String error) {
return 'Neuspjelo spremanje: $error';
}
@override
String failedToGetLocation(String error) {
return 'Neuspjelo dohvaćanje lokacije: $error';
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1108,4 +1108,125 @@ class AppLocalizationsSl extends AppLocalizations {
@override
String get offlineLayers => 'Brezpovezne plasti';
@override
String get locationTrail => 'Sledilna pot';
@override
String get showTrailOnMap => 'Prikaži pot na zemljevidu';
@override
String get trailVisible => 'Pot je vidna na zemljevidu';
@override
String get trailHiddenRecording => 'Pot je skrita (še se snema)';
@override
String get duration => 'Trajanje';
@override
String get points => 'Točke';
@override
String get clearTrail => 'Počisti pot';
@override
String get clearTrailQuestion => 'Počisti pot?';
@override
String get clearTrailConfirmation =>
'Ste prepričani, da želite počistiti trenutno sledilno pot? Tega dejanja ni mogoče razveljaviti.';
@override
String get noTrailRecorded => 'Še ni posnete poti';
@override
String get startTrackingToRecord =>
'Začnite sledenje lokacije za snemanje poti';
@override
String get trailControls => 'Nadzor poti';
@override
String get deviceInformation => 'Informacije o napravi';
@override
String get bleName => 'BLE ime';
@override
String get meshName => 'Mesh ime';
@override
String get notSet => 'Ni nastavljeno';
@override
String get model => 'Model';
@override
String get version => 'Različica';
@override
String get buildDate => 'Datum izdelave';
@override
String get firmware => 'Vdelana programska oprema';
@override
String get maxContacts => 'Maks. stikov';
@override
String get maxChannels => 'Maks. kanalov';
@override
String get publicInfo => 'Javne informacije';
@override
String get meshNetworkName => 'Ime mesh omrežja';
@override
String get nameBroadcastInMesh => 'Ime, ki se oddaja v mesh oglasih';
@override
String get telemetryAndLocationSharing => 'Telemetrija in deljenje lokacije';
@override
String get lat => 'Šir';
@override
String get lon => 'Dol';
@override
String get useCurrentLocation => 'Uporabi trenutno lokacijo';
@override
String get noneUnknown => 'Brez/Neznano';
@override
String get chatNode => 'Vozlišče za klepet';
@override
String get repeater => 'Ojačevalnik';
@override
String get roomChannel => 'Soba/Kanal';
@override
String typeNumber(int number) {
return 'Tip $number';
}
@override
String copiedToClipboardShort(String label) {
return 'Kopirano $label v odložišče';
}
@override
String failedToSave(String error) {
return 'Shranjevanje ni uspelo: $error';
}
@override
String failedToGetLocation(String error) {
return 'Pridobivanje lokacije ni uspelo: $error';
}
}

View File

@@ -632,5 +632,81 @@
"onlineLayers": "Spletne plasti",
"offlineLayers": "Brezpovezne plasti"
"offlineLayers": "Brezpovezne plasti",
"locationTrail": "Sledilna pot",
"showTrailOnMap": "Prikaži pot na zemljevidu",
"trailVisible": "Pot je vidna na zemljevidu",
"trailHiddenRecording": "Pot je skrita (še se snema)",
"distance": "Razdalja",
"duration": "Trajanje",
"points": "Točke",
"clearTrail": "Počisti pot",
"clearTrailQuestion": "Počisti pot?",
"clearTrailConfirmation": "Ste prepričani, da želite počistiti trenutno sledilno pot? Tega dejanja ni mogoče razveljaviti.",
"noTrailRecorded": "Še ni posnete poti",
"startTrackingToRecord": "Začnite sledenje lokacije za snemanje poti",
"trailControls": "Nadzor poti",
"deviceInformation": "Informacije o napravi",
"bleName": "BLE ime",
"meshName": "Mesh ime",
"notSet": "Ni nastavljeno",
"model": "Model",
"version": "Različica",
"buildDate": "Datum izdelave",
"firmware": "Vdelana programska oprema",
"maxContacts": "Maks. stikov",
"maxChannels": "Maks. kanalov",
"publicInfo": "Javne informacije",
"meshNetworkName": "Ime mesh omrežja",
"nameBroadcastInMesh": "Ime, ki se oddaja v mesh oglasih",
"telemetryAndLocationSharing": "Telemetrija in deljenje lokacije",
"lat": "Šir",
"lon": "Dol",
"useCurrentLocation": "Uporabi trenutno lokacijo",
"noneUnknown": "Brez/Neznano",
"chatNode": "Vozlišče za klepet",
"repeater": "Ojačevalnik",
"roomChannel": "Soba/Kanal",
"typeNumber": "Tip {number}",
"copiedToClipboardShort": "Kopirano {label} v odložišče",
"failedToSave": "Shranjevanje ni uspelo: {error}",
"failedToGetLocation": "Pridobivanje lokacije ni uspelo: {error}"
}