diff options
author | Marcus Lundblad <ml@update.uu.se> | 2021-04-30 23:07:03 +0200 |
---|---|---|
committer | Marcus Lundblad <ml@update.uu.se> | 2021-05-07 22:42:18 +0200 |
commit | 147af99839deeeee155c23489769c2893045a2ac (patch) | |
tree | 0c04894e9b52f13bbe597ca07f749a5d1ec56539 /src | |
parent | e8d82c1501417ccddeb2c9180660b5afa1969803 (diff) | |
download | gnome-maps-147af99839deeeee155c23489769c2893045a2ac.tar.gz |
placeView: Show takeaway for eating & drinking places
Diffstat (limited to 'src')
-rw-r--r-- | src/placeView.js | 31 |
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', |