From 757e5bb52f7f3aca8a23ceaa84bfa25e18ba0c83 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 11 Oct 2022 22:25:28 +0200 Subject: [PATCH 1/4] Bump packages --- ios/Podfile.lock | 8 ++++---- package.json | 8 ++++---- yarn.lock | 34 ++++++++++++++++++---------------- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 11046c90..15433266 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -536,7 +536,7 @@ PODS: - React-Core - SDWebImage (~> 5.13.4) - SDWebImageWebPCoder (~> 0.9.0) - - RNGestureHandler (2.7.0): + - RNGestureHandler (2.7.1): - React-Core - RNReanimated (2.10.0): - DoubleConversion @@ -565,7 +565,7 @@ PODS: - React-RCTText - ReactCommon/turbomodule/core - Yoga - - RNScreens (3.18.0): + - RNScreens (3.18.1): - React-Core - React-RCTImage - RNSentry (4.6.1): @@ -929,9 +929,9 @@ SPEC CHECKSUMS: RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd RNFastImage: e6267e27581b81918ebef6432c94c20718ec3b91 - RNGestureHandler: 7673697e7c0e9391adefae4faa087442bc04af33 + RNGestureHandler: b7a872907ee289ada902127f2554fa1d2c076122 RNReanimated: 7faa787e8d4493fbc95fab2ad331fa7625828cfa - RNScreens: f3230dd008a7d0ce5c0a8bc78ff12cf2315bda24 + RNScreens: 1b7bb502dac62cc4cf01b94bea591c8da275132f RNSentry: f8591057d48d4f6d64196a76cbca67895667b033 RNShareMenu: cb9dac548c8bf147d06f0bf07296ad51ea9f5fc3 RNSVG: 42a0c731b11179ebbd27a3eeeafa7201ebb476ff diff --git a/package.json b/package.json index 21f1e490..e10100d9 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@react-native-community/segmented-control": "^2.2.2", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/native": "^6.0.13", - "@react-navigation/native-stack": "^6.9.0", + "@react-navigation/native-stack": "^6.9.1", "@react-navigation/stack": "^6.3.2", "@reduxjs/toolkit": "^1.8.6", "@sentry/react-native": "^4.6.1", @@ -75,7 +75,7 @@ "react-native-fast-image": "^8.6.1", "react-native-feather": "^1.1.2", "react-native-flash-message": "^0.3.1", - "react-native-gesture-handler": "^2.7.0", + "react-native-gesture-handler": "^2.7.1", "react-native-htmlview": "^0.16.0", "react-native-image-picker": "^4.10.0", "react-native-language-detection": "^0.1.0", @@ -83,11 +83,11 @@ "react-native-reanimated": "^2.10.0", "react-native-reanimated-zoom": "^0.3.1", "react-native-safe-area-context": "^4.4.1", - "react-native-screens": "^3.18.0", + "react-native-screens": "^3.18.1", "react-native-share-menu": "^6.0.0", "react-native-svg": "13.0.0", "react-native-swipe-list-view": "^3.2.9", - "react-native-tab-view": "^3.2.1", + "react-native-tab-view": "^3.3.0", "react-query": "^3.39.2", "react-redux": "^8.0.4", "redux-persist": "^6.0.0", diff --git a/yarn.lock b/yarn.lock index 3ae9960c..aa775212 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2022,10 +2022,10 @@ resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.6.tgz#fa700318528db93f05144b1be4b691b9c1dd1abe" integrity sha512-pNJ8R9JMga6SXOw6wGVN0tjmE6vegwPmJBL45SEMX2fqTfAk2ykDnlJHodRpHpAgsv0DaI8qX76z3A+aqKSU0w== -"@react-navigation/native-stack@^6.9.0": - version "6.9.0" - resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.9.0.tgz#1e79e06da8b81f0368d3709aedca269947da3649" - integrity sha512-cwqm/2GO0hf94OFRuH6R0beZPVKY4vMFxrdAPaDwwoukN5a0UgcsMYxrN8s2huwssTCuGScABFME9GnqG5hC5w== +"@react-navigation/native-stack@^6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.9.1.tgz#6013300e4cd0b33e242aa18593e4dff7db2ab3d1" + integrity sha512-aOuJP97ge6NRz8wH6sDKfLTfdygGmraYh0apKrrVbGvMnflbPX4kpjQiAQcUPUpMeas0betH/Su8QubNL8HEkg== dependencies: "@react-navigation/elements" "^1.3.6" warn-once "^0.1.0" @@ -6985,10 +6985,10 @@ react-native-flash-message@^0.3.1: prop-types "^15.8.1" react-native-iphone-x-helper "^1.3.1" -react-native-gesture-handler@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.7.0.tgz#53ad828add926c8e025f68ea581758c0f8893054" - integrity sha512-0jr3FNm2R3gv/v6XTtENgjv0fewD6LEct8EWmXw/oHw36M3YiIIpxnW57thL+0YiKwyLBXN0QHL4JZbs/heW2Q== +react-native-gesture-handler@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.7.1.tgz#c109d33c38cb182fafcda13012b77c6cac43b127" + integrity sha512-Rnak7U4v3ZB+vjVghv5CvAGS+UfRLsXUq7Nq+FycloxZ7jUZjBo+7rPnt+EdTIE2zc2pKhQHIQKcD+IAPg2Scg== dependencies: "@egjs/hammerjs" "^2.0.17" hoist-non-react-statics "^3.3.0" @@ -7052,10 +7052,10 @@ react-native-safe-area-context@^4.4.1: resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.4.1.tgz#239c60b8a9a80eac70a38a822b04c0f1d15ffc01" integrity sha512-N9XTjiuD73ZpVlejHrUWIFZc+6Z14co1K/p1IFMkImU7+avD69F3y+lhkqA2hN/+vljdZrBSiOwXPkuo43nFQA== -react-native-screens@^3.18.0: - version "3.18.0" - resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-3.18.0.tgz#e10ec54d8b158d47f66dc6c9a81e5a042e33037d" - integrity sha512-ndnz5JPLMLq/ThCYQzAOT65x6B4bdKFH1GKckUdbxKrwINGItPRSUiAoVI7YYyOQOa4VYL4hF37rrx+AjgjtRg== +react-native-screens@^3.18.1: + version "3.18.1" + resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-3.18.1.tgz#19059f34a29a2ff4247ebb1bf0c2f9beacec1ec4" + integrity sha512-GtEC1AbvpvtKDJldavuONF/hXW1aEZO7qz8SioyHrV9L9/nDiy+iTviMFmeEoix9KwmEHHxoYxc0xiDrFxKHyA== dependencies: react-freeze "^1.0.0" warn-once "^0.1.0" @@ -7078,10 +7078,12 @@ react-native-swipe-list-view@^3.2.9: resolved "https://registry.yarnpkg.com/react-native-swipe-list-view/-/react-native-swipe-list-view-3.2.9.tgz#d725c7cdf481dd5df12a00dbfe0120013b5f2e59" integrity sha512-SjAEuHc/D6ovp+RjDUhfNmw6NYOntdT7+GFhfMGfP/BSLMuMWynpzJy9GKQeyB8sI78T6Lzip21TVbongOg1Mw== -react-native-tab-view@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-3.2.1.tgz#1da975203ef30996c412f9c2808bb81e12c3376f" - integrity sha512-/3htrnDJ8hXXO6M5tDKgGPan5NhiVG4oN6SH8LgQtbAO2y+YI104sjlbPOxhLUBpbj43tOQerUtJF7ENcHEPaw== +react-native-tab-view@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-3.3.0.tgz#3d24ae4f4c55cfd54cd1d2d1f8915b0b2c33a5da" + integrity sha512-xjAQe657Gp/de2QHb7ptksTg8Jcb+j3fLAdcYryzfavt/pe+HtKLpkCtQsxyIJpRrAO7YPxFsymi2N4MnNfePA== + dependencies: + use-latest-callback "^0.1.5" react-native@^0.69.6: version "0.69.6" From e605a35e3a80ae558936b717e3cd2b899a7acd3f Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 11 Oct 2022 22:28:59 +0200 Subject: [PATCH 2/4] Use system's preferred language for iOS --- ios/ja.lproj/InfoPlist.strings | 2 ++ ios/tooot.xcodeproj/project.pbxproj | 5 ++++- src/App.tsx | 11 +++++++++-- src/screens/Tabs/Me/Settings/App.tsx | 14 +++++++++----- 4 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 ios/ja.lproj/InfoPlist.strings diff --git a/ios/ja.lproj/InfoPlist.strings b/ios/ja.lproj/InfoPlist.strings new file mode 100644 index 00000000..025e9777 --- /dev/null +++ b/ios/ja.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +"NSPhotoLibraryAddUsageDescription" = "tooot が画像をカメラロールに保存できるようにします"; +"NSPhotoLibraryUsageDescription" = "tooot が画像をカメラロールに保存できるようにします"; diff --git a/ios/tooot.xcodeproj/project.pbxproj b/ios/tooot.xcodeproj/project.pbxproj index 4191bd59..413887e6 100644 --- a/ios/tooot.xcodeproj/project.pbxproj +++ b/ios/tooot.xcodeproj/project.pbxproj @@ -81,6 +81,7 @@ E69EBACC28DF28420057EDEC /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = ""; }; E69EBACD28DF284D0057EDEC /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = ""; }; E69EBACE28DF28560057EDEC /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/InfoPlist.strings; sourceTree = ""; }; + E6C8B26628F5F9FC0062CF2E /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/InfoPlist.strings; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; /* End PBXFileReference section */ @@ -287,6 +288,7 @@ ko, "pt-BR", vi, + ja, ); mainGroup = 83CBB9F61A601CBA00E9B192; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; @@ -338,7 +340,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\nexport SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\nSENTRY_CLI_PATH=\"../node_modules/@sentry/cli/bin/sentry-cli\"\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"$SENTRY_CLI_PATH react-native xcode $REACT_NATIVE_XCODE\\\"\""; + shellScript = "set -e\nexport SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\nSENTRY_CLI_PATH=\"../node_modules/@sentry/cli/bin/sentry-cli\"\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"$SENTRY_CLI_PATH react-native xcode $REACT_NATIVE_XCODE\\\"\"\n"; }; 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; @@ -511,6 +513,7 @@ E69EBACC28DF28420057EDEC /* ko */, E69EBACD28DF284D0057EDEC /* pt-BR */, E69EBACE28DF28560057EDEC /* vi */, + E6C8B26628F5F9FC0062CF2E /* ja */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/src/App.tsx b/src/App.tsx index 17c57664..d88682bf 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,6 +14,7 @@ import * as Sentry from '@sentry/react-native' import AccessibilityManager from '@utils/accessibility/AccessibilityManager' import { changeLanguage, getSettingsLanguage } from '@utils/slices/settingsSlice' import ThemeManager from '@utils/styles/ThemeManager' +import * as Localization from 'expo-localization' import * as SplashScreen from 'expo-splash-screen' import React, { useCallback, useEffect, useState } from 'react' import { LogBox, Platform } from 'react-native' @@ -81,9 +82,15 @@ const App: React.FC = () => { log('log', 'App', 'bootstrapped') if (bootstrapped) { log('log', 'App', 'loading actual app :)') - const language = getSettingsLanguage(store.getState()) + log('log', 'App', `Locale: ${Localization.locale}`) + const language = + Platform.OS === 'ios' + ? Localization.locale + : getSettingsLanguage(store.getState()) if (!language) { - store.dispatch(changeLanguage('en')) + if (Platform.OS !== 'ios') { + store.dispatch(changeLanguage('en')) + } i18n.changeLanguage('en') } else { i18n.changeLanguage(language) diff --git a/src/screens/Tabs/Me/Settings/App.tsx b/src/screens/Tabs/Me/Settings/App.tsx index 8c9c4582..5b32e359 100644 --- a/src/screens/Tabs/Me/Settings/App.tsx +++ b/src/screens/Tabs/Me/Settings/App.tsx @@ -16,8 +16,10 @@ import { getSettingsStaticEmoji, changeStaticEmoji } from '@utils/slices/settingsSlice' +import * as Localization from 'expo-localization' import React from 'react' import { useTranslation } from 'react-i18next' +import { Linking, Platform } from 'react-native' import { useSelector } from 'react-redux' import { mapFontsizeToName } from '../SettingsFontsize' @@ -37,18 +39,20 @@ const SettingsApp: React.FC = () => { navigation.navigate('Tab-Me-Settings-Fontsize')} /> navigation.navigate('Tab-Me-Settings-Language')} + onPress={() => + Platform.OS === 'ios' + ? Linking.openSettings() + : navigation.navigate('Tab-Me-Settings-Language') + } /> Date: Tue, 11 Oct 2022 22:30:18 +0200 Subject: [PATCH 3/4] Update Fastfile --- fastlane/Fastfile | 1 - 1 file changed, 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c27497fe..66d35884 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -35,7 +35,6 @@ private_lane :build_ios do build_ios_app( export_method: "app-store", include_symbols: true, - include_bitcode: true, output_directory: BUILD_DIRECTORY, silent: false ) From 1dc91c160d34583456f71e608c19646e039b5dd2 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 11 Oct 2022 22:30:36 +0200 Subject: [PATCH 4/4] New translations mediaSelector.json (Vietnamese) (#403) --- src/i18n/vi/components/mediaSelector.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/vi/components/mediaSelector.json b/src/i18n/vi/components/mediaSelector.json index 12e8a2b1..bd5a7e44 100644 --- a/src/i18n/vi/components/mediaSelector.json +++ b/src/i18n/vi/components/mediaSelector.json @@ -1,6 +1,6 @@ { "title": "Chọn nguồn", - "message": "", + "message": "Chưa tải lên EXIF hình ảnh", "options": { "image": "Tải ảnh lên", "image_max": "Tải ảnh lên (tối đa {{max}})",