Add localization for missing location error in path tracing

This commit is contained in:
Winston Lowe 2026-02-08 11:57:04 -08:00
parent 98e0b05e73
commit 2f4b230b31
33 changed files with 125 additions and 22 deletions

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopied": "Рекламата е копирана в клипборда.",
"contacts_zeroHopContactAdvertFailed": "Неуспешно изпращане на контакт.",
"contacts_zeroHopContactAdvertSent": "Изпратен контакт по обява.",
"contacts_contactAdvertCopyFailed": "Копирането на обявата в клипборда не успя."
"contacts_contactAdvertCopyFailed": "Копирането на обявата в клипборда не успя.",
"pathTrace_someHopsNoLocation": "Един или повече от хмелите липсва местоположение!"
}

View file

@ -1568,5 +1568,6 @@
"contacts_zeroHopContactAdvertFailed": "Kontakt konnte nicht gesendet werden.",
"contacts_zeroHopContactAdvertSent": "Kontakt über Anzeige gesendet",
"contacts_contactAdvertCopied": "Anzeige in die Zwischenablage kopiert.",
"contacts_contactAdvertCopyFailed": "Kopieren des Werbeinhalts in die Zwischenablage fehlgeschlagen."
"contacts_contactAdvertCopyFailed": "Kopieren des Werbeinhalts in die Zwischenablage fehlgeschlagen.",
"pathTrace_someHopsNoLocation": "Eine oder mehrere der Hopfen fehlen einen Standort!"
}

View file

@ -1316,6 +1316,7 @@
"pathTrace_failed": "Path trace failed.",
"pathTrace_notAvailable": "Path trace not available.",
"pathTrace_refreshTooltip": "Refresh Path Trace.",
"pathTrace_someHopsNoLocation": "One or more of the hops is missing a location!",
"contacts_pathTrace": "Path Trace",
"contacts_ping": "Ping",
"contacts_repeaterPathTrace": "Path trace to repeater",

View file

@ -1568,5 +1568,6 @@
"contacts_zeroHopContactAdvertFailed": "No se pudo enviar el contacto.",
"contacts_zeroHopContactAdvertSent": "Envió contacto por anuncio.",
"contacts_contactAdvertCopied": "Anuncio copiado al Portapapeles.",
"contacts_contactAdvertCopyFailed": "Copiar anuncio al Portapapeles ha fallado."
"contacts_contactAdvertCopyFailed": "Copiar anuncio al Portapapeles ha fallado.",
"pathTrace_someHopsNoLocation": "Uno o más de los lúpulos carecen de una ubicación"
}

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopied": "Annonce copiée dans le presse-papiers.",
"contacts_contactAdvertCopyFailed": "La copie de l'annonce vers le presse-papiers a échoué.",
"contacts_zeroHopContactAdvertSent": "Envoyer un contact par annonce.",
"contacts_zeroHopContactAdvertFailed": "Échec de l'envoi du contact."
"contacts_zeroHopContactAdvertFailed": "Échec de l'envoi du contact.",
"pathTrace_someHopsNoLocation": "Une ou plusieurs des houblons manquent d'une localisation !"
}

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopyFailed": "Copia dell'annuncio nella Clipboard non riuscita.",
"contacts_ShareContactZeroHop": "Condividi contatto tramite annuncio",
"contacts_zeroHopContactAdvertFailed": "Invio del contatto non riuscito.",
"contacts_contactAdvertCopied": "Annuncio copiato negli Appunti."
"contacts_contactAdvertCopied": "Annuncio copiato negli Appunti.",
"pathTrace_someHopsNoLocation": "Uno o più dei luppoli mancano di una posizione!"
}

View file

