feat: Add localization support for contact and SAR marker display names

This commit is contained in:
Janez T
2025-10-16 21:09:33 +02:00
parent b6283e1c8f
commit c6c56f858d
6 changed files with 49 additions and 10 deletions

View File

@@ -172,7 +172,7 @@ class MapMarkers {
borderRadius: BorderRadius.circular(3),
),
child: Text(
marker.type.displayName,
marker.type.getLocalizedName(context),
style: const TextStyle(
color: Colors.white,
fontSize: 9,
@@ -254,7 +254,7 @@ class MapMarkers {
children: [
Text(marker.type.emoji, style: const TextStyle(fontSize: 24)),
const SizedBox(width: 8),
Expanded(child: Text(marker.type.displayName)),
Expanded(child: Text(marker.type.getLocalizedName(context))),
],
),
content: Column(

View File

@@ -323,7 +323,7 @@ class _SarUpdateSheetState extends State<SarUpdateSheet> {
const SizedBox(width: 12),
Expanded(
child: Text(
contact.displayName,
contact.getLocalizedDisplayName(context),
overflow: TextOverflow.ellipsis,
),
),
@@ -764,7 +764,7 @@ class MarkerTypeChip extends StatelessWidget {
const SizedBox(width: 16),
Expanded(
child: Text(
type.displayName,
type.getLocalizedName(context),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,