[gnome-maps/wip/mlundblad/add-email-and-takeaway: 12/12] placeView: Show takeaway for eating & drinking places




commit 48fb4f95183fd99fae57f6b04f652f679c15e9cf
Author: Marcus Lundblad <ml update uu se>
Date:   Fri Apr 30 23:07:03 2021 +0200

    placeView: Show takeaway for eating & drinking places

 src/placeView.js | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
---
diff --git a/src/placeView.js b/src/placeView.js
index 30a9cdbb..5ab8595e 100644
--- a/src/placeView.js
+++ b/src/placeView.js
@@ -304,6 +304,36 @@ var PlaceView = GObject.registerClass({
                            linkUrl: 'mailto:%s'.format(place.email) });
         }
 
+        if (place.eatingAndDrinking) {
+            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',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]