Repository navigation
fix(i18n): exclude unused plural forms from language pack coverage - #120
Merged
Merged
Conversation
Contributor
|
Thanks a lot, @chengjie! This is in and ships with filex 0.57.0. It also takes care of the coverage number the store showed for your pack while we were sorting out #118: once the store's checker runs on 0.57, a complete Chinese pack shows 100%. And your Chinese language pack is approved and listed in the store now. Thank you for translating filex, and for the careful reports along the way. |
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 & why
A complete Chinese or Japanese language pack can be reported as partially translated because
LanguageRowscounts English plural forms that the target locale never selects. For a catalogue containingfilesandfiles_one, Chinese needs onlyfiles, but currently reports 50% coverage. This also explains why a complete Chinese pack can show 97% in the store dry-run while passing the locale-aware completeness validator.Use the existing
srvtext.CategoriesCLDR rules to exclude inapplicable catalogue plural forms from both Total and Translated. A suffix is treated as a plural form only when its base key is also in the catalogue, so standalone keys such asstandalone_oneremain required. Shipped key counts, unknown-key handling, blank-value handling and percentage rounding are preserved. English still requires its singular forms, and shipping unnecessary singular translations cannot inflate coverage.Type
Checklist
cd backend && go build ./... && go vet ./... && go test -timeout 30m ./...passespnpm -C packages/core typecheckand the relevant build passdocs/,README.md) andCHANGELOG.mdif user-facingNotes for reviewers
go test ./internal/wasmplugin ./internal/srvtext -count=1 -timeout=5mpasses. The full backend build/vet/test suite was not run; frontend code is unchanged.