Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Libraries/ReactNative/I18nManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ 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();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettier/prettier: Replace isRTL,·doLeftAndRightSwapInRTL,·localeIdentifier with ⏎······isRTL,⏎······doLeftAndRightSwapInRTL,⏎······localeIdentifier,⏎····

return {isRTL, doLeftAndRightSwapInRTL, localeIdentifier};
}

return {
Expand All @@ -28,7 +29,11 @@ function getI18nManagerConstants() {
}

module.exports = {
getConstants: (): {|doLeftAndRightSwapInRTL: boolean, isRTL: boolean|} => {
getConstants: (): {|
doLeftAndRightSwapInRTL: boolean,
isRTL: boolean,
localeIdentifier: ?string,
|} => {
return i18nConstants;
},

Expand Down