Bug Description
During live game drafts, the draft tips panel displays text in Spanish even when the game language is set to English (or any other supported language). This affects both coach-generated dynamic tips and static fallback tips.
Root Cause
Two independent problems in src/ui-v2/_legacy/components/match/ChampionDraft.tsx:
1. Hardcoded Spanish defaultValue in t() calls (dynamic tips)
The match.draft.phrases.playerFlexible key has Spanish hardcoded as defaultValue:
- Line 2257:
t("match.draft.phrases.playerFlexible", "No tengo prioridades para el pick. Me puedo adaptar al equipo.")
- Line 2408:
t("match.draft.phrases.playerFlexible", "Sin información de draft. Sugerencia: podemos priorizar picks seguros o adaptarnos al draft enemigo.")
The key match.draft.phrases.playerFlexible does not exist in any locale JSON file. i18next falls back to the defaultValue string, which is Spanish. This means all non-Spanish languages see Spanish text for these tips.
2. Phrase keys not registered in locale JSON files
The dynamic tip phrases use the uniquePhrase() helper which calls t() with keys like match.draft.phrases.coachBan.0, match.draft.phrases.playerCounterPick.2, etc. These keys do not exist in any locale file. The English templates from the component's phrase arrays (e.g. COACH_BAN_PHRASES, PLAYER_COUNTER_PICK_PHRASES) are passed as defaultValue, so they work correctly — but only because the templates are in English. There is no way to localize these without adding the keys to each locale file.
Steps to Reproduce
- Set the game language to English (or German, French, Italian, Portuguese, Turkish).
- Start or load a game and enter a live match draft.
- Observe the draft tips panel (Coach tips, player suggestions, and static tips).
- Notice text in Spanish mixed with the expected language.
Expected Behavior
- Draft tips should display in the language selected by the player across all 8 supported languages.
defaultValue strings should be in English (acting as neutral fallback), with proper i18n JSON entries for each supported language.
Files Affected
src/ui-v2/_legacy/components/match/ChampionDraft.tsx — hardcoded Spanish defaultValue strings and dynamic phrase pools
src/i18n/locales/*.json — missing match.draft.phrases.playerFlexible and match.draft.phrases.coachBan.* / match.draft.phrases.playerCounterPick.* / match.draft.phrases.playerComfortPick.* / match.draft.phrases.playerBanRequest.* / match.draft.phrases.playerSmartCounterPick.* keys for all 8 languages
Labels
bug, i18n, multileague
Bug Description
During live game drafts, the draft tips panel displays text in Spanish even when the game language is set to English (or any other supported language). This affects both coach-generated dynamic tips and static fallback tips.
Root Cause
Two independent problems in
src/ui-v2/_legacy/components/match/ChampionDraft.tsx:1. Hardcoded Spanish
defaultValueint()calls (dynamic tips)The
match.draft.phrases.playerFlexiblekey has Spanish hardcoded asdefaultValue:t("match.draft.phrases.playerFlexible", "No tengo prioridades para el pick. Me puedo adaptar al equipo.")t("match.draft.phrases.playerFlexible", "Sin información de draft. Sugerencia: podemos priorizar picks seguros o adaptarnos al draft enemigo.")The key
match.draft.phrases.playerFlexibledoes not exist in any locale JSON file. i18next falls back to thedefaultValuestring, which is Spanish. This means all non-Spanish languages see Spanish text for these tips.2. Phrase keys not registered in locale JSON files
The dynamic tip phrases use the
uniquePhrase()helper which callst()with keys likematch.draft.phrases.coachBan.0,match.draft.phrases.playerCounterPick.2, etc. These keys do not exist in any locale file. The English templates from the component's phrase arrays (e.g.COACH_BAN_PHRASES,PLAYER_COUNTER_PICK_PHRASES) are passed asdefaultValue, so they work correctly — but only because the templates are in English. There is no way to localize these without adding the keys to each locale file.Steps to Reproduce
Expected Behavior
defaultValuestrings should be in English (acting as neutral fallback), with proper i18n JSON entries for each supported language.Files Affected
src/ui-v2/_legacy/components/match/ChampionDraft.tsx— hardcoded SpanishdefaultValuestrings and dynamic phrase poolssrc/i18n/locales/*.json— missingmatch.draft.phrases.playerFlexibleandmatch.draft.phrases.coachBan.*/match.draft.phrases.playerCounterPick.*/match.draft.phrases.playerComfortPick.*/match.draft.phrases.playerBanRequest.*/match.draft.phrases.playerSmartCounterPick.*keys for all 8 languagesLabels
bug, i18n, multileague