@ -4724,6 +4724,12 @@ abstract class AppLocalizations {
/// **'Refresh Path Trace.'**
String get pathTrace_refreshTooltip;
/// No description provided for @pathTrace_someHopsNoLocation.
///
/// In en, this message translates to:
/// **'One or more of the hops is missing a location!'**
String get pathTrace_someHopsNoLocation;
/// No description provided for @contacts_pathTrace.
///
/// In en, this message translates to:

View file

@ -2695,6 +2695,10 @@ class AppLocalizationsBg extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Обнови Path Trace.';
@override
String get pathTrace_someHopsNoLocation =>
'Един или повече от хмелите липсва местоположение!';
@override
String get contacts_pathTrace => 'Пътен проследяване';

View file

@ -2699,6 +2699,10 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Path Trace aktualisieren.';
@override
String get pathTrace_someHopsNoLocation =>
'Eine oder mehrere der Hopfen fehlen einen Standort!';
@override
String get contacts_pathTrace => 'Pfadverfolgung';

View file

@ -2655,6 +2655,10 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Refresh Path Trace.';
@override
String get pathTrace_someHopsNoLocation =>
'One or more of the hops is missing a location!';
@override
String get contacts_pathTrace => 'Path Trace';

View file

@ -2694,6 +2694,10 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Actualizar Path Trace';
@override
String get pathTrace_someHopsNoLocation =>
'Uno o más de los lúpulos carecen de una ubicación';
@override
String get contacts_pathTrace => 'Rastreo de caminos';

View file

@ -2711,6 +2711,10 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Actualiser Path Trace';
@override
String get pathTrace_someHopsNoLocation =>
'Une ou plusieurs des houblons manquent d\'une localisation !';
@override
String get contacts_pathTrace => 'Traçage de chemin';

View file

@ -2695,6 +2695,10 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Aggiorna Path Trace.';
@override
String get pathTrace_someHopsNoLocation =>
'Uno o più dei luppoli mancano di una posizione!';
@override
String get contacts_pathTrace => 'Traccia Percorso';

View file

@ -2685,6 +2685,10 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Path Trace vernieuwen.';
@override
String get pathTrace_someHopsNoLocation =>
'Een of meer van de hops ontbreken een locatie!';
@override
String get contacts_pathTrace => 'Pad Traceren';

View file

@ -2693,6 +2693,10 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Odśwież ścieżkę.';
@override
String get pathTrace_someHopsNoLocation =>
'Jeden lub więcej z chmieli nie ma określonej lokalizacji!';
@override
String get contacts_pathTrace => 'Śledzenie Ścieżek';

View file

@ -2696,6 +2696,10 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Atualizar Path Trace.';
@override
String get pathTrace_someHopsNoLocation =>
'Um ou mais dos lúpulos estão sem localização!';
@override
String get contacts_pathTrace => 'Traçado de Caminho';

View file

@ -2698,6 +2698,10 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Обновить Path Trace';
@override
String get pathTrace_someHopsNoLocation =>
'Одному или нескольким хмелям не указано местоположение!';
@override
String get contacts_pathTrace => 'Трассировка пути';

View file

@ -2681,6 +2681,10 @@ class AppLocalizationsSk extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Obnoviť Path Trace.';
@override
String get pathTrace_someHopsNoLocation =>
'Jedna alebo viac chmeľov chýba lokalita!';
@override
String get contacts_pathTrace => 'Sledovanie lúčov';

View file

@ -2684,6 +2684,10 @@ class AppLocalizationsSl extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Osveži Path Trace.';
@override
String get pathTrace_someHopsNoLocation =>
'Ena ali več hmelju manjka lokacija!';
@override
String get contacts_pathTrace => 'Sledenje poti';

View file

@ -2669,6 +2669,10 @@ class AppLocalizationsSv extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Uppdatera Path Trace';
@override
String get pathTrace_someHopsNoLocation =>
'En eller flera av humlen saknar en plats!';
@override
String get contacts_pathTrace => 'Path Trace';

View file

@ -2705,6 +2705,10 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => 'Оновити Path Trace';
@override
String get pathTrace_someHopsNoLocation =>
'Одне або більше хмелів відсутнє місце розташування!';
@override
String get contacts_pathTrace => 'Трасування шляхів';

View file

@ -2554,6 +2554,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get pathTrace_refreshTooltip => '重新绘制路径。';
@override
String get pathTrace_someHopsNoLocation => '其中一个或多个啤酒花缺少位置!';
@override
String get contacts_pathTrace => '路径追踪';

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopyFailed": "Kopiëren van advertentie naar Clipboard is mislukt.",
"contacts_ShareContact": "Kontakt naar Klembord kopiëren",
"contacts_ShareContactZeroHop": "Contact delen via advertentie",
"contacts_zeroHopContactAdvertFailed": "Mislukt om contact te verzenden"
"contacts_zeroHopContactAdvertFailed": "Mislukt om contact te verzenden",
"pathTrace_someHopsNoLocation": "Een of meer van de hops ontbreken een locatie!"
}

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopyFailed": "Kopiowanie ogłoszenia do schowka nie powiodło się.",
"contacts_ShareContactZeroHop": "Udostępnij kontakt przez ogłoszenie",
"contacts_ShareContact": "Kopiuj kontakt do schowka",
"contacts_zeroHopContactAdvertFailed": "Nie udało się wysłać kontaktu."
"contacts_zeroHopContactAdvertFailed": "Nie udało się wysłać kontaktu.",
"pathTrace_someHopsNoLocation": "Jeden lub więcej z chmieli nie ma określonej lokalizacji!"
}

