mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
localeIdentifier missing from flow type of I18nManager (#31589)
Summary: https://github.com/facebook/react-native/commit/23d9bf1a24f80003a8a3c0b82e9b5691e4e6544e looks like it accidently removed `localeIdentifier` from I18nManager. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fixed] - Re-added localeIdentifier to I18nManager constants Pull Request resolved: https://github.com/facebook/react-native/pull/31589 Reviewed By: GijsWeterings Differential Revision: D28690202 Pulled By: fkgozali fbshipit-source-id: 543a491f89789bca5629e1251c94fd055ec4a801
This commit is contained in:
@@ -13,12 +13,17 @@ import NativeI18nManager from './NativeI18nManager';
|
||||
const i18nConstants: {|
|
||||
doLeftAndRightSwapInRTL: boolean,
|
||||
isRTL: boolean,
|
||||
localeIdentifier?: ?string,
|
||||
|} = getI18nManagerConstants();
|
||||
|
||||
function getI18nManagerConstants() {
|
||||
if (NativeI18nManager) {
|
||||
const {isRTL, doLeftAndRightSwapInRTL} = NativeI18nManager.getConstants();
|
||||
return {isRTL, doLeftAndRightSwapInRTL};
|
||||
const {
|
||||
isRTL,
|
||||
doLeftAndRightSwapInRTL,
|
||||
localeIdentifier,
|
||||
} = NativeI18nManager.getConstants();
|
||||
return {isRTL, doLeftAndRightSwapInRTL, localeIdentifier};
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -28,7 +33,11 @@ function getI18nManagerConstants() {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getConstants: (): {|doLeftAndRightSwapInRTL: boolean, isRTL: boolean|} => {
|
||||
getConstants: (): {|
|
||||
doLeftAndRightSwapInRTL: boolean,
|
||||
isRTL: boolean,
|
||||
localeIdentifier: ?string,
|
||||
|} => {
|
||||
return i18nConstants;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user