Skip to content

Commit 795226d

Browse files
authored
Merge pull request Expensify#72447 from software-mansion-labs/bump-react-native-localize
2 parents eed8391 + 382cfaf commit 795226d

5 files changed

Lines changed: 38 additions & 14 deletions

File tree

__mocks__/react-native-localize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// use a provided translation, or return undefined to test your fallback
2-
const findBestAvailableLanguage = () => ({
2+
const findBestLanguageTag = () => ({
33
languageTag: 'en',
44
isRTL: false,
55
});
66

77
// eslint-disable-next-line import/prefer-default-export
8-
export {findBestAvailableLanguage};
8+
export {findBestLanguageTag};

ios/Podfile.lock

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2843,8 +2843,30 @@ PODS:
28432843
- ReactCommon/turbomodule/core
28442844
- RNReanimated/worklets
28452845
- Yoga
2846-
- RNLocalize (2.2.6):
2846+
- RNLocalize (3.5.4):
2847+
- DoubleConversion
2848+
- glog
2849+
- hermes-engine
2850+
- RCT-Folly (= 2024.11.18.00)
2851+
- RCTRequired
2852+
- RCTTypeSafety
28472853
- React-Core
2854+
- React-debug
2855+
- React-Fabric
2856+
- React-featureflags
2857+
- React-graphics
2858+
- React-hermes
2859+
- React-ImageManager
2860+
- React-jsi
2861+
- React-NativeModulesApple
2862+
- React-RCTFabric
2863+
- React-renderercss
2864+
- React-rendererdebug
2865+
- React-utils
2866+
- ReactCodegen
2867+
- ReactCommon/turbomodule/bridging
2868+
- ReactCommon/turbomodule/core
2869+
- Yoga
28482870
- rnmapbox-maps (10.1.44):
28492871
- MapboxMaps (~> 10.19.0)
28502872
- React
@@ -3863,7 +3885,7 @@ SPEC CHECKSUMS:
38633885
RNGestureHandler: 61d3e94abb866ee955563ddf073e405e3f541359
38643886
RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0
38653887
RNLiveMarkdown: 6a36c82776afa8fd2c41c2c6e299c6dd77f249ce
3866-
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
3888+
RNLocalize: e3a384870bd61fccfcc46de28089371907ed2e14
38673889
rnmapbox-maps: f3875edd847c82d770d1b57852b36d45b3ea8a01
38683890
RNNitroSQLite: e36968e81bbcab6c9e97a35e74ae34c7420d734c
38693891
RNPermissions: fd6b2676e74ecb6d2dec0a6168502ab7af733e34

package-lock.json

Lines changed: 10 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
"react-native-key-command": "1.0.14",
186186
"react-native-keyboard-controller": "1.18.5",
187187
"react-native-launch-arguments": "^4.0.2",
188-
"react-native-localize": "^2.2.6",
188+
"react-native-localize": "^3.5.4",
189189
"react-native-nitro-modules": "0.29.4",
190190
"react-native-nitro-sqlite": "9.1.11",
191191
"react-native-onyx": "3.0.6",

src/libs/Localize/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function formatMessageElementList<E extends MessageElementBase>(elements: readon
197197
* Returns the user device's preferred language.
198198
*/
199199
function getDevicePreferredLocale(): Locale {
200-
return RNLocalize.findBestAvailableLanguage(Object.values(CONST.LOCALES))?.languageTag ?? CONST.LOCALES.DEFAULT;
200+
return RNLocalize.findBestLanguageTag(Object.values(CONST.LOCALES))?.languageTag ?? CONST.LOCALES.DEFAULT;
201201
}
202202

203203
// eslint-disable-next-line @typescript-eslint/no-deprecated

0 commit comments

Comments
 (0)