View file

@ -1568,5 +1568,6 @@
"contacts_floodAdvert": "Anúncio de Inundação",
"contacts_contactAdvertCopyFailed": "Cópia do anúncio para a Área de Transferência falhou.",
"contacts_ShareContactZeroHop": "Compartilhar contato por anúncio",
"contacts_zeroHopContactAdvertFailed": "Falha ao enviar contato."
"contacts_zeroHopContactAdvertFailed": "Falha ao enviar contato.",
"pathTrace_someHopsNoLocation": "Um ou mais dos lúpulos estão sem localização!"
}

View file

@ -808,5 +808,6 @@
"contacts_contactAdvertCopyFailed": "Копирование рекламы в буфер обмена не удалось.",
"contacts_addContactFromClipboard": "Добавить контакт из буфера обмена",
"contacts_ShareContactZeroHop": "Поделиться контактом по объявлению",
"contacts_zeroHopContactAdvertSent": "Отправлено сообщение по объявлению."
"contacts_zeroHopContactAdvertSent": "Отправлено сообщение по объявлению.",
"pathTrace_someHopsNoLocation": "Одному или нескольким хмелям не указано местоположение!"
}

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopyFailed": "Kopírovanie inzerátu do schránky zlyhalo.",
"contacts_zeroHopContactAdvertFailed": "Zlyhalo odoslanie kontaktu.",
"contacts_ShareContactZeroHop": "Zdieľať kontakt cez inzerát",
"contacts_ShareContact": "Kopírovať kontakt do schránky"
"contacts_ShareContact": "Kopírovať kontakt do schránky",
"pathTrace_someHopsNoLocation": "Jedna alebo viac chmeľov chýba lokalita!"
}

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopied": "Oglas je bil kopiran v odložišče.",
"contacts_contactAdvertCopyFailed": "Kopiranje oglasa v odložišče je spodletelo.",
"contacts_ShareContactZeroHop": "Deliti kontakt prek oglasa",
"contacts_ShareContact": "Kopiraj stik v Odložišče"
"contacts_ShareContact": "Kopiraj stik v Odložišče",
"pathTrace_someHopsNoLocation": "Ena ali več hmelju manjka lokacija!"
}

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopyFailed": "Kopiering av annons till Urklipp misslyckades.",
"contacts_ShareContact": "Kopiera kontakt till Urklipp",
"contacts_zeroHopContactAdvertFailed": "Misslyckades med att skicka kontakt.",
"contacts_ShareContactZeroHop": "Dela kontakt via annons"
"contacts_ShareContactZeroHop": "Dela kontakt via annons",
"pathTrace_someHopsNoLocation": "En eller flera av humlen saknar en plats!"
}

