Repository navigation
Document ICU plurals and selects on the web host - #797
Conversation
ng-native#772 and ng-native#773 made ICU plurals and selects work on the web host, in a development build and by the app's locale, but the localization guide and the limitations page still say they throw there and point to the `i18nPlural` pipe and `@switch` instead. Both pages now say plurals and selects work on iOS, Android and the web host. A test renders a select on the web host and switches its case both ways: the existing tests cover plurals only, and a select goes through the same ICU path that threw before ng-native#773. Closes ng-native#686
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
ashley-hunter
left a comment
There was a problem hiding this comment.
good catch! thank you
What changed and why
#772 and #773 made ICU plurals and selects work on the web host (in a development build, and picking the case by the app's
LOCALE_ID), but the docs were not updated and #686 is still open:guide/limitations.mdsays a plural or select "throws in a development build" on the web host and recommends thei18nPluralpipe and@switchinstead.guide/localization.mdlimits ICU expressions to iOS and Android and sends web readers to that limitation.Both pages now say plurals and selects work on iOS, Android and the web host.
The issue covers selects as well as plurals, but
plural.test.tsonly exercised plurals. This adds aSelectAppfixture and a test that renders a select on the web host in a development build and switches its case both ways.Closes #686
How this was tested
nx run-many -t lint typecheck test -p @ng-native/web documentationpasses, and so doespnpm format:check.browser-renderer.tsanddom-node.tsreverted, it fails with the error from the issue (ASSERTION ERROR: The provided value must be an instance of a DOM Node but got #anchor), along with the existing plural tests.Checklist
apps/documentation), following docs/README.md.nx/version-plans/: not needed, docs and tests only (Pick an ICU case by the app's locale on the web host #772 and Render an ICU plural on the web host in a development build #773 carry their own)pnpm lint typecheck testis green locally (affected projects)