The click dispatcher only lets a short list of actions through while there
is no game yet, so picking a language on a fresh title screen did nothing.
The test now clicks the button instead of calling the action.
- Badges that react to sharks, anchors, crocodiles and llamas read the
English text of the incident again, so they unlock in every language.
- Scenario names are looked up when shown, so they follow a language switch.
- Fall back to English (and lang="en") when the dictionary did not load,
and version the dictionary URL so a release never pairs with a stale one.
- Share the segmented-button helper between settings and the title screen,
merge keys that only differed in a placeholder name, and slim the check
script.
- Tests: guard the hooks the tour patches into fireFailure/fireEvent, and
cover the dictionary fallback and the scenario name.
English stays the source text and the default. Player-facing strings go
through tr()/trn(), which look the English up in a per-language dictionary
(site/i18n/<lang>.js) and fall back to it unchanged. The dictionary is only
loaded when the game runs in that language. The language follows the
browser on the first visit and can be switched under Settings or on the
title screen; the choice is remembered.
- site/i18n/it.js: complete Italian translation (~1900 entries)
- scripts/i18n-check.js / npm run i18n:check: lists missing or stale entries
and translations that drop a {placeholder} or HTML tag
- tests/i18n.test.js: language selection, fallback, dictionary integrity,
and a tour of every screen, failure and event in English and Italian