decord/source/intl/index.native.tsx

88 lines
3.4 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1236
// Function ID: 1237
2026-07-20 16:05:17 +00:00
// Name: getSystemLocale
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 676, 21, 17, 500, 666, 1237, 1274, 1297, 13641, 2, 13642, 13645]
2026-07-20 16:05:17 +00:00
// Exports: getSystemLocale, useSyncMessages
2026-07-29 08:29:29 +00:00
// Module 1236 (getSystemLocale)
2026-08-24 06:08:38 +00:00
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import noopAll from "noop" /* 19 */;
import enforcing from "enforcing" /* 666 */;
import getAvailableLocales2 from "getAvailableLocales" /* 1237 */;
import Button from "Button" /* 1297 */;
2026-08-25 06:04:03 +00:00
import IntlLink from "IntlLink" /* 13641 */;
import messagesProxyDefault from "messagesProxy" /* 13645 */;
2026-08-24 06:08:38 +00:00
import { Fonts } from "ME" /* 676 */;
import { jsx } from "jsxProd" /* 21 */;
import set from "set" /* 500 */;
import getAvailableLocales from "getAvailableLocales" /* 1237 */;
import module_1274 from "module_1274" /* 1274 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
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;
}
2026-07-20 16:05:17 +00:00
function getSystemLocale(arg0) {
2026-07-29 08:29:29 +00:00
const tmp = require;
2026-08-24 06:08:38 +00:00
const tmp3 = get_ActivityIndicator;
2026-07-20 16:05:17 +00:00
if (obj.isAndroid()) {
2026-08-24 06:08:38 +00:00
let LocalizationManager = enforcing.default;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
LocalizationManager = tmp3.NativeModules.LocalizationManager;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let Language = arg0;
2026-07-20 16:05:17 +00:00
if (null != LocalizationManager) {
Language = LocalizationManager.getConstants().Language;
}
return Language;
}
2026-07-29 08:29:29 +00:00
const normalizedLocale = getAvailableLocales.getNormalizedLocale(str, "en-US");
2026-07-20 16:05:17 +00:00
obj = {
$i(children) {
2026-08-24 06:08:38 +00:00
return jsx(Button.LegacyText, { style: closure_3.italic, children }, arg1);
2026-07-20 16:05:17 +00:00
},
$b(children) {
2026-08-24 06:08:38 +00:00
return jsx(Button.LegacyText, { style: closure_3.strong, children }, arg1);
2026-07-20 16:05:17 +00:00
},
$del(children) {
2026-08-24 06:08:38 +00:00
return jsx(Button.LegacyText, { style: closure_3.del, children }, arg1);
2026-07-20 16:05:17 +00:00
},
$p(children) {
2026-08-24 06:08:38 +00:00
return jsx(Button.LegacyText, { children }, arg1);
2026-07-20 16:05:17 +00:00
},
$code(children) {
2026-08-24 06:08:38 +00:00
return jsx(Button.LegacyText, { style: closure_3.code, children }, arg1);
2026-07-20 16:05:17 +00:00
},
$link(children) {
[tmp] = arg2;
2026-08-24 06:08:38 +00:00
return jsx(IntlLink.IntlLink, { target: tmp, children }, arg1);
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
const reactFormatter = module_1274.makeReactFormatter(obj);
const intlManager = new require("module_1274").IntlManager({ initialLocale: normalizedLocale, defaultLocale: "en-US" });
set = { format: reactFormatter, formatToPlainString: require("module_1274").stringFormatter, formatToMarkdownString: require("module_1274").markdownFormatter, formatToParts: require("module_1274").astFormatter };
set = intlManager.withFormatters(set);
const result = set.fileFinishedImporting("intl/index.native.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const intl = set;
2026-07-20 16:05:17 +00:00
export { getSystemLocale };
2026-07-29 08:29:29 +00:00
export const getAvailableLocales = require("getAvailableLocales").getAvailableLocales;
export const getLanguages = require("getAvailableLocales").getLanguages;
2026-07-20 16:05:17 +00:00
export const useSyncMessages = function useSyncMessages(arg0) {
2026-08-24 06:08:38 +00:00
return getAvailableLocales2.useSyncMessages(arg0, set);
2026-07-20 16:05:17 +00:00
};
2026-07-23 10:11:24 +00:00
export const t = require("_defaultMessages")._defaultMessages;
2026-08-24 06:08:38 +00:00
export const international = messagesProxyDefault;
2026-07-29 08:29:29 +00:00
export const systemLocale = str;
2026-07-20 16:05:17 +00:00
export const initialLocale = normalizedLocale;