decord/source/intl/index.native.tsx

76 lines
2.9 KiB
TypeScript
Raw Normal View History

// Module ID: 1114
// Function ID: 1115
// Name: util
// Dependencies: [19, 1074, 21, 1115, 1116, 1155, 1178, 14272, 2, 14273, 14276]
2026-07-20 16:05:17 +00:00
// Exports: getSystemLocale, useSyncMessages
// Module 1114 (util)
import NativeDeviceLocaleModule from "NativeDeviceLocaleModule" /* 1115 */;
import intl_util from "intl/util" /* 1116 */;
import native from "native" /* 1178 */;
import migration from "migration" /* 14272 */;
import _modDef14276 from "module_14276" /* 14276 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
const Fonts = fn(1074).Fonts;
const jsx = fn(21).jsx;
let obj = { strong: { fontFamily: Fonts.PRIMARY_SEMIBOLD }, italic: { fontStyle: "italic" }, code: { fontFamily: Fonts.CODE_NORMAL }, del: { textDecorationLine: "line-through", textDecorationStyle: "solid" } };
let _default = fn(1115).default;
2026-07-29 08:29:29 +00:00
let str = "en-US";
if (null != _default) {
str = _default.getConstants().Language;
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
function getSystemLocale(arg0) {
2026-07-29 08:29:29 +00:00
let Language = arg0;
const _default = NativeDeviceLocaleModule.default;
if (null != _default) {
Language = _default.getConstants().Language;
2026-07-20 16:05:17 +00:00
}
return Language;
}
const util = fn(1116);
const normalizedLocale = util.getNormalizedLocale(str, "en-US");
const module_1155 = fn(1155);
const reactFormatter = module_1155.makeReactFormatter({
$i(children, arg1) {
obj = { style: obj.italic, children };
return jsx(native.LegacyText, { style: obj.italic, children }, arg1);
2026-07-20 16:05:17 +00:00
},
$b(children, arg1) {
obj = { style: obj.strong, children };
return jsx(native.LegacyText, { style: obj.strong, children }, arg1);
2026-07-20 16:05:17 +00:00
},
$del(children, arg1) {
obj = { style: obj.del, children };
return jsx(native.LegacyText, { style: obj.del, children }, arg1);
2026-07-20 16:05:17 +00:00
},
$p(children, arg1) {
return jsx(native.LegacyText, { children }, arg1);
2026-07-20 16:05:17 +00:00
},
$code(children, arg1) {
obj = { style: obj.code, children };
return jsx(native.LegacyText, { style: obj.code, children }, arg1);
2026-07-20 16:05:17 +00:00
},
$link(children, arg1, arg2) {
2026-07-20 16:05:17 +00:00
[tmp] = arg2;
return jsx(migration.IntlLink, { target: tmp, children }, arg1);
2026-07-20 16:05:17 +00:00
}
});
const intlManager = new fn(1155).IntlManager({ initialLocale: normalizedLocale, defaultLocale: "en-US" });
const withFormattersResult = intlManager.withFormatters({ format: reactFormatter, formatToPlainString: fn(1155).stringFormatter, formatToMarkdownString: fn(1155).markdownFormatter, formatToParts: fn(1155).astFormatter });
const size = fn(2);
const result = size.fileFinishedImporting("intl/index.native.tsx");
2026-07-20 16:05:17 +00:00
export const intl = withFormattersResult;
2026-07-20 16:05:17 +00:00
export { getSystemLocale };
export const getAvailableLocales = fn(1116).getAvailableLocales;
export const getLanguages = fn(1116).getLanguages;
2026-07-20 16:05:17 +00:00
export const useSyncMessages = function useSyncMessages(arg0) {
return intl_util.useSyncMessages(arg0, withFormattersResult);
2026-07-20 16:05:17 +00:00
};
export const t = fn(14273)._defaultMessages;
export const international = _modDef14276;
2026-07-29 08:29:29 +00:00
export const systemLocale = str;
2026-07-20 16:05:17 +00:00
export const initialLocale = normalizedLocale;