Skip to content

#1448 #1458 Support new secondary name for gzmtr and guangdong intercity railway stations#1495

Open
thekingofcity wants to merge 3 commits into
mainfrom
#1448-#1458-Support-new-secondary-name-for-gzmtr-and-guangdong-intercity-railway-stations
Open

#1448 #1458 Support new secondary name for gzmtr and guangdong intercity railway stations#1495
thekingofcity wants to merge 3 commits into
mainfrom
#1448-#1458-Support-new-secondary-name-for-gzmtr-and-guangdong-intercity-railway-stations

Conversation

@thekingofcity

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 secondaryNames for existing Guangdong Intercity Railway station nodes.
  • Introduced a shared SecondaryNameText SVG 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.

Comment thread src/util/save.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

广州地铁第二名称新样式 为 广东城际铁路车站 增加第二名称

3 participants