mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 02:42:41 +02:00
refactor(v2): i18n cleanups / refactors (#4405)
* chore: fix various intl stuff - remove intl-locales-supported & intl since they're deprecated and only needed for IE11 - add new polyfills for node 12 - clean up babel intl extractor - reset jest test timezone to UTC so it passes even for East Coast contributor * chore: change build to include Node 14 * docs: update i18n reqs
This commit is contained in:
parent
c3968e2d8f
commit
1078341b22
15 changed files with 162 additions and 124 deletions
|
@ -65,7 +65,8 @@ function useLocalePluralForms(): LocalePluralForms {
|
|||
i18n: {currentLocale},
|
||||
} = useDocusaurusContext();
|
||||
return useMemo(() => {
|
||||
if (Intl && Intl.PluralRules) {
|
||||
// @ts-expect-error checking Intl.PluralRules in case browser doesn't have it (e.g Safari 12-)
|
||||
if (Intl.PluralRules) {
|
||||
try {
|
||||
return createLocalePluralForms(currentLocale);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue