feat(i18n): runtime ES/EN + translate the landing (3.6) - #74
Merged
Merged
Conversation
The UI was hardcoded Spanish. Add a minimal, dependency-free i18n layer so a
language can be chosen at runtime:
- I18nService: flat key dictionaries (es/en), a lang signal (default and
fallback Spanish), t(key, params) with {param} interpolation, and
setLanguage() persisted to localStorage + <html lang>.
- TranslatePipe ({{ 'key' | t }}), impure on purpose to re-render on change.
- LanguageSwitcherComponent (ES/EN) in the landing header.
- Landing fully translated as the first surface.
Coverage is incremental: auth, shell and dashboard pages follow in later PRs;
missing keys fall back to Spanish (then the key), so nothing renders blank.
|
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.



What
Item 3.6 i18n. The UI was hardcoded Spanish. Adds a runtime, dependency-free i18n layer:
I18nService: flatkey → stringdictionaries (es/en), alangsignal (default + fallback Spanish),t(key, params)with{param}interpolation, andsetLanguage()persisted tolocalStorage(bikontrol.lang) +<html lang>.TranslatePipe({{ 'key' | t }}), impure on purpose so it re-renders when the language changes.LanguageSwitcherComponent(ES/EN) in the landing header.Scope (incremental)
The app is large, so coverage is delivered surface by surface. Done: landing. Follow-ups: auth pages, app shell (nav), dashboard pages (home/summary/maintenance/statistics/profile) and the legal/help long-form text. Two safety properties while incomplete:
Verification
format:check+ lint clean; AOT build passes.