diff --git a/Gemfile.lock b/Gemfile.lock index ffd2baba..2288987d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,23 +17,23 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.541.0) - aws-sdk-core (3.124.0) + aws-partitions (1.551.0) + aws-sdk-core (3.125.5) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.52.0) - aws-sdk-core (~> 3, >= 3.122.0) + aws-sdk-kms (1.53.0) + aws-sdk-core (~> 3, >= 3.125.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.109.0) - aws-sdk-core (~> 3, >= 3.122.0) + aws-sdk-s3 (1.111.3) + aws-sdk-core (~> 3, >= 3.125.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) aws-sigv4 (1.4.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) - claide (1.0.3) + claide (1.1.0) cocoapods (1.11.2) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) @@ -86,17 +86,18 @@ GEM escape (0.0.4) ethon (0.15.0) ffi (>= 1.15.0) - excon (0.89.0) - faraday (1.8.0) + excon (0.90.0) + faraday (1.9.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) + faraday-net_http_persistent (~> 1.0) faraday-patron (~> 1.0) faraday-rack (~> 1.0) - multipart-post (>= 1.2, < 3) + faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) faraday-cookie_jar (0.0.7) faraday (>= 0.8.0) @@ -105,14 +106,17 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) + faraday-multipart (1.0.3) + multipart-post (>= 1.2, < 3) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) + faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.5) - fastlane (2.199.0) + fastimage (2.2.6) + fastlane (2.203.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -159,9 +163,9 @@ GEM fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.14.0) + google-apis-androidpublisher_v3 (0.16.0) google-apis-core (>= 0.4, < 2.a) - google-apis-core (0.4.1) + google-apis-core (0.4.2) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -170,11 +174,11 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-iamcredentials_v1 (0.9.0) + google-apis-iamcredentials_v1 (0.10.0) google-apis-core (>= 0.4, < 2.a) - google-apis-playcustomapp_v1 (0.6.0) + google-apis-playcustomapp_v1 (0.7.0) google-apis-core (>= 0.4, < 2.a) - google-apis-storage_v1 (0.10.0) + google-apis-storage_v1 (0.11.0) google-apis-core (>= 0.4, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) @@ -182,7 +186,7 @@ GEM google-cloud-env (1.5.0) faraday (>= 0.17.3, < 2.0) google-cloud-errors (1.2.0) - google-cloud-storage (1.35.0) + google-cloud-storage (1.36.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) @@ -203,7 +207,7 @@ GEM httpclient (2.8.3) i18n (1.8.10) concurrent-ruby (~> 1.0) - jmespath (1.4.0) + jmespath (1.5.0) json (2.6.1) jwt (2.3.0) memoist (0.16.2) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index aa8e270a..0964385d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,4 +1,4 @@ -fastlane_version "2.199.0" +fastlane_version "2.203.0" skip_docs ensure_env_vars( diff --git a/package.json b/package.json index 5b3c0a91..0034434e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "native": "220102", "major": 3, "minor": 2, - "patch": 0, + "patch": 1, "expo": "44.0.0" }, "description": "tooot app for Mastodon", diff --git a/src/App.tsx b/src/App.tsx index bfaad105..971d6c1b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,7 +9,10 @@ import netInfo from '@root/startup/netInfo' import sentry from '@root/startup/sentry' import { persistor, store } from '@root/store' import AccessibilityManager from '@utils/accessibility/AccessibilityManager' -import { getSettingsLanguage } from '@utils/slices/settingsSlice' +import { + changeLanguage, + getSettingsLanguage +} from '@utils/slices/settingsSlice' import ThemeManager from '@utils/styles/ThemeManager' import * as Notifications from 'expo-notifications' import * as SplashScreen from 'expo-splash-screen' @@ -86,6 +89,9 @@ const App: React.FC = () => { if (bootstrapped) { log('log', 'App', 'loading actual app :)') const language = getSettingsLanguage(store.getState()) + if (!language) { + store.dispatch(changeLanguage('en')) + } i18n.changeLanguage(language) return ( diff --git a/src/Screens.tsx b/src/Screens.tsx index 639c0ee8..86d27c7f 100644 --- a/src/Screens.tsx +++ b/src/Screens.tsx @@ -1,7 +1,6 @@ import { HeaderLeft } from '@components/Header' -import { displayMessage, Message, removeMessage } from '@components/Message' +import { displayMessage, Message } from '@components/Message' import navigationRef from '@helpers/navigationRef' -import { useNetInfo } from '@react-native-community/netinfo' import { NavigationContainer } from '@react-navigation/native' import { createNativeStackNavigator } from '@react-navigation/native-stack' import ScreenActions from '@screens/Actions' @@ -49,24 +48,6 @@ const Screens: React.FC = ({ localCorrupt }) => { const routeRef = useRef<{ name?: string; params?: {} }>() - const isConnected = useNetInfo().isConnected - useEffect(() => { - switch (isConnected) { - case true: - removeMessage() - break - case false: - displayMessage({ - mode, - type: 'error', - message: t('network.disconnected.message'), - description: t('network.disconnected.description'), - autoHide: false - }) - break - } - }, [isConnected]) - // Push hooks const instances = useSelector( getInstances, diff --git a/src/components/Timeline/Shared/Translate.tsx b/src/components/Timeline/Shared/Translate.tsx index 59a0b501..0a4ce2ca 100644 --- a/src/components/Timeline/Shared/Translate.tsx +++ b/src/components/Timeline/Shared/Translate.tsx @@ -4,6 +4,7 @@ import { useTranslateQuery } from '@utils/queryHooks/translate' import { getSettingsLanguage } from '@utils/slices/settingsSlice' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' +import * as Localization from 'expo-localization' import React, { useState } from 'react' import { useTranslation } from 'react-i18next' import { Pressable, StyleSheet, Text } from 'react-native' @@ -48,7 +49,7 @@ const TimelineTranslate = React.memo( const [enabled, setEnabled] = useState(false) const { refetch, data, isLoading, isSuccess, isError } = useTranslateQuery({ source: status.language, - target: settingsLanguage, + target: Localization.locale || settingsLanguage || 'en', text, options: { enabled } }) @@ -92,7 +93,9 @@ const TimelineTranslate = React.memo( source: data?.sourceLanguage }) : t('shared.translate.default')} - {__DEV__ ? ` Source: ${status.language}` : undefined} + {__DEV__ + ? ` Source: ${status.language}; Target: ${settingsLanguage}` + : undefined} {isLoading ? (