Implement i18n - #65
Merged
Merged
Conversation
* Downgrade Leaflet from version 2.0 alpha to 1.9. * Refactor the escape HTML function.
Message catalogs are flat JSON files loaded on demand and code-split per language. Lookups fall back to English key by key, so a catalog that is empty, partial, or mid-review still renders. The language list tracks the languages most spoken at home in California intersected with the threshold languages the state requires for public-benefit language access, since WIC applicants are the audience. English is the source catalog; the other twelve are stubs, so the plumbing is complete but the strings are not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The views and components now read their copy from the message catalog rather than embedding it, and main.js waits on the active catalog before the first render since t() is synchronous. Numbers the copy quotes -- the FMNP seasonal benefit, the Federal Poverty Level, the search result count -- go through Intl so they group and mark currency the way the reader's language does. The cited poverty level and its year move into named constants so the sentence can carry placeholders instead of a hard-coded "$23,850". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Languages are listed under their own names, since someone looking for their language will not recognize its English name, and each option carries its own lang so the browser picks a font that can render the script. The change listener is delegated from the document because switching languages re-renders the header. Arabic and Persian are right-to-left, so the layout's one-sided margins become logical properties and the pieces that stay one-sided are mirrored under [dir="rtl"], which the runtime sets from the active locale. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
No description provided.