diff --git a/green_walking/lib/l10n/app_en.arb b/green_walking/lib/l10n/app_en.arb index 6695ee1..39285d3 100644 --- a/green_walking/lib/l10n/app_en.arb +++ b/green_walking/lib/l10n/app_en.arb @@ -363,7 +363,7 @@ }, "offlineMapsPage": "Offline maps (Beta)", "@offlineMapsPage": { - "description": "Navigation label and title for offline maps page" + "description": "Navigation label and title for the offline maps page" }, "downloadNewOfflineMapButton": "Download new map", "@downloadNewOfflineMapButton": { @@ -371,11 +371,11 @@ }, "downloadMapTitle": "Download offline map", "@downloadMapTitle": { - "description": "Title for download map page." + "description": "Title for the download map page." }, "downloadMapButton": "Download area", "@downloadMapButton": { - "description": "Title for download map button." + "description": "Title for the download map button." }, "offlineMapCardTitle": "Map", "@offlineMapCardTitle": { @@ -417,7 +417,7 @@ }, "downloadMapDialogEstimateResult": "Estimation:\n{storageSize} storage\n{networkTransferSize} network transfer", "@downloadMapDialogEstimateResult": { - "description": "Text shown while estimating the required storage space.", + "description": "Displayed estimates to download the selected map area.", "placeholders": { "storageSize": { "type": "String", diff --git a/green_walking/lib/library/util.dart b/green_walking/lib/library/util.dart index e89fc10..61e1821 100644 --- a/green_walking/lib/library/util.dart +++ b/green_walking/lib/library/util.dart @@ -11,8 +11,8 @@ String? truncateString(String? myString, int? cutoff) { } String formatBytes(int bytes, int decimals) { - if (bytes <= 0) return "0 B"; - const suffixes = ["B", "KB", "MB", "GB", "TB"]; - var i = (log(bytes) / log(1024)).floor(); + if (bytes <= 0) return '0 B'; + const suffixes = ['B', 'KB', 'MB', 'GB', 'TB']; + final i = (log(bytes) / log(1024)).floor(); return '${(bytes / pow(1024, i)).toStringAsFixed(decimals)} ${suffixes[i]}'; } diff --git a/green_walking/lib/widgets/offline/download_map_dialog.dart b/green_walking/lib/widgets/offline/download_map_dialog.dart index f5cbfe9..7253580 100644 --- a/green_walking/lib/widgets/offline/download_map_dialog.dart +++ b/green_walking/lib/widgets/offline/download_map_dialog.dart @@ -29,7 +29,7 @@ class DownloadMapDialog extends StatelessWidget { } if (snapshot.hasError) { // TODO: Translate - return Text('Failed to estimate amount of storage: ${snapshot.error}'); + return Text('Failed to estimate storage space: ${snapshot.error}'); } return Row( children: [ diff --git a/green_walking/lib/widgets/offline/offline_map_card.dart b/green_walking/lib/widgets/offline/offline_map_card.dart index 24f746e..64a59fd 100644 --- a/green_walking/lib/widgets/offline/offline_map_card.dart +++ b/green_walking/lib/widgets/offline/offline_map_card.dart @@ -9,7 +9,7 @@ class OfflineMapCard extends StatelessWidget { final TileRegion region; final TileStore tileStore; - final void Function()? onDelete; + final void Function() onDelete; @override Widget build(BuildContext context) { @@ -45,7 +45,7 @@ class OfflineMapStyleCard extends StatelessWidget { final StylePack stylePack; final bool canBeDeleted; - final void Function()? onDelete; + final void Function() onDelete; @override Widget build(BuildContext context) {