Skip to content

feat(i18n): translate UI to English and de-hardcode feature/* strings (#3) - #6

Merged
fguzman-stack merged 3 commits into
masterfrom
feat/i18n-english
Sep 17, 2026
Merged

fguzman-stack merged 3 commits into
masterfrom
feat/i18n-english

Conversation

@fguzman-stack

@fguzman-stack fguzman-stack commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

🎯 What does this PR do?

The app is now fully bilingual (ES + EN) — UI and learning content — following the system language automatically.

Phase 1 — remaining UI strings to resources

  • Viewport pet quotes (per-mood string-arrays), PairBuddy, code cards, daily rewards, quest/moodlet seeds, navigation, splash, widget (XML + RemoteViews), notifications, channel labels, daily-commit generator: all extracted to values/ + values-en/ (now 584 keys each, parity-tested).
  • Achievements/skills/missions/moodlets now resolve display text by stable id (LocalizedGameText.kt); no persisted-data format changes.

Phase 2 — bilingual learning content

  • English translations keyed by item id: ChallengesDataEn.kt (90), SpecialChallengesDataEn.kt (6), CodeReviewDataEn.kt (10), CodeCardsEn.kt (40). Selected via localized() by system locale; Spanish default untouched.
  • Guard test LocalizedContentTest verifies id coverage, option order and answer-index bounds.

Phase 3 — quality pass

  • Fixed real EN bugs: difficulty and topics were persisted as localized text (logic/selection broke when switching device language) → now canonical keys with legacy normalization.
  • Git-game accuracy fixes (scenarios 2/4/8), ES punctuation (opening ¡), wording polish.
  • lintDebug: 0 errors; testDebugUnitTest green.

Known limitations (documented in README)

  • Notification channel labels are created once at first install with the then-active language.
  • Theme names remain Spanish identifiers (shown in Settings/Shop).

🧪 How to test

  1. System language English → app, games, notifications, widget and all quiz content render in English.
  2. System language Spanish → identical behavior to before (default values/ meaning unchanged).
  3. .\gradlew :app:testDebugUnitTest includes LocalizedContentTest (ES↔EN content parity).

@fguzman-stack
fguzman-stack merged commit d48d110 into master Sep 17, 2026
1 check passed
- Externaliza a recursos (values + values-en) todos los strings hardcodeados restantes: viewport (frases por estado como string-arrays), pair buddy, code cards, misiones/seeds, logros, recompensas diarias, moodlets, navegacion, splash, widget y notificaciones (canales + workers).
- Logros/habilidades/misiones/moodlets/quests se resuelven por id estable (LocalizedGameText) sin cambiar el formato persistido; QuestType y Achievement quedan sin texto embebido.
- Contenido educativo bilingue: ChallengesDataEn/SpecialChallengesDataEn/CodeReviewDataEn/CodeCardsEn (traduccion EN por id) + LocalizedContent.localized() segun locale del sistema; traduce literales dentro de snippets de codigo.
- Topics y dificultad se persisten como claves canonicas (TopicKey/DifficultyKey) normalizando valores legacy localizados (bug: en EN la dificultad no activaba logica y comparaciones de topics fallaban).
- Correcciones de exactitud git game (escenarios 2/4/8), capitalizacion y exclamaciones ES.
- Test LocalizedContentTest: paridad ES<->EN (cobertura de ids, orden y cantidad de opciones).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants