Replace hardcoded English strings with localization keys in menu components#10441
Open
Higamato wants to merge 4 commits intoFacepunch:masterfrom
Open
Replace hardcoded English strings with localization keys in menu components#10441Higamato wants to merge 4 commits intoFacepunch:masterfrom
Higamato wants to merge 4 commits intoFacepunch:masterfrom
Conversation
…onents Extracted 15 hardcoded UI strings from 7 razor files under Components/New/ and replaced them with #menu.* localization keys. Updated files: - Navbar: hover menu items (Discover, Favourites, Search) - GameCard: "Invalid Package", "Unrated", package not found message - AchievementDeck/Summary: empty state message, "of" separator - LiveLobbies: "Quick Join" label - LiveLobbyCard: context menu options (Join Game, View Game Details, etc.) - News: "Latest Update" label, loading placeholders Added 11 new keys to en/menu.json and provided Turkish translations in tr/menu.json. Also restructured tr/menu.json to match en/menu.json key ordering.
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.
Summary
Replace hardcoded English strings with localization keys (
#menu.*) across 7 razor files inComponents/New/. Added 11 new keys toen/menu.jsonwith Turkish translations intr/menu.json, and restructured the Turkish translation file to match the English key ordering.Motivation & Context
Several UI strings in the menu components (Navbar hover menu, GameCard, AchievementDeck, LiveLobbies, LiveLobbyCard, News) were hardcoded in English, making them untranslatable for non-English users. This PR extends the existing
#menu.*localization pattern already used in Navbar to cover all remaining user-facing strings in theComponents/New/directory.Fixes:
Implementation Details
#keyprefix localization system (resolved byLabel.cs→Language.GetPhrase())#menu.*directly as text content or attribute values@codeblocks (e.g.GameCard.VotePercentage(),LiveLobbyCard.OpenContextMenu()) also use#menu.*— these work because the values are passed to Label/Button components that handle the#prefix resolutionmenu.achievements.ofis translated as/in Turkish since "3 of 10" reads more naturally as "3 / 10" in Turkish UI contexttr/menu.jsonwas restructured to matchen/menu.jsonkey ordering for easier maintenanceScreenshots / Videos (if applicable)
N/A
Checklist