Modify

Opened 5 months ago

Last modified 5 months ago

#17043 new enhancement

[PATCH] cuisine and diet enhancements

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Internal preset Version:
Keywords: cuisine Cc:

Description

Per https://wiki.openstreetmap.org/wiki/Key:cuisine#Cuisine_.28type_of_food.29 we shouldn't be offering a vegetarian value for cuisine.

The patch below removes vegetarian from cuisine, updates some values (from top 100 taginfo values (> 300 uses)) and sort them (to better locate/include/remove values if needed).

Comparing with the current preset we are adding:

  • african
  • arab
  • argentinian
  • bagel
  • balkan
  • bavarian
  • brazilian
  • cake
  • caribbean
  • curry
  • danish
  • ethiopian
  • indonesian
  • lebanese
  • moroccan
  • pancake
  • pasta
  • peruvian
  • polish
  • portuguese
  • russian
  • sausage
  • tapas

Also adds a new Diet preset (without a proper icon, however):
https://i.imgur.com/1emIUZE.png

https://i.imgur.com/gqo0xUq.png

And links it in Restaurant, Fast Food and Cafe. For example:

https://i.imgur.com/MKcdU8E.png

  • data/defaultpresets.xml

    diff --git a/data/defaultpresets.xml b/data/defaultpresets.xml
    index 23b13a97b..3060eac38 100644
    a b  
    161161        <reference ref="oh_wheelchair" />
    162162    </chunk>
    163163    <chunk id="cuisine">
    164     <multiselect key="cuisine" text="Cuisine" values="italian;chinese;pizza;burger;greek;german;indian;regional;kebab;turkish;asian;thai;mexican;japanese;french;sandwich;coffee_shop;sushi;steak_house;fish_and_chips;chicken;american;ice_cream;international;seafood;spanish;vietnamese;fish;noodle;barbecue;vegetarian;korean;donut;mediterranean;friture;crepe" values_searchable="true" />
     164        <multiselect key="cuisine" text="Cuisine" values="african;american;arab;argentinian;asian;bagel;balkan;barbecue;bavarian;brazilian;burger;cake;caribbean;chicken;chinese;coffee_shop;crepe;curry;danish;donut;ethiopian;fish;fish_and_chips;french;friture;german;greek;ice_cream;indian;indonesian;international;italian;japanese;kebab;korean;lebanese;mediterranean;mexican;moroccan;noodle;pancake;pasta;peruvian;pizza;polish;portuguese;regional;russian;sandwich;sausage;seafood;spanish;steak_house;sushi;tapas;thai;turkish;vietnamese" values_searchable="true" />
    165165    </chunk>
    166166    <chunk id="internet">
    167167        <combo key="internet_access" text="Internet access" values="yes,wlan,wired,terminal,no" />
     
    45184518            <check key="outdoor_seating" text="Outdoor seating" />
    45194519            <combo key="takeaway" text="Takeaway" values="yes,no,only" />
    45204520            <combo key="delivery" text="Delivery" values="yes,no,only,Mo-Su 12:00-22:00" />
     4521            <preset_link preset_name="Diet" />
    45214522            <reference ref="oh_wheelchair" />
    45224523            <combo key="stars" text="Stars" values="1,2,3,4,5,6,7" />
    45234524            <space />
     
    45454546            <check key="outdoor_seating" text="Outdoor seating" />
    45464547            <combo key="takeaway" text="Takeaway" values="yes,no,only" />
    45474548            <combo key="delivery" text="Delivery" values="yes,no,only,Mo-Su 12:00-22:00" />
     4549            <preset_link preset_name="Diet" />
    45484550            <reference ref="oh_wheelchair" />
    45494551            <space />
    45504552            <reference ref="internet_smoking" />
     
    45964598            <check key="outdoor_seating" text="Outdoor seating" />
    45974599            <combo key="takeaway" text="Takeaway" values="yes,no,only" />
    45984600            <combo key="delivery" text="Delivery" values="yes,no,only,Mo-Su 12:00-22:00" />
     4601            <preset_link preset_name="Diet" />
    45994602            <reference ref="oh_wheelchair" />
    46004603            <space />
    46014604            <reference ref="internet_smoking" />
     
    46994702            <space />
    47004703            <reference ref="link_contact_address_payment" />
    47014704        </item> <!-- Bar -->
     4705        <separator/>
     4706        <item name="Diet" type="node,closedway,multipolygon" preset_name_label="true">
     4707            <link href="https://wiki.openstreetmap.org/wiki/Key:diet"
     4708                  cs.href="https://wiki.openstreetmap.org/wiki/Cs:Key:diet"
     4709                  de.href="https://wiki.openstreetmap.org/wiki/DE:Key:diet"
     4710                  fr.href="https://wiki.openstreetmap.org/wiki/FR:Key:diet"
     4711                  it.href="https://wiki.openstreetmap.org/wiki/IT:Key:diet"
     4712                  ja.href="https://wiki.openstreetmap.org/wiki/JA:Key:diet"
     4713                  pl.href="https://wiki.openstreetmap.org/wiki/Pl:Key:diet" />
     4714            <space />
     4715            <combo key="diet:vegetarian" text="Vegetarian" values="yes,only,no" values_sort="false"/>
     4716            <combo key="diet:vegan" text="Vegan" values="yes,only,no" values_sort="false"/>
     4717            <combo key="diet:lacto_vegetarian" text="Lacto-vegetarian" values="yes,only,no" values_sort="false"/>
     4718            <combo key="diet:ovo_vegetarian" text="Ovo-vegetarian" values="yes,only,no" values_sort="false"/>
     4719            <combo key="diet:pescetarian" text="Pescetarian" values="yes,only,no" values_sort="false"/>
     4720            <combo key="diet:fruitarian" text="Fruitarian" values="yes,only,no" values_sort="false"/>
     4721            <combo key="diet:raw" text="Raw" values="yes,only,no" values_sort="false"/>
     4722            <item_separator />
     4723            <combo key="diet:dairy_free" text="Dairy free" values="yes,only,no" values_sort="false"/>
     4724            <combo key="diet:gluten_free" text="Gluten free" values="yes,only,no" values_sort="false"/>
     4725            <combo key="diet:lactose_free" text="Lactose free" values="yes,only,no" values_sort="false"/>
     4726            <item_separator />
     4727            <combo key="diet:halal" text="Halal" values="yes,only,no" values_sort="false"/>
     4728            <combo key="diet:kosher" text="Kosher" values="yes,only,no" values_sort="false"/>
     4729        </item> <!-- Diet -->
    47024730    </group> <!-- Food+Drinks -->
    47034731    <group name="Tourism" icon="presets/sightseeing/attraction.svg">
    47044732        <item name="Attraction" icon="presets/sightseeing/attraction.svg" type="node,closedway,multipolygon" preset_name_label="true">

And since we have 2044 objects with cuisine=vegetarian (being 1167 without diet:vegetarian) + 479 objects with cuisine=vegan (being 314 without diet:vegan), maybe we could also have a new test:

*[cuisine = vegan],
*[cuisine = vegetarian] {
        throwWarning: tr("{0} is discouraged", "{0.tag}");
        suggestAlternative: concat("diet:", "{0.value}", "=yes");
        suggestAlternative: concat("diet:", "{0.value}", "=only");
}

Attachments (0)

Change History (1)

comment:1 Changed 5 months ago by Don-vip

Keywords: cuisine added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to naoliv
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.