Repository navigation
Conversation
The location picker queried Mapbox without a language, which answers with each place's local name, so locations were saved as "Warszawa", "Genève" or "京都市" next to English ones. - geocodingUrl() builds every Mapbox geocoding request with language=en (and encodes the query); the picker uses it. - scripts/backfill-place-names.mjs re-geocodes existing locations from their coordinates: dry run by default, --write to apply, paced, and it merges a renamed row into an identical existing one. - The place parser referenced an undefined `address` whenever a result's context held an address; it reads the context entry instead. - PhotonAutocomplete was unused (the issue first blamed it); removed. Fixes #208. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
engleek
force-pushed
the
feat/english-place-names
branch
from
October 3, 2026 16:23
55242c1 to
a0898f2
Compare
This was referenced Oct 3, 2026
Contributor
Author
|
Superseded by #249, which merged this change into main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #208.
The location picker (
PlacesSearch→MapboxAutocomplete) queried Mapbox geocoding without alanguage, so Mapbox answered with each place's local name. Locations were saved as "Warszawa", "Genève" or "京都市", next to English ones.Change
geocodingUrl(query, { token, types })(app/utils/geocoding.js) builds every Mapbox geocoding request withlanguage=en, and encodes the query. It handles reverse lookups too. The picker uses it, so new locations are stored in English.scripts/backfill-place-names.mjsre-geocodes existing locations from their coordinates, in English. Usage is documented in its header:before → after;--writeapplies, and--limit Ndoes a trial run;MAPBOX_TOKENfrom the environment and never hard-codes it;PlacesSearchreferenced an undefinedaddresswhenever a result's context held an address (ReferenceError). It reads the context entry instead.PhotonAutocompletewas unused (the issue first blamed it), so it's removed.Running the backfill
Review the dry run's output before writing. I ran a 3-row dry run locally, and it worked. The seed's coordinates are random, so its renames on seed data mean nothing; on real data, names and coordinates match.
Tests
geocodingUrl(forward and reverse: language, types, encoding) andplaceNames(reads the city and region from the features)./events/create, typing in Location sends a Mapbox request withlanguage=en. The request is mocked, so CI never calls Mapbox. Onmain: it fails (languageis missing).🤖 Generated with Claude Code