Extract strings in map

This commit is contained in:
ashilkn 2023-07-06 09:42:17 +05:30
parent f795613e78
commit 507130d4a7
3 changed files with 35 additions and 3 deletions

View file

@ -7384,6 +7384,36 @@ class S {
args: [],
);
}
/// `No images with location`
String get noImagesWithLocation {
return Intl.message(
'No images with location',
name: 'noImagesWithLocation',
desc: '',
args: [],
);
}
/// `No photos found here`
String get noPhotosFoundHere {
return Intl.message(
'No photos found here',
name: 'noPhotosFoundHere',
desc: '',
args: [],
);
}
/// `Zoom out to see photos`
String get zoomOutToSeePhotos {
return Intl.message(
'Zoom out to see photos',
name: 'zoomOutToSeePhotos',
desc: '',
args: [],
);
}
}
class AppLocalizationDelegate extends LocalizationsDelegate<S> {

View file

@ -6,6 +6,7 @@ import "package:logging/logging.dart";
import "package:photos/core/event_bus.dart";
import "package:photos/events/files_updated_event.dart";
import "package:photos/events/local_photos_updated_event.dart";
import "package:photos/generated/l10n.dart";
import "package:photos/models/file.dart";
import "package:photos/models/file_load_result.dart";
import "package:photos/models/gallery_type.dart";
@ -133,12 +134,12 @@ class _MapPullUpGalleryState extends State<MapPullUpGallery> {
mainAxisSize: MainAxisSize.min,
children: [
Text(
"No photos found here",
S.of(context).noPhotosFoundHere,
style: textTheme.large,
),
const SizedBox(height: 4),
Text(
"Zoom out to see photos",
S.of(context).zoomOutToSeePhotos,
style: textTheme.smallFaint,
)
],

View file

@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import "package:latlong2/latlong.dart";
import "package:logging/logging.dart";
import "package:photos/generated/l10n.dart";
import "package:photos/models/file.dart";
import "package:photos/theme/ente_theme.dart";
import "package:photos/ui/common/loading_widget.dart";
@ -108,7 +109,7 @@ class _MapScreenState extends State<MapScreen> {
debugPrint("Info for map: center $center, initialZoom $initialZoom");
}
} else {
showShortToast(context, "No images with location");
showShortToast(context, S.of(context).noImagesWithLocation);
}
setState(() {