Skip to content

fix(draft): live game draft tips display in Spanish regardless of active language #355

Description

@aalonsolopez

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

  1. Set the game language to English (or German, French, Italian, Portuguese, Turkish).
  2. Start or load a game and enter a live match draft.
  3. Observe the draft tips panel (Coach tips, player suggestions, and static tips).
  4. 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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions