expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
33.7k stars 5.4k forks source link

SDK 33 - i18n doesn't work on android standalone. #4517

Closed rompjin closed 4 years ago

rompjin commented 5 years ago

🐛 Bug Report

Environment

Expo CLI 2.19.4 environment info: System: OS: Windows 10 Binaries: Yarn: 1.15.2 - D:\Users\npm\yarn.CMD npm: 6.9.0 - D:\Users\npm\npm.CMD IDEs: Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5522156

Steps to Reproduce

i18n works fine in Expo client on Android but does not work on the android standalone after changing from sdk32 to sdk33 Both i18next, i18n-js are the same problem.

//import i18next from 'i18next'; import i18next from 'i18n-js';

i18next.fallbacks = true; i18next.translations = { en: { "Welcome": { "wallet": "Wallet", "walletDescription": "EOS assets under your control and much easier to access.", "dapps": "dApps", "dappsDescription": "You can access multiple dApps in the wallet.", "dex": "Dex", "dexDescription": "Smart contract based decentralized trading.", "chat": "Chat", "chatDescription": "Chat with your friends via secure decentralized technologies.", "getStart": "Get Started", "notReady": "Initializing storage. Please try in a few minutes." }, }, zh }; i18next.locale = Localization.locale.split('-')[0];

Expected Behavior

success

Actual Behavior

failed

am I missing something migration to sdk33 about i18n?
thanks.

tsapeta commented 5 years ago

Just for sure, do you have expo-localization listed in your dependencies in package.json?

rompjin commented 5 years ago

@tsapeta yes, this is a snippet of package.json

"@expo/vector-icons": "^9.0.0",
"@rimiti/react-native-toastify": "^1.0.0",
"bytes": "^3.0.0",
"crypto-js": "^3.1.9-1",
"d3-interpolate": "^1.3.2",
"eosjs-ecc-rn": "^4.0.6",
"eosjs-rn": "^20.0.0",
"expo": "^33.0.0",
"expo-constants": "~5.0.1",
"expo-font": "~5.0.1",
"expo-localization": "~5.0.1",
"expo-react-native-adapter": "^3.0.1",
"expo-sqlite": "~5.0.1",
"formik": "^1.3.1",
"i18next": "^15.1.1",

I tried it on iOS testlight and it works.

cruzach commented 4 years ago

hey @rompjin sorry for the late response here. I tried this on Android and wasn't able to reproduce. Are you still having this issue on a more recent SDK?

stale[bot] commented 4 years ago

It's been a while since we've had any activity on this issue, and seeing as it needs more info before we can properly address it, we will be closing it in one month. If you've found a fix, please share it! Otherwise, please provide the info we asked for, especially a reproducible example. Thanks!