Skip to content

Localization: add first-launch language selection and persistent locale settings #42

Description

@Codewriter90x

Summary

Add a first-launch language selection flow and persist the player's chosen locale. The selected language must remain changeable from Settings.

The goal is to make HitTheKit understandable from the first screen and establish a reliable localization foundation for international players.

Initial languages

  • English (en)
  • Italiano (it)
  • Deutsch (de)
  • Español (es)
  • Français (fr)
  • Română (ro)

Language names should be displayed in their native form. Do not use flags as language selectors.

First-launch experience

On the first launch:

  1. detect the operating-system locale when it matches a supported language;
  2. preselect that language, otherwise preselect English;
  3. show a clear language-selection screen before entering the main experience;
  4. require an explicit confirmation from the player;
  5. persist only the stable locale code;
  6. continue to the normal application flow.

On later launches, skip this screen and use the saved locale.

Existing installations without a saved locale should be treated as a first launch for this preference, without resetting unrelated settings or progress.

Settings behavior

Add a language selector under Settings → Language.

Changing the language should:

  • update the visible interface immediately when technically safe;
  • otherwise show a clear message that the change applies after reopening the current screen;
  • preserve all unrelated settings and progress;
  • remain effective after restarting the application.

The selector must be usable with mouse, keyboard, and the application's supported drum-navigation input.

Localization contract

  • English is the explicit fallback locale.
  • Missing translations must fall back to the English source string rather than displaying an empty label or localization key.
  • UI components must not contain new player-facing hardcoded strings outside the localization system.
  • Unknown or invalid saved locale codes must fail safely to English.
  • Text rendering must support accents and Romanian diacritics correctly.
  • Layouts must tolerate text expansion, with particular attention to German labels.

Acceptance criteria

  • A clean installation opens the language-selection screen before the main menu.
  • The supported system locale is preselected; unsupported locales preselect English.
  • The user can choose and confirm any of the six initial locales.
  • The confirmed locale is persisted and restored on the next launch.
  • The language can be changed later from Settings.
  • The interface never displays an empty string or raw localization key when a translation is missing.
  • An invalid persisted locale falls back deterministically to English.
  • Existing progress and settings are not reset by the migration.
  • Selection and confirmation work with mouse and keyboard; drum-navigation behavior is covered where available.
  • Automated tests cover first launch, system-locale preselection, persistence, relaunch, settings changes, migration, and fallback behavior.
  • Representative screens are visually checked in all six languages at the supported desktop resolutions.

Translation quality boundary

This issue establishes the complete locale-selection and persistence behavior. It does not authorize unreviewed machine-generated translations to be treated as final copy.

Each language may be completed or proofread in follow-up contributions. Incomplete translations must remain visible through the English fallback until reviewed.

Out of scope

  • automatic translation services;
  • account or cloud synchronization;
  • changing gameplay timing or scoring;
  • redesigning unrelated screens;
  • using country flags to represent languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions