Repository navigation
i18n prototype: locale, Fluent and ICU4X - #107
Merged
Merged
Conversation
Kit 0.9 ships Portuguese only as pt-BR; a regional sibling is closer to the user's language than English, per review. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Resolves overlaps with the secrets API dependencies (#98) and the link and selection view tests (#99). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.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.
What works
rake::t!(cx, ...). Missing messages and argument failures display the key with a diagnostic. The inbox demonstrates cardinal plurals, decimals and Gregorian date-only formatting.rake ctl. Drove both native windows through repeated language switches, including opening a window after switching. Browser renders matched the native decimal and date values in both locales.pt-BRcoverage and lackspt-PTandptcatalogues.Web release size
The full prototype adds 189,485 bytes with gzip or 137,372 bytes with Brotli, both within the provisional 300 KB compressed budget. Fluent only adds 121,196 gzip bytes or 94,306 Brotli bytes. The ICU provider is 4,734 bytes. The prototype report records the raw and compressed Wasm and JS matrix, exact commands, output comparisons and observed initialization times.
Compromises and follow-up API
cxand literal Fluent keys. Move catalogue coverage and argument checks into tooling, and settle regional and script matching before standardizing locale negotiation.PLURAL($count)uses the same ICU4X rule instance as the public plural API. Raw numeric selectors still reach Fluent's matcher, and its plural code still ships. Prefer an upstream resolver hook or validated ICU category selectors before stabilizing the API.Refs #21, #100, #101, #102, #104 and #105.