From 67a36121f2a0bb317dc0acb001cb3fa75ed2f646 Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Wed, 3 Mar 2021 18:38:45 -0300 Subject: [PATCH] fix: add intl polyfill for Android --- index.js | 6 ++++++ package.json | 1 + yarn.lock | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/index.js b/index.js index bc0deced..fe765691 100644 --- a/index.js +++ b/index.js @@ -2,6 +2,7 @@ import 'react-native-gesture-handler'; import Bugsnag from '@bugsnag/react-native'; import { enableScreens } from 'react-native-screens'; import { SNLog } from '@standardnotes/snjs'; +import { Platform } from 'react-native'; import { AppRegistry } from 'react-native'; import { App } from './src/App'; @@ -23,4 +24,9 @@ if (__DEV__ === false) { enableAndroidFontFix(); +if (Platform.OS === 'android') { + require('intl'); + require('intl/locale-data/jsonp/en-IN'); +} + AppRegistry.registerComponent(appName, () => App); diff --git a/package.json b/package.json index a23b55d2..a0d75c8a 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@react-navigation/stack": "^5.12.8", "@standardnotes/sncrypto-common": "1.2.9", "@standardnotes/snjs": "^2.0.62", + "intl": "^1.2.5", "js-base64": "^3.5.2", "moment": "^2.29.1", "react": "16.13.1", diff --git a/yarn.lock b/yarn.lock index 92695d06..c51f9488 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4203,6 +4203,11 @@ internal-slot@^1.0.2: has "^1.0.3" side-channel "^1.0.2" +intl@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/intl/-/intl-1.2.5.tgz#82244a2190c4e419f8371f5aa34daa3420e2abde" + integrity sha1-giRKIZDE5Bn4Nx9ao02qNCDiq94= + invariant@2.2.4, invariant@>=2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"