Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xennis committed Jul 20, 2024
1 parent 31a4bd5 commit 0869f93
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions green_walking/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -363,19 +363,19 @@
},
"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": {
"description": "Button label for opening the page to download a new offline map."
},
"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": {
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions green_walking/lib/library/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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]}';
}
2 changes: 1 addition & 1 deletion green_walking/lib/widgets/offline/download_map_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
4 changes: 2 additions & 2 deletions green_walking/lib/widgets/offline/offline_map_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0869f93

Please sign in to comment.