feat(tours): find bakeries and groceries on the map and along a hike

A multi-day hike restocks on the way: bread in the morning, food for
lunch and supper every day or two. Neither could be searched for.

- Explore pill: new `bakery` and `supermarket` chips. `supermarket`
  already existed on the server (shop=supermarket|convenience) but no
  pill offered it; `bakery` is new (shop=bakery).
- Along the tour: `bakery` and `supermarket` are offered to a hike,
  after its existing kinds so a new hike still starts on the same three.
- TREK places index: `bakery` maps to food_and_drink>casual_eatery>bakery;
  `supermarket` is narrowed to grocery and convenience stores, since the
  whole food_and_beverage_store branch also brought tobacconists and
  wine shops. Both paths checked against a live answer of the index.
  As the more specific term, a bakery is no longer listed as a place to
  eat when only `food` is asked along a tour.
- Category guess: a bakery or grocer picked from the map was preselected
  as Bar/Cafe or Shopping even where the admin had made a Bakery or
  Groceries category. The guess now looks for such a category first, by
  name in the usual languages or by icon, and keeps the broad one when
  there is none. The category icon picker offers Croissant and
  ShoppingBasket, the icons the map chips use.
- Labels in every locale; MCP tool description names the new kinds.
This commit is contained in:
Sebastian Fischer
2026-11-09 17:41:04 +01:00
committed by Maurice
parent 8023be452a
commit ec78cfbdd0
75 changed files with 267 additions and 11 deletions
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'متاحف وثقافة',
'poi.cat.nature': 'طبيعة وحدائق',
'poi.cat.activities': 'أنشطة',
'poi.cat.bakeries': 'مخابز',
'poi.cat.groceries': 'بقالة',
'poi.pluginCategories': 'فئات من الإضافات الخارجية',
'map.showAllConnections': 'إظهار جميع مسارات الحجوزات',
'map.hideAllConnections': 'إخفاء جميع مسارات الحجوزات',
+2
View File
@@ -731,6 +731,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'مقاهٍ',
'tours.poi.cat.restaurant': 'مطاعم',
'tours.poi.cat.market': 'أسواق',
'tours.poi.cat.bakery': 'مخابز',
'tours.poi.cat.supermarket': 'بقالة',
'tours.walk.station.eyebrow': 'محطة',
'tours.walk.station.unnamed': 'محطة بلا اسم',
'tours.walk.station.name': 'الاسم',
+2
View File
@@ -14,6 +14,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Muzeylər və mədəniyyət',
'poi.cat.nature': 'Təbiət və parklar',
'poi.cat.activities': 'Fəaliyyətlər',
'poi.cat.bakeries': 'Çörəkxanalar',
'poi.cat.groceries': 'Ərzaq mağazaları',
'poi.pluginCategories': 'Plaginlərdən gələn kateqoriyalar',
'map.showAllConnections': 'Bütün rezervasiya marşrutlarını göstər',
+2
View File
@@ -730,6 +730,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kafelər',
'tours.poi.cat.restaurant': 'Yemək yerləri',
'tours.poi.cat.market': 'Bazarlar',
'tours.poi.cat.bakery': 'Çörəkxanalar',
'tours.poi.cat.supermarket': 'Ərzaq mağazaları',
'tours.walk.station.eyebrow': 'Dayanacaq',
'tours.walk.station.unnamed': 'Adsız dayanacaq',
'tours.walk.station.name': 'Ad',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museus e cultura',
'poi.cat.nature': 'Natureza e parques',
'poi.cat.activities': 'Atividades',
'poi.cat.bakeries': 'Padarias',
'poi.cat.groceries': 'Mercados',
'poi.pluginCategories': 'Categorias de plugins',
'map.showAllConnections': 'Mostrar todas as rotas de reservas',
'map.hideAllConnections': 'Ocultar todas as rotas de reservas',
+2
View File
@@ -740,6 +740,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Cafeterias',
'tours.poi.cat.restaurant': 'Lugares para comer',
'tours.poi.cat.market': 'Feiras',
'tours.poi.cat.bakery': 'Padarias',
'tours.poi.cat.supermarket': 'Mercados',
'tours.walk.station.eyebrow': 'Parada',
'tours.walk.station.unnamed': 'Parada sem nome',
'tours.walk.station.name': 'Nome',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museus i cultura',
'poi.cat.nature': 'Natura i parcs',
'poi.cat.activities': 'Activitats',
'poi.cat.bakeries': 'Fleques',
'poi.cat.groceries': 'Botigues de queviures',
'poi.pluginCategories': 'Categories dels connectors',
'map.showAllConnections': 'Mostra totes les rutes de reserva',
'map.hideAllConnections': 'Amaga totes les rutes de reserva',
+2
View File
@@ -744,6 +744,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Cafeteries',
'tours.poi.cat.restaurant': 'Llocs per menjar',
'tours.poi.cat.market': 'Mercats',
'tours.poi.cat.bakery': 'Fleques',
'tours.poi.cat.supermarket': 'Botigues de queviures',
'tours.walk.station.eyebrow': 'Parada',
'tours.walk.station.unnamed': 'Parada sense nom',
'tours.walk.station.name': 'Nom',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Muzea a kultura',
'poi.cat.nature': 'Příroda a parky',
'poi.cat.activities': 'Aktivity',
'poi.cat.bakeries': 'Pekárny',
'poi.cat.groceries': 'Potraviny',
'poi.pluginCategories': 'Kategorie z pluginů',
'map.showAllConnections': 'Zobrazit všechny trasy rezervací',
'map.hideAllConnections': 'Skrýt všechny trasy rezervací',
+2
View File
@@ -725,6 +725,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kavárny',
'tours.poi.cat.restaurant': 'Kde se najíst',
'tours.poi.cat.market': 'Trhy',
'tours.poi.cat.bakery': 'Pekárny',
'tours.poi.cat.supermarket': 'Potraviny',
'tours.walk.station.eyebrow': 'Zastávka',
'tours.walk.station.unnamed': 'Zastávka bez názvu',
'tours.walk.station.name': 'Název',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museen & Kultur',
'poi.cat.nature': 'Natur & Parks',
'poi.cat.activities': 'Aktivitäten',
'poi.cat.bakeries': 'Bäckereien',
'poi.cat.groceries': 'Lebensmittel',
'poi.pluginCategories': 'Kategorien aus Plugins',
'map.showAllConnections': 'Alle Buchungsrouten anzeigen',
'map.hideAllConnections': 'Alle Buchungsrouten ausblenden',
+2
View File
@@ -746,6 +746,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Cafés',
'tours.poi.cat.restaurant': 'Gaststätten',
'tours.poi.cat.market': 'Märkte',
'tours.poi.cat.bakery': 'Bäckereien',
'tours.poi.cat.supermarket': 'Lebensmittel',
'tours.walk.station.eyebrow': 'Station',
'tours.walk.station.unnamed': 'Station ohne Namen',
'tours.walk.station.name': 'Bezeichnung',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museums & culture',
'poi.cat.nature': 'Nature & parks',
'poi.cat.activities': 'Activities',
'poi.cat.bakeries': 'Bakeries',
'poi.cat.groceries': 'Groceries',
'poi.pluginCategories': 'Categories from plugins',
'map.showAllConnections': 'Show all booking routes',
'map.hideAllConnections': 'Hide all booking routes',
+2
View File
@@ -725,6 +725,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Coffee shops',
'tours.poi.cat.restaurant': 'Places to eat',
'tours.poi.cat.market': 'Markets',
'tours.poi.cat.bakery': 'Bakeries',
'tours.poi.cat.supermarket': 'Groceries',
'tours.walk.station.eyebrow': 'Stop',
'tours.walk.station.unnamed': 'Unnamed stop',
'tours.walk.station.name': 'Label',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museos y cultura',
'poi.cat.nature': 'Naturaleza y parques',
'poi.cat.activities': 'Actividades',
'poi.cat.bakeries': 'Panaderías',
'poi.cat.groceries': 'Tiendas de alimentación',
'poi.pluginCategories': 'Categorías de plugins',
'map.showAllConnections': 'Mostrar todas las rutas de reservas',
'map.hideAllConnections': 'Ocultar todas las rutas de reservas',
+2
View File
@@ -741,6 +741,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Cafeterías',
'tours.poi.cat.restaurant': 'Sitios para comer',
'tours.poi.cat.market': 'Mercados',
'tours.poi.cat.bakery': 'Panaderías',
'tours.poi.cat.supermarket': 'Tiendas de alimentación',
'tours.walk.station.eyebrow': 'Parada',
'tours.walk.station.unnamed': 'Parada sin nombre',
'tours.walk.station.name': 'Nombre',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Muuseumid ja kultuur',
'poi.cat.nature': 'Loodus ja pargid',
'poi.cat.activities': 'Tegevused',
'poi.cat.bakeries': 'Pagarid',
'poi.cat.groceries': 'Toidupoed',
'poi.pluginCategories': 'Pluginate kategooriad',
'map.showAllConnections': 'Näita kõiki broneeringute marsruute',
'map.hideAllConnections': 'Peida kõik broneeringute marsruudid',
+2
View File
@@ -728,6 +728,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kohvikud',
'tours.poi.cat.restaurant': 'Söögikohad',
'tours.poi.cat.market': 'Turud',
'tours.poi.cat.bakery': 'Pagarid',
'tours.poi.cat.supermarket': 'Toidupoed',
'tours.walk.station.eyebrow': 'Peatus',
'tours.walk.station.unnamed': 'Nimetu peatus',
'tours.walk.station.name': 'Nimi',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Musées & culture',
'poi.cat.nature': 'Nature & parcs',
'poi.cat.activities': 'Activités',
'poi.cat.bakeries': 'Boulangeries',
'poi.cat.groceries': 'Épiceries',
'poi.pluginCategories': 'Catégories des plugins',
'map.showAllConnections': 'Afficher tous les itinéraires',
'map.hideAllConnections': 'Masquer tous les itinéraires',
+2
View File
@@ -753,6 +753,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Salons de café',
'tours.poi.cat.restaurant': 'Où manger',
'tours.poi.cat.market': 'Marchés',
'tours.poi.cat.bakery': 'Boulangeries',
'tours.poi.cat.supermarket': 'Épiceries',
'tours.walk.station.eyebrow': 'Étape',
'tours.walk.station.unnamed': 'Étape sans nom',
'tours.walk.station.name': 'Intitulé',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Μουσεία & πολιτισμός',
'poi.cat.nature': 'Φύση & πάρκα',
'poi.cat.activities': 'Δραστηριότητες',
'poi.cat.bakeries': 'Αρτοποιεία',
'poi.cat.groceries': 'Παντοπωλεία',
'poi.pluginCategories': 'Κατηγορίες από πρόσθετα',
'map.showAllConnections': 'Εμφάνιση όλων των διαδρομών κρατήσεων',
'map.hideAllConnections': 'Απόκρυψη όλων των διαδρομών κρατήσεων',
+2
View File
@@ -757,6 +757,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Καφετέριες',
'tours.poi.cat.restaurant': 'Μέρη για φαγητό',
'tours.poi.cat.market': 'Αγορές',
'tours.poi.cat.bakery': 'Αρτοποιεία',
'tours.poi.cat.supermarket': 'Παντοπωλεία',
'tours.walk.station.eyebrow': 'Στάση',
'tours.walk.station.unnamed': 'Στάση χωρίς όνομα',
'tours.walk.station.name': 'Όνομα',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'מוזיאונים ותרבות',
'poi.cat.nature': 'טבע ופארקים',
'poi.cat.activities': 'פעילויות',
'poi.cat.bakeries': 'מאפיות',
'poi.cat.groceries': 'מכולות וסופרמרקטים',
'poi.pluginCategories': 'קטגוריות מתוספים',
'map.showAllConnections': 'הצגת כל מסלולי ההזמנות',
'map.hideAllConnections': 'הסתרת כל מסלולי ההזמנות',
+2
View File
@@ -723,6 +723,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'בתי קפה',
'tours.poi.cat.restaurant': 'מקומות לאכול',
'tours.poi.cat.market': 'שווקים',
'tours.poi.cat.bakery': 'מאפיות',
'tours.poi.cat.supermarket': 'מכולות וסופרמרקטים',
'tours.walk.station.eyebrow': 'תחנה',
'tours.walk.station.unnamed': 'תחנה ללא שם',
'tours.walk.station.name': 'שם',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Múzeumok és kultúra',
'poi.cat.nature': 'Természet és parkok',
'poi.cat.activities': 'Programok',
'poi.cat.bakeries': 'Pékségek',
'poi.cat.groceries': 'Élelmiszerboltok',
'poi.pluginCategories': 'Pluginok kategóriái',
'map.showAllConnections': 'Összes foglalási útvonal megjelenítése',
'map.hideAllConnections': 'Összes foglalási útvonal elrejtése',
+2
View File
@@ -739,6 +739,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kávézók',
'tours.poi.cat.restaurant': 'Étkezőhelyek',
'tours.poi.cat.market': 'Piacok',
'tours.poi.cat.bakery': 'Pékségek',
'tours.poi.cat.supermarket': 'Élelmiszerboltok',
'tours.walk.station.eyebrow': 'Megálló',
'tours.walk.station.unnamed': 'Névtelen megálló',
'tours.walk.station.name': 'Megnevezés',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museum & budaya',
'poi.cat.nature': 'Alam & taman',
'poi.cat.activities': 'Aktivitas',
'poi.cat.bakeries': 'Toko roti',
'poi.cat.groceries': 'Toko kelontong',
'poi.pluginCategories': 'Kategori dari plugin',
'map.showAllConnections': 'Tampilkan semua rute pemesanan',
'map.hideAllConnections': 'Sembunyikan semua rute pemesanan',
+2
View File
@@ -737,6 +737,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kedai kopi',
'tours.poi.cat.restaurant': 'Tempat makan',
'tours.poi.cat.market': 'Pasar',
'tours.poi.cat.bakery': 'Toko roti',
'tours.poi.cat.supermarket': 'Toko kelontong',
'tours.walk.station.eyebrow': 'Titik singgah',
'tours.walk.station.unnamed': 'Titik tanpa nama',
'tours.walk.station.name': 'Nama',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Musei e cultura',
'poi.cat.nature': 'Natura e parchi',
'poi.cat.activities': 'Attività',
'poi.cat.bakeries': 'Panetterie',
'poi.cat.groceries': 'Alimentari',
'poi.pluginCategories': 'Categorie dai plugin',
'map.showAllConnections': 'Mostra tutti i percorsi prenotati',
'map.hideAllConnections': 'Nascondi tutti i percorsi prenotati',
+2
View File
@@ -745,6 +745,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Caffetterie',
'tours.poi.cat.restaurant': 'Dove mangiare',
'tours.poi.cat.market': 'Mercati',
'tours.poi.cat.bakery': 'Panetterie',
'tours.poi.cat.supermarket': 'Alimentari',
'tours.walk.station.eyebrow': 'Tappa',
'tours.walk.station.unnamed': 'Tappa senza nome',
'tours.walk.station.name': 'Denominazione',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': '美術館・文化施設',
'poi.cat.nature': '自然・公園',
'poi.cat.activities': 'アクティビティ',
'poi.cat.bakeries': 'パン屋',
'poi.cat.groceries': '食料品店',
'poi.pluginCategories': 'プラグインのカテゴリ',
'map.showAllConnections': 'すべての予約ルートを表示',
'map.hideAllConnections': 'すべての予約ルートを非表示',
+2
View File
@@ -716,6 +716,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'カフェ',
'tours.poi.cat.restaurant': '食事処',
'tours.poi.cat.market': '市場',
'tours.poi.cat.bakery': 'パン屋',
'tours.poi.cat.supermarket': '食料品店',
'tours.walk.station.eyebrow': '立ち寄り先',
'tours.walk.station.unnamed': '名前のない立ち寄り先',
'tours.walk.station.name': '名前',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': '박물관 & 문화',
'poi.cat.nature': '자연 & 공원',
'poi.cat.activities': '액티비티',
'poi.cat.bakeries': '빵집',
'poi.cat.groceries': '식료품점',
'poi.pluginCategories': '플러그인 카테고리',
'map.showAllConnections': '모든 예약 경로 표시',
'map.hideAllConnections': '모든 예약 경로 숨기기',
+2
View File
@@ -711,6 +711,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': '카페',
'tours.poi.cat.restaurant': '식당',
'tours.poi.cat.market': '시장',
'tours.poi.cat.bakery': '빵집',
'tours.poi.cat.supermarket': '식료품점',
'tours.walk.station.eyebrow': '정류지',
'tours.walk.station.unnamed': '이름 없는 정류지',
'tours.walk.station.name': '이름',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Musea & cultuur',
'poi.cat.nature': 'Natuur & parken',
'poi.cat.activities': 'Activiteiten',
'poi.cat.bakeries': 'Bakkerijen',
'poi.cat.groceries': 'Supermarkten',
'poi.pluginCategories': 'Categorieën uit plugins',
'map.showAllConnections': 'Alle boekingsroutes tonen',
'map.hideAllConnections': 'Alle boekingsroutes verbergen',
+2
View File
@@ -742,6 +742,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Koffiezaken',
'tours.poi.cat.restaurant': 'Eetgelegenheden',
'tours.poi.cat.market': 'Markten',
'tours.poi.cat.bakery': 'Bakkerijen',
'tours.poi.cat.supermarket': 'Supermarkten',
'tours.walk.station.eyebrow': 'Halte',
'tours.walk.station.unnamed': 'Halte zonder naam',
'tours.walk.station.name': 'Benaming',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Muzea i kultura',
'poi.cat.nature': 'Przyroda i parki',
'poi.cat.activities': 'Aktywności',
'poi.cat.bakeries': 'Piekarnie',
'poi.cat.groceries': 'Sklepy spożywcze',
'poi.pluginCategories': 'Kategorie z wtyczek',
'map.showAllConnections': 'Pokaż wszystkie trasy rezerwacji',
'map.hideAllConnections': 'Ukryj wszystkie trasy rezerwacji',
+2
View File
@@ -746,6 +746,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kawiarnie',
'tours.poi.cat.restaurant': 'Gdzie zjeść',
'tours.poi.cat.market': 'Targi',
'tours.poi.cat.bakery': 'Piekarnie',
'tours.poi.cat.supermarket': 'Sklepy spożywcze',
'tours.walk.station.eyebrow': 'Przystanek',
'tours.walk.station.unnamed': 'Przystanek bez nazwy',
'tours.walk.station.name': 'Nazwa',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Музеи и культура',
'poi.cat.nature': 'Природа и парки',
'poi.cat.activities': 'Развлечения',
'poi.cat.bakeries': 'Пекарни',
'poi.cat.groceries': 'Продуктовые магазины',
'poi.pluginCategories': 'Категории из плагинов',
'map.showAllConnections': 'Показать все маршруты бронирований',
'map.hideAllConnections': 'Скрыть все маршруты бронирований',
+2
View File
@@ -749,6 +749,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Кафе',
'tours.poi.cat.restaurant': 'Где поесть',
'tours.poi.cat.market': 'Рынки',
'tours.poi.cat.bakery': 'Пекарни',
'tours.poi.cat.supermarket': 'Продуктовые магазины',
'tours.walk.station.eyebrow': 'Остановка',
'tours.walk.station.unnamed': 'Остановка без названия',
'tours.walk.station.name': 'Название',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Múzeá a kultúra',
'poi.cat.nature': 'Príroda a parky',
'poi.cat.activities': 'Aktivity',
'poi.cat.bakeries': 'Pekárne',
'poi.cat.groceries': 'Potraviny',
'poi.pluginCategories': 'Kategórie z pluginov',
'map.showAllConnections': 'Zobraziť všetky trasy rezervácií',
'map.hideAllConnections': 'Skryť všetky trasy rezervácií',
+2
View File
@@ -727,6 +727,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kaviarne',
'tours.poi.cat.restaurant': 'Kde sa najesť',
'tours.poi.cat.market': 'Trhy',
'tours.poi.cat.bakery': 'Pekárne',
'tours.poi.cat.supermarket': 'Potraviny',
'tours.walk.station.eyebrow': 'Zastávka',
'tours.walk.station.unnamed': 'Zastávka bez názvu',
'tours.walk.station.name': 'Názov',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museer och kultur',
'poi.cat.nature': 'Natur och parker',
'poi.cat.activities': 'Aktiviteter',
'poi.cat.bakeries': 'Bagerier',
'poi.cat.groceries': 'Livsmedelsbutiker',
'poi.pluginCategories': 'Kategorier från tillägg',
'map.showAllConnections': 'Visa alla bokningsvägar',
'map.hideAllConnections': 'Dölj alla bokningsvägar',
+2
View File
@@ -724,6 +724,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kaféer',
'tours.poi.cat.restaurant': 'Matställen',
'tours.poi.cat.market': 'Torghandel',
'tours.poi.cat.bakery': 'Bagerier',
'tours.poi.cat.supermarket': 'Livsmedelsbutiker',
'tours.walk.station.eyebrow': 'Stopp',
'tours.walk.station.unnamed': 'Namnlöst stopp',
'tours.walk.station.name': 'Benämning',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'พิพิธภัณฑ์และวัฒนธรรม',
'poi.cat.nature': 'ธรรมชาติและอุทยาน',
'poi.cat.activities': 'กิจกรรม',
'poi.cat.bakeries': 'ร้านเบเกอรี่',
'poi.cat.groceries': 'ร้านขายของชำ',
'poi.pluginCategories': 'หมวดหมู่จากปลั๊กอิน',
'map.showAllConnections': 'แสดงเส้นทางการจองทั้งหมด',
'map.hideAllConnections': 'ซ่อนเส้นทางการจองทั้งหมด',
+2
View File
@@ -702,6 +702,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'ร้านกาแฟ',
'tours.poi.cat.restaurant': 'ร้านอาหาร',
'tours.poi.cat.market': 'ตลาด',
'tours.poi.cat.bakery': 'ร้านเบเกอรี่',
'tours.poi.cat.supermarket': 'ร้านขายของชำ',
'tours.walk.station.eyebrow': 'จุดแวะ',
'tours.walk.station.unnamed': 'จุดแวะที่ไม่มีชื่อ',
'tours.walk.station.name': 'ชื่อ',
+1 -1
View File
@@ -20,7 +20,7 @@ const toursModules = import.meta.glob<{ default: TranslationStrings }>('./*/tour
const TOUR_DOMAINS: { file: string; generalKeyCount: number; modules: DomainModules }[] = [
{
file: 'tours',
generalKeyCount: 1357,
generalKeyCount: 1359,
modules: toursModules,
},
{
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Müzeler ve kültür',
'poi.cat.nature': 'Doğa ve parklar',
'poi.cat.activities': 'Aktiviteler',
'poi.cat.bakeries': 'Fırınlar',
'poi.cat.groceries': 'Marketler',
'poi.pluginCategories': 'Eklentilerden gelen kategoriler',
'map.showAllConnections': 'Tüm rezervasyon rotalarını göster',
'map.hideAllConnections': 'Tüm rezervasyon rotalarını gizle',
+2
View File
@@ -729,6 +729,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Kafeler',
'tours.poi.cat.restaurant': 'Yemek yerleri',
'tours.poi.cat.market': 'Pazarlar',
'tours.poi.cat.bakery': 'Fırınlar',
'tours.poi.cat.supermarket': 'Marketler',
'tours.walk.station.eyebrow': 'Durak',
'tours.walk.station.unnamed': 'Adsız durak',
'tours.walk.station.name': 'Ad',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Музеї та культура',
'poi.cat.nature': 'Природа та парки',
'poi.cat.activities': 'Активності',
'poi.cat.bakeries': 'Пекарні',
'poi.cat.groceries': 'Продуктові магазини',
'poi.pluginCategories': 'Категорії з плагінів',
'map.showAllConnections': 'Показати всі маршрути бронювань',
'map.hideAllConnections': 'Приховати всі маршрути бронювань',
+2
View File
@@ -743,6 +743,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': "Кав'ярні",
'tours.poi.cat.restaurant': 'Де поїсти',
'tours.poi.cat.market': 'Ринки',
'tours.poi.cat.bakery': 'Пекарні',
'tours.poi.cat.supermarket': 'Продуктові магазини',
'tours.walk.station.eyebrow': 'Зупинка',
'tours.walk.station.unnamed': 'Зупинка без назви',
'tours.walk.station.name': 'Назва',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Bảo tàng & văn hóa',
'poi.cat.nature': 'Thiên nhiên & công viên',
'poi.cat.activities': 'Các hoạt động',
'poi.cat.bakeries': 'Tiệm bánh',
'poi.cat.groceries': 'Cửa hàng tạp hóa',
'poi.pluginCategories': 'Danh mục từ plugin',
'map.showAllConnections': 'Hiển thị tất cả lộ trình đặt chỗ',
'map.hideAllConnections': 'Ẩn tất cả lộ trình đặt chỗ',
+2
View File
@@ -728,6 +728,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': 'Quán cà phê',
'tours.poi.cat.restaurant': 'Chỗ ăn uống',
'tours.poi.cat.market': 'Chợ',
'tours.poi.cat.bakery': 'Tiệm bánh',
'tours.poi.cat.supermarket': 'Cửa hàng tạp hóa',
'tours.walk.station.eyebrow': 'Điểm dừng',
'tours.walk.station.unnamed': 'Điểm dừng chưa đặt tên',
'tours.walk.station.name': 'Tên',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': '博物館與文化',
'poi.cat.nature': '自然與公園',
'poi.cat.activities': '活動',
'poi.cat.bakeries': '麵包店',
'poi.cat.groceries': '超市與便利商店',
'poi.pluginCategories': '來自外掛的分類',
'map.showAllConnections': '顯示所有預訂路線',
'map.hideAllConnections': '隱藏所有預訂路線',
+2
View File
@@ -676,6 +676,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': '咖啡館',
'tours.poi.cat.restaurant': '餐館',
'tours.poi.cat.market': '市集',
'tours.poi.cat.bakery': '麵包店',
'tours.poi.cat.supermarket': '超市與便利商店',
'tours.walk.station.eyebrow': '站點',
'tours.walk.station.unnamed': '未命名站點',
'tours.walk.station.name': '名稱',
+2
View File
@@ -13,6 +13,8 @@ const map: TranslationStrings = {
'poi.cat.museums': '博物馆与文化',
'poi.cat.nature': '自然与公园',
'poi.cat.activities': '活动',
'poi.cat.bakeries': '面包店',
'poi.cat.groceries': '超市和便利店',
'poi.pluginCategories': '来自插件的分类',
'map.showAllConnections': '显示所有预订路线',
'map.hideAllConnections': '隐藏所有预订路线',
+2
View File
@@ -677,6 +677,8 @@ const tours: TranslationStrings = {
'tours.poi.cat.cafe': '咖啡馆',
'tours.poi.cat.restaurant': '餐馆',
'tours.poi.cat.market': '集市',
'tours.poi.cat.bakery': '面包店',
'tours.poi.cat.supermarket': '超市和便利店',
'tours.walk.station.eyebrow': '站点',
'tours.walk.station.unnamed': '未命名站点',
'tours.walk.station.name': '名称',
+20
View File
@@ -59,4 +59,24 @@ describe('place kind and category guess', () => {
expect(categoryIdForKind('lodging', seeded)).toBe(1);
expect(categoryIdForKind('nature', seeded)).toBe(9);
});
it('SHARED-PLACEKIND-008: a bakery or a grocer finds a category of its own before the broad one', () => {
const resupply = [
...seeded,
{ id: 11, name: 'Bäckerei', icon: 'Croissant' },
{ id: 12, name: 'Lebensmittel', icon: 'ShoppingBasket' },
];
expect(guessCategoryId({ category: 'bakery' }, resupply)).toBe(11);
expect(guessCategoryId({ category: 'food_and_drink>casual_eatery>bakery' }, resupply)).toBe(11);
expect(guessCategoryId({ category: 'supermarket' }, resupply)).toBe(12);
expect(guessCategoryId({ category: 'shopping>convenience_store' }, resupply)).toBe(12);
expect(guessCategoryId({ types: ['grocery_or_supermarket', 'store'] }, resupply)).toBe(12);
expect(guessCategoryId({ category: 'bakery' }, [{ id: 13, name: 'Brot', icon: '🥖' }])).toBe(13);
expect(guessCategoryId({ category: 'shop_clothes' }, resupply)).toBe(4);
});
it('SHARED-PLACEKIND-009: without such a category a bakery and a grocer keep the broad one', () => {
expect(guessCategoryId({ category: 'bakery' }, seeded)).toBe(7);
expect(guessCategoryId({ category: 'supermarket' }, seeded)).toBe(4);
});
});
+50 -1
View File
@@ -202,10 +202,59 @@ export function categoryIdForKind(kind: PlaceKind | null, categories: readonly P
return byIcon ? byIcon.id : null;
}
/**
* Narrower categories a trip may keep beside the broad kinds: a resupply stop on a
* hike is filed under its own category when the admin made one, and under the
* broad kind's (Bar/Cafe, Shopping) otherwise. Matched like KIND_CATEGORY.
*/
const SPECIFIC_CATEGORIES: ReadonlyArray<{
terms: readonly string[];
names: readonly string[];
icons: readonly string[];
}> = [
{
terms: ['bakery'],
names: ['bakery', 'bäckerei', 'boulangerie', 'panadería', 'panaderia', 'panetteria', 'bakkerij'],
icons: ['🥖', '🥐', '🍞', 'Croissant'],
},
{
terms: ['supermarket', 'convenience', 'grocery', 'greengrocer'],
names: [
'grocer',
'supermarket',
'lebensmittel',
'supermarkt',
'épicerie',
'epicerie',
'supermarché',
'supermercado',
'alimentación',
'alimentari',
'supermercato',
],
icons: ['🛒', '🧺', 'ShoppingBasket', 'ShoppingCart'],
},
];
function specificCategoryId(result: Record<string, unknown>, categories: readonly PlaceKindCategory[]): number | null {
const terms = resultTerms(result);
for (const { terms: words, names, icons } of SPECIFIC_CATEGORIES) {
if (!terms.some((term) => words.some((word) => term.includes(word)))) continue;
const byName = categories.find((category) => {
const name = (category.name || '').toLowerCase();
return names.some((word) => name.includes(word));
});
if (byName) return byName.id;
const byIcon = categories.find((category) => category.icon != null && icons.includes(category.icon));
if (byIcon) return byIcon.id;
}
return null;
}
/** The trip category a picked search result most likely belongs in (#2282), or null. */
export function guessCategoryId(
result: Record<string, unknown>,
categories: readonly PlaceKindCategory[],
): number | null {
return categoryIdForKind(kindOfResult(result), categories);
return specificCategoryId(result, categories) ?? categoryIdForKind(kindOfResult(result), categories);
}
+2
View File
@@ -20,6 +20,8 @@ export const TOUR_POI_CATEGORIES = [
'restaurant',
'market',
'ebike_charging',
'bakery',
'supermarket',
] as const;
export const tourPoiCategorySchema = z.enum(TOUR_POI_CATEGORIES);
export type TourPoiCategory = z.infer<typeof tourPoiCategorySchema>;
@@ -153,6 +153,19 @@ describe('e-bike charging along a bike tour (BIK-07)', () => {
});
});
describe('resupply along a hike', () => {
it('is offered to a hike after its first three, and to no other tour', () => {
expect(TOUR_POI_CATEGORIES_BY_TYPE.hike.slice(0, 3)).toEqual(['viewpoint', 'shelter', 'drinking_water']);
for (const category of ['bakery', 'supermarket'] as const) {
expect(TOUR_POI_CATEGORIES_BY_TYPE.hike).toContain(category);
for (const [type, categories] of Object.entries(TOUR_POI_CATEGORIES_BY_TYPE))
if (type !== 'hike') expect(categories).not.toContain(category);
}
const search = { tour_type: 'hike', categories: ['bakery', 'supermarket'], corridor_m: 1000, line };
expect(tourPoiSearchRequestSchema.safeParse(search).success).toBe(true);
});
});
describe('city walk themes (CW-05)', () => {
it('offers four themes, each a search a walk may ask for', () => {
expect(WALK_THEME_KEYS).toEqual(['culture', 'parks', 'food', 'mixed']);
+14 -1
View File
@@ -22,7 +22,20 @@ export {
/** The categories each planned tour type offers, the most asked first. */
export const TOUR_POI_CATEGORIES_BY_TYPE: Record<PlannableTourType, readonly TourPoiCategory[]> = {
hike: ['viewpoint', 'shelter', 'drinking_water', 'food', 'peak', 'toilets', 'picnic', 'campsite', 'sights'],
// Resupply on a multi-day hike last, so a new hike still starts on the first three.
hike: [
'viewpoint',
'shelter',
'drinking_water',
'food',
'peak',
'toilets',
'picnic',
'campsite',
'sights',
'bakery',
'supermarket',
],
// BIK-07: e-bike charging after the first three, so a new bike tour still starts on those.
bike: [
'drinking_water',