87 lines
3.4 KiB
TypeScript
87 lines
3.4 KiB
TypeScript
// Module ID: 1233
|
|
// Function ID: 1234
|
|
// Name: getSystemLocale
|
|
// Dependencies: [19, 673, 21, 17, 1234, 663, 1236, 1273, 1296, 14050, 2, 14051, 14054]
|
|
// Exports: getSystemLocale, useSyncMessages
|
|
|
|
// Module 1233 (getSystemLocale)
|
|
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
|
|
import noopAll from "noop" /* 19 */;
|
|
import enforcing from "enforcing" /* 663 */;
|
|
import getAvailableLocales2 from "getAvailableLocales" /* 1236 */;
|
|
import Button from "Button" /* 1296 */;
|
|
import IntlLink from "IntlLink" /* 14050 */;
|
|
import messagesProxyDefault from "messagesProxy" /* 14054 */;
|
|
import { Fonts } from "ME" /* 673 */;
|
|
import { jsx } from "jsxProd" /* 21 */;
|
|
import set from "set" /* 1234 */;
|
|
import getAvailableLocales from "getAvailableLocales" /* 1236 */;
|
|
import module_1273 from "module_1273" /* 1273 */;
|
|
|
|
require = arg1;
|
|
noopAll;
|
|
let obj = { fontFamily: Fonts.PRIMARY_SEMIBOLD };
|
|
obj = { fontFamily: Fonts.CODE_NORMAL };
|
|
let closure_3 = { strong: obj, italic: { fontStyle: "italic" }, code: obj, del: { textDecorationLine: "line-through", textDecorationStyle: "solid" } };
|
|
if (set.isAndroid()) {
|
|
let LocalizationManager = require("enforcing").default;
|
|
} else {
|
|
LocalizationManager = get_ActivityIndicator.NativeModules.LocalizationManager;
|
|
}
|
|
let str = "en-US";
|
|
if (null != LocalizationManager) {
|
|
str = LocalizationManager.getConstants().Language;
|
|
}
|
|
function getSystemLocale(arg0) {
|
|
const tmp = require;
|
|
const tmp3 = get_ActivityIndicator;
|
|
if (obj.isAndroid()) {
|
|
let LocalizationManager = enforcing.default;
|
|
} else {
|
|
LocalizationManager = tmp3.NativeModules.LocalizationManager;
|
|
}
|
|
let Language = arg0;
|
|
if (null != LocalizationManager) {
|
|
Language = LocalizationManager.getConstants().Language;
|
|
}
|
|
return Language;
|
|
}
|
|
const normalizedLocale = getAvailableLocales.getNormalizedLocale(str, "en-US");
|
|
obj = {
|
|
$i(children) {
|
|
return jsx(Button.LegacyText, { style: closure_3.italic, children }, arg1);
|
|
},
|
|
$b(children) {
|
|
return jsx(Button.LegacyText, { style: closure_3.strong, children }, arg1);
|
|
},
|
|
$del(children) {
|
|
return jsx(Button.LegacyText, { style: closure_3.del, children }, arg1);
|
|
},
|
|
$p(children) {
|
|
return jsx(Button.LegacyText, { children }, arg1);
|
|
},
|
|
$code(children) {
|
|
return jsx(Button.LegacyText, { style: closure_3.code, children }, arg1);
|
|
},
|
|
$link(children) {
|
|
[tmp] = arg2;
|
|
return jsx(IntlLink.IntlLink, { target: tmp, children }, arg1);
|
|
}
|
|
};
|
|
const reactFormatter = module_1273.makeReactFormatter(obj);
|
|
const intlManager = new require("module_1273").IntlManager({ initialLocale: normalizedLocale, defaultLocale: "en-US" });
|
|
set = { format: reactFormatter, formatToPlainString: require("module_1273").stringFormatter, formatToMarkdownString: require("module_1273").markdownFormatter, formatToParts: require("module_1273").astFormatter };
|
|
set = intlManager.withFormatters(set);
|
|
const result = set.fileFinishedImporting("intl/index.native.tsx");
|
|
|
|
export const intl = set;
|
|
export { getSystemLocale };
|
|
export const getAvailableLocales = require("getAvailableLocales").getAvailableLocales;
|
|
export const getLanguages = require("getAvailableLocales").getLanguages;
|
|
export const useSyncMessages = function useSyncMessages(arg0) {
|
|
return getAvailableLocales2.useSyncMessages(arg0, set);
|
|
};
|
|
export const t = require("_defaultMessages")._defaultMessages;
|
|
export const international = messagesProxyDefault;
|
|
export const systemLocale = str;
|
|
export const initialLocale = normalizedLocale;
|