feat(places): send a search to Google, once or always

Since 4.3.0 the TREK index and OpenStreetMap answer every search first and
Google is only asked when they find nothing, so a list with the wrong place
on it never reached Google, whatever key the instance had, and the provider
choice only decided who fills the empty case.

Two ways to change that, both only where Google holds the key slot. Under a
result list that did not come from Google, one quiet line sends the same
query to Google Places alone (`provider: 'google'` on the search contract,
the MCP search tool takes it too). And beside the key, an admin switch
"Search with Google only" hands every search and every suggestion to Google
and asks nothing of the index or OpenStreetMap; off by default, read by the
search after the keyed provider so an install without a key, or one on Amap
or OpenStreetMap, is untouched. The panel says so beside the switch.

Both shells share the one rule for when the line is offered (placeSource),
and the wiki names both switches.
This commit is contained in:
Maurice
2026-09-21 22:14:44 +02:00
parent 11b1399b5c
commit e12ae950df
70 changed files with 525 additions and 39 deletions
+3
View File
@@ -214,6 +214,9 @@ const admin: TranslationStrings = {
'admin.placesEnrich.title': '장소 정보 보강',
'admin.placesEnrich.subtitle':
'장소를 추가할 때 사진과 설명을 표시합니다. Wikipedia와 OpenStreetMap은 항상 사용되며, 장소 사진 또는 장소 세부정보가 켜져 있으면 Google도 함께 사용됩니다.',
'admin.placesGoogleOnly.title': 'Google로만 검색',
'admin.placesGoogleOnly.subtitle': '모든 검색과 제안이 Google Places로 갑니다. 끄면 TREK 자체 색인과 OpenStreetMap이 먼저 답하고, 둘 다 찾지 못할 때만 Google에 묻습니다.',
'admin.placesGoogleOnly.missingKey': 'Google Maps API 키가 필요합니다. 키가 없으면 이 스위치와 상관없이 TREK 색인과 OpenStreetMap으로 검색합니다.',
'admin.transitProvider.title': '대중교통 제공자',
'admin.transitProvider.subtitle': '대중교통 검색에 응답하는 서비스입니다.',
'admin.transitProvider.transitous': 'Transitous (무료)',
+1
View File
@@ -88,6 +88,7 @@ const places: TranslationStrings = {
'places.reservationNotesPlaceholder': '예약 메모, 확인 번호...',
'places.mapsSearchPlaceholder': '장소 검색...',
'places.mapsSearchError': '장소 검색 실패.',
'places.searchGoogleInstead': '찾는 장소가 아닌가요? Google에서 검색',
'places.loadingDetails': '장소 상세 정보 불러오는 중…',
'places.osmHint':
'OpenStreetMap 검색 사용 중 (사진, 영업 시간, 평점 없음). 전체 정보를 위해 설정에서 Google API 키를 추가하세요.',