summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@update.uu.se>2021-04-30 23:07:03 +0200
committerMarcus Lundblad <ml@update.uu.se>2021-05-07 22:42:18 +0200
commit147af99839deeeee155c23489769c2893045a2ac (patch)
tree0c04894e9b52f13bbe597ca07f749a5d1ec56539
parente8d82c1501417ccddeb2c9180660b5afa1969803 (diff)
downloadgnome-maps-147af99839deeeee155c23489769c2893045a2ac.tar.gz
placeView: Show takeaway for eating & drinking places
-rw-r--r--src/placeView.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/placeView.js b/src/placeView.js
index 30a9cdbb..e623388b 100644
--- a/src/placeView.js
+++ b/src/placeView.js
@@ -31,6 +31,7 @@ const Application = imports.application;
const ContactPlace = imports.contactPlace;
const Overpass = imports.overpass;
const Place = imports.place;
+const PlaceIcons = imports.placeIcons;
const PlaceViewImage = imports.placeViewImage;
const PlaceButtons = imports.placeButtons;
const PlaceFormatter = imports.placeFormatter;
@@ -304,6 +305,36 @@ var PlaceView = GObject.registerClass({
linkUrl: 'mailto:%s'.format(place.email) });
}
+ if (place.isEatingAndDrinking) {
+ switch (place.takeaway) {
+ case 'yes':
+ /* Translators:
+ * The establishment offers customers to purchase meals
+ * (or similar) to be consumed elsewhere
+ */
+ content.push({ info: _("Offers takeaway"),
+ icon: PlaceIcons.getIconForPlace(place) });
+ break;
+ case 'no':
+ /* Translators:
+ * The establishment only offers customers to purchase
+ * meals (or similar) to be consumed on-premise.
+ */
+ content.push({ info: _("Does not offer takeaway"),
+ icon: PlaceIcons.getIconForPlace(place) });
+ break;
+ case 'only':
+ /* Translators:
+ * The establishment only offers customers to purchase
+ * meals (or similar) to be consumed elsewhere. E.g.
+ * there is no seating on-premise for eating/drinking
+ */
+ content.push({ info: _("Only offers takeaway"),
+ icon: PlaceIcons.getIconForPlace(place) });
+ break;
+ }
+ }
+
if (place.openingHours) {
content.push({ label: _("Opening hours"),
icon: 'emoji-recent-symbolic',