Reviewed-on: #1 Co-authored-by: Wally Hackenslacker <mastor89@protonmail.com> Co-committed-by: Wally Hackenslacker <mastor89@protonmail.com>
4.6 KiB
Preferences Language Toggles Implementation Plan
For agentic workers: REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Add a Language section to Preferences with two mutually exclusive toggles that switch active game language between default (None) and Spanish ("spanish"), placed to the right of Skip.
Architecture: Extend the existing top preferences row in screen preferences() by adding one radio-styled vbox section for language controls. Use Ren'Py built-in Language(...) actions for immediate language switching and selected-state semantics. Update Spanish translation strings so button labels follow Option B behavior (English/Inglés, Spanish/Español depending on active language).
Tech Stack: Ren'Py screen language (.rpy), Ren'Py translation files (game/tl/spanish/*.rpy), Ren'Py CLI (renpy.sh lint/compile/run).
File Structure
- Modify:
game/screens.rpy(preferences layout and language toggle actions) - Modify:
game/tl/spanish/screens.rpy(translations forLanguage,English,Spanish) - Reference:
docs/superpowers/specs/2026-03-20-preferences-language-toggles-design.md
Notes:
- Keep all work in the currently active local translation branch.
- Do not create or use git worktrees for this task (required for local playtesting workflow).
- Follow existing
Display/Skipsection layout and style patterns.
Chunk 1: Preferences UI Section
Task 1: Add Language block in top preferences row
Files:
-
Modify:
game/screens.rpy(insidescreen preferences()firsthboxnear existingDisplayandSkipblocks) -
Step 1: Baseline acceptance check (expected to fail current requirement)
Run: "renpy.sh" "/home/$USER/Documentos/Renpy Projects/Soul Droid Chat" run
Expected baseline: Preferences has no Language section to the right of Skip.
- Step 2: Add Language section with matching style/title
In screen preferences() first hbox, add this vbox immediately after the existing Skip vbox:
vbox:
style_prefix "radio"
label _("Language")
textbutton _("English") action Language(None)
textbutton _("Spanish") action Language("spanish")
Implementation details:
-
Keep section placement in the same
hboxthat containsDisplayandSkip. -
Keep title wrapped in
_(). -
Use
style_prefix "radio"so title/button appearance matches established pattern. -
Step 3: Run lint to validate screen syntax after UI change
Run: "renpy.sh" "/home/$USER/Documentos/Renpy Projects/Soul Droid Chat" lint
Expected: No new lint errors from preferences screen edits.
Chunk 2: Translation Labels and End-to-End Validation
Task 2: Add Spanish string mappings for Option B labels
Files:
-
Modify:
game/tl/spanish/screens.rpy(withintranslate spanish strings:) -
Step 1: Add/confirm Spanish translations for new strings
Ensure these mappings exist exactly once in game/tl/spanish/screens.rpy:
old "Language"
new "Idioma"
old "English"
new "Inglés"
old "Spanish"
new "Español"
- Step 2: Verify compile after translation update
Run: "renpy.sh" "/home/$USER/Documentos/Renpy Projects/Soul Droid Chat" compile
Expected: Successful compile.
- Step 3: Manual smoke test for behavior and mutual exclusivity
Run: "renpy.sh" "/home/$USER/Documentos/Renpy Projects/Soul Droid Chat" run
Validate in Preferences:
Languagesection appears to the right ofSkip.Languagetitle style matchesDisplayandSkiptitles.- Selecting
Englishsets default language (Language(None)). - Selecting
Spanishsets Spanish language (Language("spanish")). - Only one of the two language toggles appears selected at a time.
- Section title and labels behave per Option B/localization mappings:
- Default language active: section title
Language; buttonsEnglish,Spanish - Spanish active: section title
Idioma; buttonsInglés,Español - Switching back to English restores title
Languageand buttonsEnglish,Spanish
- Default language active: section title
Completion Checklist
- Language section added with title
_("Language"). - Section appears to the right of Skip in the preferences top row.
- Toggles use
Language(None)andLanguage("spanish"). - Mutual exclusivity confirmed in UI selected state.
- Option B labels confirmed (
English/Inglés,Spanish/Españolby active language). lintandcompilecompleted successfully.- Manual run smoke check completed.