mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
i18n: Add 247 missing translation keys across all 13 languages
Replace hardcoded English strings in 32 Dart source files with l10n references. Covers settings labels, UI actions, map/SAR features, device config, notifications, profiles, spectrum scan, and status messages for sl, de, hr, pl, es, fr, it, el, ru, tr, uk, zh, pt.
This commit is contained in:
@@ -100,7 +100,7 @@ class CompassContactList extends StatelessWidget {
|
||||
// Persons/Team section
|
||||
if (showContacts && persons.isNotEmpty) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 16, bottom: 8, top: 4),
|
||||
padding: EdgeInsets.only(left: 16, bottom: 8, top: 4),
|
||||
child: Text(
|
||||
l10n.teamMembers,
|
||||
style: Theme.of(
|
||||
@@ -135,7 +135,7 @@ class CompassContactList extends StatelessWidget {
|
||||
// Repeaters section
|
||||
if (showRepeaters && repeaters.isNotEmpty) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 16, bottom: 8, top: 12),
|
||||
padding: EdgeInsets.only(left: 16, bottom: 8, top: 12),
|
||||
child: Text(
|
||||
l10n.repeaters,
|
||||
style: Theme.of(
|
||||
@@ -151,7 +151,7 @@ class CompassContactList extends StatelessWidget {
|
||||
// Rooms section
|
||||
if (rooms.isNotEmpty) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 16, bottom: 8, top: 12),
|
||||
padding: EdgeInsets.only(left: 16, bottom: 8, top: 12),
|
||||
child: Text(
|
||||
l10n.rooms,
|
||||
style: Theme.of(
|
||||
|
||||
@@ -49,7 +49,7 @@ class _CompassFiltersState extends State<CompassFilters> {
|
||||
title: Row(
|
||||
children: [
|
||||
const Icon(Icons.filter_list, size: 20),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
Text(l10n.filterMarkers),
|
||||
],
|
||||
),
|
||||
@@ -62,7 +62,7 @@ class _CompassFiltersState extends State<CompassFilters> {
|
||||
_CompactFilterItem(
|
||||
icon: Icons.timeline,
|
||||
color: Colors.blue,
|
||||
label: 'Location Trail',
|
||||
label: l10n.locationTrail,
|
||||
value: mapProvider.isTrailVisible,
|
||||
onChanged: (value) {
|
||||
mapProvider.toggleTrailVisibility();
|
||||
@@ -100,7 +100,7 @@ class _CompassFiltersState extends State<CompassFilters> {
|
||||
const SizedBox(height: 4),
|
||||
// SAR Markers section
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8, bottom: 8, top: 4),
|
||||
padding: EdgeInsets.only(left: 8, bottom: 8, top: 4),
|
||||
child: Text(
|
||||
l10n.sarMarkers,
|
||||
style: Theme.of(context).textTheme.labelLarge?.copyWith(
|
||||
@@ -118,7 +118,7 @@ class _CompassFiltersState extends State<CompassFilters> {
|
||||
setDialogState(() {});
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
SizedBox(height: 4),
|
||||
_CompactFilterItem(
|
||||
icon: Icons.local_fire_department,
|
||||
color: Colors.red,
|
||||
@@ -129,7 +129,7 @@ class _CompassFiltersState extends State<CompassFilters> {
|
||||
setDialogState(() {});
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
SizedBox(height: 4),
|
||||
_CompactFilterItem(
|
||||
icon: Icons.home_work,
|
||||
color: Colors.orange,
|
||||
@@ -164,7 +164,7 @@ class _CompassFiltersState extends State<CompassFilters> {
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.filter_list),
|
||||
icon: Icon(Icons.filter_list),
|
||||
tooltip: l10n.filterMarkersTooltip,
|
||||
onPressed: () => _showFilterDialog(),
|
||||
);
|
||||
|
||||
@@ -565,7 +565,7 @@ class _LocationFormatToggleState extends State<_LocationFormatToggle> {
|
||||
Widget build(BuildContext context) {
|
||||
final position = widget.position;
|
||||
if (position == null) {
|
||||
return const SizedBox.shrink();
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
|
||||
@@ -64,7 +64,7 @@ class CompassSarList extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 16, top: 16, bottom: 8),
|
||||
padding: EdgeInsets.only(left: 16, top: 16, bottom: 8),
|
||||
child: Text(
|
||||
l10n.sarMarkers,
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
|
||||
@@ -603,7 +603,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.share),
|
||||
const SizedBox(width: 12),
|
||||
SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.shareDrawingsCount(
|
||||
@@ -620,7 +620,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
const Divider(),
|
||||
// Option: Send to Public Channel
|
||||
ListTile(
|
||||
leading: const Icon(Icons.public, color: Colors.blue),
|
||||
leading: Icon(Icons.public, color: Colors.blue),
|
||||
title: Text(AppLocalizations.of(context)!.publicChannel),
|
||||
subtitle: Text(AppLocalizations.of(context)!.broadcastToAll),
|
||||
onTap: () async {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../l10n/app_localizations.dart';
|
||||
|
||||
class MapLegend extends StatelessWidget {
|
||||
final int teamMemberCount;
|
||||
@@ -35,31 +36,31 @@ class MapLegend extends StatelessWidget {
|
||||
_LegendItem(
|
||||
icon: Icons.person,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
label: 'Team',
|
||||
label: AppLocalizations.of(context)!.team,
|
||||
count: teamMemberCount,
|
||||
),
|
||||
_LegendItem(
|
||||
icon: Icons.person_pin,
|
||||
color: Colors.green,
|
||||
label: 'Found',
|
||||
label: AppLocalizations.of(context)!.found,
|
||||
count: foundPersonCount,
|
||||
),
|
||||
_LegendItem(
|
||||
icon: Icons.local_fire_department,
|
||||
color: Colors.red,
|
||||
label: 'Fire',
|
||||
label: AppLocalizations.of(context)!.fire,
|
||||
count: fireCount,
|
||||
),
|
||||
_LegendItem(
|
||||
icon: Icons.home_work,
|
||||
color: Colors.orange,
|
||||
label: 'Staging',
|
||||
label: AppLocalizations.of(context)!.staging,
|
||||
count: stagingAreaCount,
|
||||
),
|
||||
_LegendItem(
|
||||
icon: Icons.inventory_2,
|
||||
color: Colors.purple,
|
||||
label: 'Object',
|
||||
label: AppLocalizations.of(context)!.object,
|
||||
count: objectCount,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -98,7 +98,7 @@ class _MapMessageOverlayState extends State<MapMessageOverlay> {
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.recentMessages,
|
||||
|
||||
@@ -39,7 +39,7 @@ class TrailControls extends StatelessWidget {
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.timeline, size: 24),
|
||||
const SizedBox(width: 12),
|
||||
SizedBox(width: 12),
|
||||
Text(
|
||||
l10n.locationTrail,
|
||||
style: const TextStyle(
|
||||
@@ -53,7 +53,7 @@ class TrailControls extends StatelessWidget {
|
||||
|
||||
// Trail visibility toggle
|
||||
SwitchListTile(
|
||||
secondary: const Icon(Icons.visibility),
|
||||
secondary: Icon(Icons.visibility),
|
||||
title: Text(l10n.showTrailOnMap),
|
||||
subtitle: Text(
|
||||
mapProvider.isTrailVisible
|
||||
@@ -75,7 +75,7 @@ class TrailControls extends StatelessWidget {
|
||||
children: [
|
||||
OutlinedButton.icon(
|
||||
onPressed: () => _importTrail(context, mapProvider),
|
||||
icon: const Icon(Icons.file_upload_outlined),
|
||||
icon: Icon(Icons.file_upload_outlined),
|
||||
label: Text(l10n.importFromClipboard),
|
||||
),
|
||||
if (mapProvider.currentTrail != null &&
|
||||
@@ -86,7 +86,7 @@ class TrailControls extends StatelessWidget {
|
||||
mapProvider.currentTrail!,
|
||||
customName: 'My Trail',
|
||||
),
|
||||
icon: const Icon(Icons.file_download_outlined),
|
||||
icon: Icon(Icons.file_download_outlined),
|
||||
label: Text(l10n.exportToClipboard),
|
||||
),
|
||||
],
|
||||
@@ -116,13 +116,13 @@ class TrailControls extends StatelessWidget {
|
||||
mapProvider.totalTrailDistance,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(height: 8),
|
||||
_buildStatRow(
|
||||
icon: Icons.access_time,
|
||||
label: l10n.duration,
|
||||
value: _formatDuration(mapProvider.trailDuration),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(height: 8),
|
||||
_buildStatRow(
|
||||
icon: Icons.place,
|
||||
label: l10n.points,
|
||||
@@ -139,7 +139,7 @@ class TrailControls extends StatelessWidget {
|
||||
onPressed: () {
|
||||
_showClearConfirmation(context, mapProvider, l10n);
|
||||
},
|
||||
icon: const Icon(Icons.delete_outline),
|
||||
icon: Icon(Icons.delete_outline),
|
||||
label: Text(l10n.clearTrail),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.red,
|
||||
@@ -161,7 +161,7 @@ class TrailControls extends StatelessWidget {
|
||||
size: 48,
|
||||
color: Colors.grey,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
l10n.noTrailRecorded,
|
||||
style: const TextStyle(
|
||||
@@ -169,7 +169,7 @@ class TrailControls extends StatelessWidget {
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
l10n.startTrackingToRecord,
|
||||
style: const TextStyle(
|
||||
@@ -191,7 +191,7 @@ class TrailControls extends StatelessWidget {
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.people, size: 20),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
Text(
|
||||
l10n.contactTrails,
|
||||
style: const TextStyle(
|
||||
@@ -205,7 +205,7 @@ class TrailControls extends StatelessWidget {
|
||||
|
||||
// Show All Contact Trails toggle
|
||||
SwitchListTile(
|
||||
secondary: const Icon(Icons.route),
|
||||
secondary: Icon(Icons.route),
|
||||
title: Text(l10n.showAllContactTrails),
|
||||
subtitle: Text(
|
||||
contactsWithTrails.isEmpty
|
||||
|
||||
Reference in New Issue
Block a user