#1448 #1458 Support new secondary name for gzmtr and guangdong intercity railway stations#1495
Open
thekingofcity wants to merge 3 commits into
Conversation
added 3 commits
June 18, 2026 12:09
…zmtr-and-guangdong-intercity-railway-stations
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for a new “secondary name” field for GZMTR and Guangdong Intercity Railway stations, including persistence via save-version upgrades and UI/i18n support.
Changes:
- Bumped save format to v77 and added an upgrade step to backfill
secondaryNamesfor existing Guangdong Intercity Railway station nodes. - Introduced a shared
SecondaryNameTextSVG component and refactored GZMTR station renderers to use it. - Added secondary-name rendering + attribute editing for Guangdong Intercity Railway stations, plus translations and new unit tests.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/util/save.ts | Bumps save version to 77 and adds a v76→v77 upgrade to initialize secondaryNames for Guangdong Intercity Railway stations. |
| src/util/save.test.ts | Adds a unit test covering the v76→v77 upgrade behavior. |
| src/i18n/translations/zh-Hant.json | Adds labels for Guangdong Intercity Railway secondary-name inputs. |
| src/i18n/translations/zh-Hans.json | Adds labels for Guangdong Intercity Railway secondary-name inputs. |
| src/i18n/translations/ko.json | Adds labels for Guangdong Intercity Railway secondary-name inputs. |
| src/i18n/translations/ja.json | Adds labels for Guangdong Intercity Railway secondary-name inputs. |
| src/i18n/translations/en.json | Adds labels for Guangdong Intercity Railway secondary-name inputs. |
| src/components/svgs/stations/secondary-name.tsx | New shared SVG component to render secondary names with different layouts depending on language availability. |
| src/components/svgs/stations/secondary-name.test.tsx | Unit tests for SecondaryNameText layout behavior. |
| src/components/svgs/stations/gzmtr-int.tsx | Refactors secondary-name rendering to use SecondaryNameText. |
| src/components/svgs/stations/gzmtr-int-2024.tsx | Refactors secondary-name rendering to use SecondaryNameText. |
| src/components/svgs/stations/gzmtr-basic.tsx | Refactors secondary-name rendering to use SecondaryNameText. |
| src/components/svgs/stations/guangdong-intercity-railway.tsx | Adds secondaryNames attribute, renders secondary names, and exposes two new fields in the details panel. |
| src/components/svgs/stations/guangdong-intercity-railway.test.tsx | Adds layout/positioning tests for Guangdong Intercity Railway secondary-name rendering. |
langonginc
approved these changes
Jun 22, 2026
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.
No description provided.