Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix post time localization on Android" #7196

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"@expo/webpack-config": "^19.0.0",
"@floating-ui/dom": "^1.6.3",
"@floating-ui/react-dom": "^2.0.8",
"@formatjs/intl-datetimeformat": "^6.17.1",
"@formatjs/intl-locale": "^4.2.8",
"@formatjs/intl-numberformat": "^8.15.1",
"@formatjs/intl-pluralrules": "^5.4.1",
Expand Down
29 changes: 0 additions & 29 deletions src/locale/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Don't remove -force from these because detection is VERY slow on low-end Android.
// https://github.com/formatjs/formatjs/issues/4463#issuecomment-2176070577
import '@formatjs/intl-locale/polyfill-force'
import '@formatjs/intl-datetimeformat/polyfill-force'
import '@formatjs/intl-pluralrules/polyfill-force'
import '@formatjs/intl-numberformat/polyfill-force'
import '@formatjs/intl-datetimeformat/locale-data/en'
import '@formatjs/intl-pluralrules/locale-data/en'
import '@formatjs/intl-numberformat/locale-data/en'

Expand Down Expand Up @@ -54,7 +52,6 @@
case AppLanguage.an: {
i18n.loadAndActivate({locale, messages: messagesAn})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/es'),
import('@formatjs/intl-pluralrules/locale-data/an'),
import('@formatjs/intl-numberformat/locale-data/es'),
])
Expand All @@ -63,7 +60,6 @@
case AppLanguage.ast: {
i18n.loadAndActivate({locale, messages: messagesAst})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/ast'),
import('@formatjs/intl-pluralrules/locale-data/ast'),
import('@formatjs/intl-numberformat/locale-data/ast'),
])
Expand All @@ -72,7 +68,6 @@
case AppLanguage.ca: {
i18n.loadAndActivate({locale, messages: messagesCa})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/ca'),
import('@formatjs/intl-pluralrules/locale-data/ca'),
import('@formatjs/intl-numberformat/locale-data/ca'),
])
Expand All @@ -81,7 +76,6 @@
case AppLanguage.de: {
i18n.loadAndActivate({locale, messages: messagesDe})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/de'),
import('@formatjs/intl-pluralrules/locale-data/de'),
import('@formatjs/intl-numberformat/locale-data/de'),
])
Expand All @@ -90,7 +84,6 @@
case AppLanguage.en_GB: {
i18n.loadAndActivate({locale, messages: messagesEn_GB})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/en-GB'),
import('@formatjs/intl-pluralrules/locale-data/en'),
import('@formatjs/intl-numberformat/locale-data/en-GB'),
])
Expand All @@ -99,7 +92,6 @@
case AppLanguage.es: {
i18n.loadAndActivate({locale, messages: messagesEs})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/es'),
import('@formatjs/intl-pluralrules/locale-data/es'),
import('@formatjs/intl-numberformat/locale-data/es'),
])
Expand All @@ -108,7 +100,6 @@
case AppLanguage.fi: {
i18n.loadAndActivate({locale, messages: messagesFi})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/fi'),
import('@formatjs/intl-pluralrules/locale-data/fi'),
import('@formatjs/intl-numberformat/locale-data/fi'),
])
Expand All @@ -117,7 +108,6 @@
case AppLanguage.fr: {
i18n.loadAndActivate({locale, messages: messagesFr})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/fr'),
import('@formatjs/intl-pluralrules/locale-data/fr'),
import('@formatjs/intl-numberformat/locale-data/fr'),
])
Expand All @@ -126,7 +116,6 @@
case AppLanguage.ga: {
i18n.loadAndActivate({locale, messages: messagesGa})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/ga'),
import('@formatjs/intl-pluralrules/locale-data/ga'),
import('@formatjs/intl-numberformat/locale-data/ga'),
])
Expand All @@ -135,7 +124,6 @@
case AppLanguage.gl: {
i18n.loadAndActivate({locale, messages: messagesGl})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/gl'),
import('@formatjs/intl-pluralrules/locale-data/gl'),
import('@formatjs/intl-numberformat/locale-data/gl'),
])
Expand All @@ -144,7 +132,6 @@
case AppLanguage.hi: {
i18n.loadAndActivate({locale, messages: messagesHi})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/hi'),
import('@formatjs/intl-pluralrules/locale-data/hi'),
import('@formatjs/intl-numberformat/locale-data/hi'),
])
Expand All @@ -153,7 +140,6 @@
case AppLanguage.hu: {
i18n.loadAndActivate({locale, messages: messagesHu})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/hu'),
import('@formatjs/intl-pluralrules/locale-data/hu'),
import('@formatjs/intl-numberformat/locale-data/hu'),
])
Expand All @@ -162,7 +148,6 @@
case AppLanguage.id: {
i18n.loadAndActivate({locale, messages: messagesId})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/id'),
import('@formatjs/intl-pluralrules/locale-data/id'),
import('@formatjs/intl-numberformat/locale-data/id'),
])
Expand All @@ -171,7 +156,6 @@
case AppLanguage.it: {
i18n.loadAndActivate({locale, messages: messagesIt})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/it'),
import('@formatjs/intl-pluralrules/locale-data/it'),
import('@formatjs/intl-numberformat/locale-data/it'),
])
Expand All @@ -180,7 +164,6 @@
case AppLanguage.ja: {
i18n.loadAndActivate({locale, messages: messagesJa})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/ja'),
import('@formatjs/intl-pluralrules/locale-data/ja'),
import('@formatjs/intl-numberformat/locale-data/ja'),
])
Expand All @@ -189,8 +172,8 @@
case AppLanguage.km: {
i18n.loadAndActivate({locale, messages: messagesKm})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/km'),

Check failure on line 175 in src/locale/i18n.ts

View workflow job for this annotation

GitHub Actions / Run linters

Cannot find module '@formatjs/intl-datetimeformat/locale-data/km' or its corresponding type declarations.
import('@formatjs/intl-datetimeformat/locale-data/km'),

Check failure on line 176 in src/locale/i18n.ts

View workflow job for this annotation

GitHub Actions / Run linters

Cannot find module '@formatjs/intl-datetimeformat/locale-data/km' or its corresponding type declarations.
import('@formatjs/intl-pluralrules/locale-data/km'),
import('@formatjs/intl-numberformat/locale-data/km'),
])
Expand All @@ -199,7 +182,6 @@
case AppLanguage.ko: {
i18n.loadAndActivate({locale, messages: messagesKo})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/ko'),
import('@formatjs/intl-pluralrules/locale-data/ko'),
import('@formatjs/intl-numberformat/locale-data/ko'),
])
Expand All @@ -208,7 +190,6 @@
case AppLanguage.nl: {
i18n.loadAndActivate({locale, messages: messagesNl})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/nl'),
import('@formatjs/intl-pluralrules/locale-data/nl'),
import('@formatjs/intl-numberformat/locale-data/nl'),
])
Expand All @@ -221,7 +202,6 @@
case AppLanguage.pl: {
i18n.loadAndActivate({locale, messages: messagesPl})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/pl'),
import('@formatjs/intl-pluralrules/locale-data/pl'),
import('@formatjs/intl-numberformat/locale-data/pl'),
])
Expand All @@ -230,7 +210,6 @@
case AppLanguage.pt_BR: {
i18n.loadAndActivate({locale, messages: messagesPt_BR})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/pt'),
import('@formatjs/intl-pluralrules/locale-data/pt'),
import('@formatjs/intl-numberformat/locale-data/pt'),
])
Expand All @@ -239,7 +218,7 @@
case AppLanguage.ro: {
i18n.loadAndActivate({locale, messages: messagesRo})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/ro'),

Check failure on line 221 in src/locale/i18n.ts

View workflow job for this annotation

GitHub Actions / Run linters

Cannot find module '@formatjs/intl-datetimeformat/locale-data/ro' or its corresponding type declarations.
import('@formatjs/intl-pluralrules/locale-data/ro'),
import('@formatjs/intl-numberformat/locale-data/ro'),
])
Expand All @@ -248,7 +227,6 @@
case AppLanguage.ru: {
i18n.loadAndActivate({locale, messages: messagesRu})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/ru'),
import('@formatjs/intl-pluralrules/locale-data/ru'),
import('@formatjs/intl-numberformat/locale-data/ru'),
])
Expand All @@ -257,7 +235,6 @@
case AppLanguage.th: {
i18n.loadAndActivate({locale, messages: messagesTh})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/th'),
import('@formatjs/intl-pluralrules/locale-data/th'),
import('@formatjs/intl-numberformat/locale-data/th'),
])
Expand All @@ -266,7 +243,6 @@
case AppLanguage.tr: {
i18n.loadAndActivate({locale, messages: messagesTr})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/tr'),
import('@formatjs/intl-pluralrules/locale-data/tr'),
import('@formatjs/intl-numberformat/locale-data/tr'),
])
Expand All @@ -275,7 +251,6 @@
case AppLanguage.uk: {
i18n.loadAndActivate({locale, messages: messagesUk})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/uk'),
import('@formatjs/intl-pluralrules/locale-data/uk'),
import('@formatjs/intl-numberformat/locale-data/uk'),
])
Expand All @@ -284,7 +259,6 @@
case AppLanguage.vi: {
i18n.loadAndActivate({locale, messages: messagesVi})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/vi'),
import('@formatjs/intl-pluralrules/locale-data/vi'),
import('@formatjs/intl-numberformat/locale-data/vi'),
])
Expand All @@ -293,7 +267,6 @@
case AppLanguage.zh_CN: {
i18n.loadAndActivate({locale, messages: messagesZh_CN})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/zh-Hans'),
import('@formatjs/intl-pluralrules/locale-data/zh'),
import('@formatjs/intl-numberformat/locale-data/zh'),
])
Expand All @@ -302,7 +275,6 @@
case AppLanguage.zh_HK: {
i18n.loadAndActivate({locale, messages: messagesZh_HK})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/yue'),
import('@formatjs/intl-pluralrules/locale-data/zh'),
import('@formatjs/intl-numberformat/locale-data/zh'),
])
Expand All @@ -311,7 +283,6 @@
case AppLanguage.zh_TW: {
i18n.loadAndActivate({locale, messages: messagesZh_TW})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/zh-Hant'),
import('@formatjs/intl-pluralrules/locale-data/zh'),
import('@formatjs/intl-numberformat/locale-data/zh'),
])
Expand Down
9 changes: 0 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4202,15 +4202,6 @@
dependencies:
tslib "2"

"@formatjs/intl-datetimeformat@^6.17.1":
version "6.17.1"
resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-6.17.1.tgz#d5e800891f9d79c8f1af1999f51db51f1384eca1"
integrity sha512-a18NqRo6R73xpREuMZo8FqjO+LnYFDHoeoviTh5de4ebI46wqLSDgbAIKoceuWblTQt8bvCpJIwvKgLItea88Q==
dependencies:
"@formatjs/ecma402-abstract" "2.3.1"
"@formatjs/intl-localematcher" "0.5.9"
tslib "2"

"@formatjs/[email protected]":
version "1.8.7"
resolved "https://registry.yarnpkg.com/@formatjs/intl-enumerator/-/intl-enumerator-1.8.7.tgz#3f004753333f80cc468ae34046bd8416772a0412"
Expand Down
Loading