From f4e0cd32a7e39bcc3ae91beff539a4b1524e3455 Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Mon, 13 Oct 2025 13:15:16 +0200 Subject: [PATCH 1/5] Bump react-native-localize --- package-lock.json | 18 ++++++++++-------- package.json | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebf8a402a780..7ab409d72f41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -113,7 +113,7 @@ "react-native-key-command": "1.0.14", "react-native-keyboard-controller": "1.18.5", "react-native-launch-arguments": "^4.0.2", - "react-native-localize": "^2.2.6", + "react-native-localize": "^3.5.4", "react-native-nitro-modules": "0.29.4", "react-native-nitro-sqlite": "9.1.11", "react-native-onyx": "3.0.2", @@ -31826,19 +31826,21 @@ } }, "node_modules/react-native-localize": { - "version": "2.2.6", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/react-native-localize/-/react-native-localize-3.5.4.tgz", + "integrity": "sha512-Sr0XMSh76vFxZtRznD5FE8ZZtA4Srr7+Ix4WePhoQdeiJzuJEFbiQ2Lk3JJhsTMZdsZKn3j1KUwpV3hhnm2BqA==", "license": "MIT", "peerDependencies": { - "react": ">=16.8.6", - "react-native": ">=0.60.0", - "react-native-macos": ">=0.64.0", - "react-native-windows": ">=0.62.0" + "@expo/config-plugins": "^9.0.0 || ^10.0.0", + "react": "*", + "react-native": "*", + "react-native-macos": "*" }, "peerDependenciesMeta": { - "react-native-macos": { + "@expo/config-plugins": { "optional": true }, - "react-native-windows": { + "react-native-macos": { "optional": true } } diff --git a/package.json b/package.json index 4192c8a94702..c06ba0739911 100644 --- a/package.json +++ b/package.json @@ -184,7 +184,7 @@ "react-native-key-command": "1.0.14", "react-native-keyboard-controller": "1.18.5", "react-native-launch-arguments": "^4.0.2", - "react-native-localize": "^2.2.6", + "react-native-localize": "^3.5.4", "react-native-nitro-modules": "0.29.4", "react-native-nitro-sqlite": "9.1.11", "react-native-onyx": "3.0.2", From 42e0641eba64f825d1168e82240e501cdcddbdec Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Mon, 13 Oct 2025 13:19:42 +0200 Subject: [PATCH 2/5] Adjust function name --- src/libs/Localize/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Localize/index.ts b/src/libs/Localize/index.ts index 74b30a608e70..7449cbc524cb 100644 --- a/src/libs/Localize/index.ts +++ b/src/libs/Localize/index.ts @@ -194,7 +194,7 @@ function formatMessageElementList(elements: readon * Returns the user device's preferred language. */ function getDevicePreferredLocale(): Locale { - return RNLocalize.findBestAvailableLanguage(Object.values(CONST.LOCALES))?.languageTag ?? CONST.LOCALES.DEFAULT; + return RNLocalize.findBestLanguageTag(Object.values(CONST.LOCALES))?.languageTag ?? CONST.LOCALES.DEFAULT; } export {translate, translateLocal, formatList, formatMessageElementList, getDevicePreferredLocale}; From 6a987ea9699d31c2d195991887c2e66dabc8cf13 Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Mon, 13 Oct 2025 13:52:36 +0200 Subject: [PATCH 3/5] Fix tests --- __mocks__/react-native-localize.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__mocks__/react-native-localize.ts b/__mocks__/react-native-localize.ts index cf4145ad0014..017e08b2e08a 100644 --- a/__mocks__/react-native-localize.ts +++ b/__mocks__/react-native-localize.ts @@ -1,8 +1,8 @@ // use a provided translation, or return undefined to test your fallback -const findBestAvailableLanguage = () => ({ +const findBestLanguageTag = () => ({ languageTag: 'en', isRTL: false, }); // eslint-disable-next-line import/prefer-default-export -export {findBestAvailableLanguage}; +export {findBestLanguageTag}; From 22381c984a9ec09de3b8716864b1c3f916f32e82 Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Mon, 13 Oct 2025 14:20:38 +0200 Subject: [PATCH 4/5] Update Podfile.lock --- ios/Podfile.lock | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1d943a897a5b..9714b14e208b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2857,8 +2857,30 @@ PODS: - ReactCommon/turbomodule/core - RNReanimated/worklets - Yoga - - RNLocalize (2.2.6): + - RNLocalize (3.5.4): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.11.18.00) + - RCTRequired + - RCTTypeSafety - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - rnmapbox-maps (10.1.44): - MapboxMaps (~> 10.19.0) - React @@ -3812,7 +3834,7 @@ SPEC CHECKSUMS: React-microtasksnativemodule: 8fc1bfccd27980ed6cfec1f52ffcd6af336f48f7 react-native-advanced-input-mask: e5fa44f25ae16ab5b8da75b5aed4236a5400a770 react-native-airship: ff2599900d29e0e64ff2b2dd9f897c0c220a9163 - react-native-app-logs: 45d7515e7a92e61be56dffb10f315b578dedee01 + react-native-app-logs: 6540c5f6f66f33cb52d0bb62f0a10131ff3a9589 react-native-blob-util: a013bd1bb12de304a726c2308cc0e219f34ab66c react-native-cameraroll: d98f8a64b53620754864c33a034e054ca4a3b360 react-native-config: ab9f9cc16883aed5355ca43478fe39e6aec5ebb9 @@ -3877,7 +3899,7 @@ SPEC CHECKSUMS: RNGestureHandler: 61d3e94abb866ee955563ddf073e405e3f541359 RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0 RNLiveMarkdown: 0a228fb9a8be4b5b463beeb3b272753a6f10e649 - RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81 + RNLocalize: e3a384870bd61fccfcc46de28089371907ed2e14 rnmapbox-maps: f3875edd847c82d770d1b57852b36d45b3ea8a01 RNNitroSQLite: e36968e81bbcab6c9e97a35e74ae34c7420d734c RNPermissions: fd6b2676e74ecb6d2dec0a6168502ab7af733e34 From 382cfafe3aefd79443a83163d0db649b72d93d69 Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Tue, 21 Oct 2025 12:36:48 +0200 Subject: [PATCH 5/5] Update Podfile --- ios/Podfile.lock | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a9f5e52072fd..8d995e70cb16 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2857,8 +2857,30 @@ PODS: - ReactCommon/turbomodule/core - RNReanimated/worklets - Yoga - - RNLocalize (2.2.6): + - RNLocalize (3.5.4): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.11.18.00) + - RCTRequired + - RCTTypeSafety - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - rnmapbox-maps (10.1.44): - MapboxMaps (~> 10.19.0) - React @@ -3812,7 +3834,7 @@ SPEC CHECKSUMS: React-microtasksnativemodule: 8fc1bfccd27980ed6cfec1f52ffcd6af336f48f7 react-native-advanced-input-mask: e5fa44f25ae16ab5b8da75b5aed4236a5400a770 react-native-airship: ff2599900d29e0e64ff2b2dd9f897c0c220a9163 - react-native-app-logs: 45d7515e7a92e61be56dffb10f315b578dedee01 + react-native-app-logs: 6540c5f6f66f33cb52d0bb62f0a10131ff3a9589 react-native-blob-util: a013bd1bb12de304a726c2308cc0e219f34ab66c react-native-cameraroll: d98f8a64b53620754864c33a034e054ca4a3b360 react-native-config: ab9f9cc16883aed5355ca43478fe39e6aec5ebb9 @@ -3877,7 +3899,7 @@ SPEC CHECKSUMS: RNGestureHandler: 61d3e94abb866ee955563ddf073e405e3f541359 RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0 RNLiveMarkdown: 6a36c82776afa8fd2c41c2c6e299c6dd77f249ce - RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81 + RNLocalize: e3a384870bd61fccfcc46de28089371907ed2e14 rnmapbox-maps: f3875edd847c82d770d1b57852b36d45b3ea8a01 RNNitroSQLite: e36968e81bbcab6c9e97a35e74ae34c7420d734c RNPermissions: fd6b2676e74ecb6d2dec0a6168502ab7af733e34