View file

@ -1568,5 +1568,6 @@
"contacts_contactAdvertCopyFailed": "Копіювання оголошення в буфер обміну завершилося невдало",
"contacts_zeroHopContactAdvertSent": "Відправлено контакт за оголошенням",
"contacts_addContactFromClipboard": "Додати контакт з буфера обміну",
"contacts_ShareContactZeroHop": "Поділитися контактом за оголошенням"
"contacts_ShareContactZeroHop": "Поділитися контактом за оголошенням",
"pathTrace_someHopsNoLocation": "Одне або більше хмелів відсутнє місце розташування!"
}

View file

@ -1568,5 +1568,6 @@
"contacts_zeroHopContactAdvertSent": "通过广告获取联系方式。",
"contacts_zeroHopContactAdvertFailed": "发送联系方式失败。",
"contacts_contactAdvertCopied": "广告内容已复制到剪贴板。",
"contacts_contactAdvertCopyFailed": "将广告复制到剪贴板操作失败。"
"contacts_contactAdvertCopyFailed": "将广告复制到剪贴板操作失败。",
"pathTrace_someHopsNoLocation": "其中一个或多个啤酒花缺少位置!"
}

View file

@ -525,8 +525,8 @@ class _ChannelMessagePathMapScreenState
),
Marker(
point: LatLng(
context.read<MeshCoreConnector>().selfLatitude!,
context.read<MeshCoreConnector>().selfLongitude!,
context.read<MeshCoreConnector>().selfLatitude ?? 0.0,
context.read<MeshCoreConnector>().selfLongitude ?? 0.0,
),
width: 40,
height: 40,

View file

@ -50,6 +50,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
bool _isLoading = false;
bool _failed2Loaded = false;
bool _hasData = false;
bool _noLocationErr = false;
PathTraceData? _traceData;
List<LatLng> _points = <LatLng>[];
List<Polyline> _polylines = [];
@ -108,6 +109,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
setState(() {
_isLoading = true;
_failed2Loaded = false;
_noLocationErr = false;
});
}
@ -159,7 +161,8 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
}
// Check if it's a binary response
if (code == pushCodeTraceData &&
if (frame.length > 8 &&
code == pushCodeTraceData &&
listEquals(frame.sublist(4, 8), tagData)) {
_timeoutTimer?.cancel();
if (!mounted) return;
@ -207,8 +210,13 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
_points.add(LatLng(connector.selfLatitude!, connector.selfLongitude!));
for (final hop in _traceData!.pathData) {
final contact = _traceData!.pathContacts[hop];
if (contact != null && contact.hasLocation) {
if (contact != null &&
contact.hasLocation &&
contact.latitude != null &&
contact.longitude != null) {
_points.add(LatLng(contact.latitude!, contact.longitude!));
} else {
_noLocationErr = true;
}
}
_polylines = _points.length > 1
@ -271,7 +279,20 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
top: false,
child: Stack(
children: [
if (!_hasData)
if (_noLocationErr)
Center(
child: Card(
color: Colors.red,
child: Padding(
padding: EdgeInsets.all(12),
child: Text(
context.l10n.pathTrace_someHopsNoLocation,
style: TextStyle(color: Colors.white),
),
),
),
),
if (!_hasData && _noLocationErr)
Center(
child: Column(
mainAxisSize: MainAxisSize.min,
@ -283,7 +304,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
],
),
),
if (_hasData)
if (_hasData && !_noLocationErr)
FlutterMap(
key: _mapKey,
options: MapOptions(
@ -318,7 +339,8 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
if (_points.isEmpty &&
!_hasData &&
!_isLoading &&
!_failed2Loaded)
!_failed2Loaded &&
!_noLocationErr)
Center(
child: Card(
color: Colors.white.withValues(alpha: 0.9),
@ -330,7 +352,8 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
),
),
),
if (_hasData) _buildLegendCard(context, _traceData!),
if (_hasData && !_noLocationErr)
_buildLegendCard(context, _traceData!),
],
),
),