Repository navigation
English / Italian: language selector, full translation, localized voices - #47
Merged
Merged
Conversation
…oices
- src/i18n: t(englishText, params) returns the current language's
translation or the English text; language remembered per browser,
first launch follows the browser language.
- LangSelect: English / Italiano pill selector.
- Radio lines and speech: lines may carry {placeholders}; speech uses a
voice for the chosen language and falls back to the English line with
an English voice when the device has none.
- it/data.js: locations, districts, resources, recipes, researches, perks, skills, weapons, wave and mission conditions, side objectives, bosses, the Compact, vaccine scenarios, NPCs, story and side jobs. - Side-job offers are fixed templates filled at display time, so offers from old saves translate too; journal rewards rebuilt per language.
- Weapon names translated everywhere they're shown (Compact stock, soldier cards, reserve, armory picker). - Siege hint lines shrink to fit next to the speed button. - README: new screenshots of the current game, an Italian row, and the language feature; CODE.md: how to add translated text.
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.
Adds Italian to the game, with a language selector and radio voices in the chosen language. It also refreshes the README screenshots.
How it works
src/i18n/index.js:t(englishText, params)returns the translation for the current language, or the English text when none exists. English is the source and the key, so a missing translation never shows a blank. Placeholders uset('Wave {n}/{max}', { n, max }). Keys likectx|Wordcover words with two meanings, e.g. ammo "LOW" (SCARSE) vs risk "LOW" (BASSO).ui/LangSelect.jsx): 🇬🇧 English / 🇮🇹 Italiano, on the title screen and in the command center bar. Switching updates the whole UI and the canvas at once.{placeholders}+params.Translation
src/i18n/it/has about 880 entries, split by area:ui: menus, command center, map, panels and results;hud: siege and mission HUD, messages and rooms;data: locations, quests, perks, research, weapons, conditions and bosses;cine: cinematics, transmissions and endings;radio: radio lines.Every entry is filled in, and the placeholders match the English.
Other
Testing
Generated by Claude Code