Skip to content

Fix localized built-in track names in multiplayer room options#116

Open
wangru2025 wants to merge 1 commit into
diamondStar35:mainfrom
wangru2025:fix/multiplayer-track-name-localization
Open

Fix localized built-in track names in multiplayer room options#116
wangru2025 wants to merge 1 commit into
diamondStar35:mainfrom
wangru2025:fix/multiplayer-track-name-localization

Conversation

@wangru2025
Copy link
Copy Markdown
Contributor

What changed

  • Updated multiplayer room track selection so built-in tracks are stored by track key instead of storing the current English display name.
  • Kept the menu label behavior unchanged while allowing the selected track text to resolve through the existing localized track display lookup.
  • Added a regression test covering localized built-in track display resolution for multiplayer room track selection.

Why

In multiplayer room options, the initial built-in track display could be localized, but selecting a built-in track from the track menu stored the raw English display name. That caused the room option announcement to switch from localized text, for example 美国, back to America.

This now matches the single race and time trial track selection pattern, where the menu item can display the track name but the selected value is stored by key and formatted later.

Verification

  • dotnet build top_speed_net/TopSpeed.Tests/TopSpeed.Tests.csproj -c Debug --no-restore
  • dotnet test top_speed_net/TopSpeed.Tests/TopSpeed.Tests.csproj -c Debug --no-build --filter RoomTrackSelection_ShouldTranslateBuiltInTrackKey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant