commit 7be0828759916e1cb52c671d743eb35f598fc956
parent 0a61267f5ec7670a76023a95e82f1e1ffe27168b
Author: Michael Camilleri <[email protected]>
Date: Wed, 21 Oct 2026 20:21:54 +0900
Simplify rules for POI names
Diffstat
| M | Notes/Design.md | | | 43 | +++++++++++++------------------------------ |
| M | Shared/Capture/ContextCapture.swift | | | 5 | ++--- |
2 files changed, 15 insertions(+), 33 deletions(-)
diff --git a/Notes/Design.md b/Notes/Design.md
@@ -288,9 +288,8 @@ its venue lookups stopped working in Reporter on 2026-09-01, but each answer already held the name and coordinate. Imported places keep their Foursquare venue IDs (3,362 answers). New places use MapKit's `MKMapItem.Identifier`. -A place's `text` is what the user chose. Its directory names (`(language, -text)` pairs) let it be shown in the local language: see -[Place names and languages](#place-names-and-languages). +A place's `text` is what the user chose. Its directory name is kept beside +it as a `(language, text)` pair: see [Place names](#place-names). **Settings → Vocabulary** lists the activities, people and places in use, most used first, where each can be renamed and given a narrative form. A @@ -315,26 +314,16 @@ coordinate centroid for places. It is rebuilt from responses and never synced. Token identity and text are not part of the index: they live in the synced `Token` records. -### Place names and languages +### Place names -The user lists the languages they know in Settings, in order of preference. A -place is shown with: - -1. its name in the local language of the place's country, if the user knows - that language; -2. otherwise, its name in the user's first language; -3. otherwise, whatever name exists. - -The choice is made when a name is shown, not when it's stored, so changing the -language list re-renders all history. Many places only have one name (small -businesses in Japan often have only a Japanese name), so the fallback matters. -A name the user typed or edited is shown as is. - -On-device MapKit returns place names in the app's language only, one language -per process: venue search, nearby search and lookup by ID have no locale -setting. The ID is the same in every language, though, so a place can be -stored with the name seen at answer time and gain names in other languages -later. Reverse geocoding does take a `preferredLocale`. +A place has one name: the one MapKit gave when it was chosen, in the app's +language, or the one the user typed. Renaming it in Settings → Vocabulary +changes it everywhere. Places aren't shown in a list of languages the user +knows: on-device MapKit returns names in the app's language only, and the +Maps Server API that takes a language needs a signed key, which wasn't worth +it once places could be renamed and given narrative forms. The directory's +name and its language are still stored, so a renamed place can be told +apart from one that kept the directory's name. ### Choosing a place @@ -708,8 +697,8 @@ and the full and short addresses. Reverse geocoding uses MapKit's `MKReverseGeocodingRequest` (`CLGeocoder` is deprecated in iOS 26), using `preferredLocale`: once in the user's first language, and again in the place's local language when that differs (worked out from the first result's -country: `ja` for Japan, `zh-Hant` for Taiwan), so the placemark can be shown -by the same rule as place names. Apple throttles geocoding: two requests per +country: `ja` for Japan, `zh-Hant` for Taiwan), so the detail view can show +the address in the place's own language too. Apple throttles geocoding: two requests per report is fine, and **Upgrade Address Format** (see [Behaviour](#behaviour)) looks up older addresses again at the pace it allows. @@ -1090,12 +1079,6 @@ the locale uses for weather. Sleep isn't charted. - **Pre-filling places.** If the report's location is inside a saved place's area, should that place be pre-selected? It would save many taps, but a confirmed default may be weaker data than a deliberate choice. -- **Other-language place names.** Whether to fill in place names in the user's - other languages after answering, through the Apple Maps Server API (which - takes a language parameter, but needs a key), or accept one name per place. - It needs confirming that the Server API uses the same place IDs as MapKit. -- **Lookup language.** Recheck on iOS that lookup by ID ignores the app - language (seen on macOS). - **Multi-select choice questions.** Reporter stores choice answers as arrays, but every answer in the archive has a single value. The survey takes one answer for now.
diff --git a/Shared/Capture/ContextCapture.swift b/Shared/Capture/ContextCapture.swift
@@ -256,9 +256,8 @@ struct ContextCapture: Sendable {
}
/// The fix's address in the user's first language and, where the
- /// place's own language differs, in that language too. Together they let
- /// an address be shown in the local language when the user knows it,
- /// and in their first language otherwise, as place names are. A
+ /// place's own language differs, in that language too, which the detail
+ /// view shows as the endonymic address. A
/// location MapKit has no address for has none; other errors, such as
/// MapKit's throttling, are thrown.
static func placemarks(for location: CLLocation) async throws -> [Placemark] {