78 lines
2.5 KiB
TypeScript
78 lines
2.5 KiB
TypeScript
// Metro module 1236 (f1237).
|
|
import { Fonts } from "../Constants";
|
|
import { NativeModules } from "react-native";
|
|
import { isAndroid } from "../utils/PlatformUtils";
|
|
import * as _Module666 from "../_bundle/Module666";
|
|
import * as _util from "./util";
|
|
import { getNormalizedLocale } from "./util";
|
|
import { makeReactFormatter, IntlManager, stringFormatter, markdownFormatter, astFormatter } from "../_bundle/Module1274";
|
|
import { LegacyText } from "../design/void/native";
|
|
import { IntlLink } from "./native/migration";
|
|
import { _defaultMessages } from "./defaultMessageProxy";
|
|
import international_messages from "./messages/international.messages";
|
|
let c1033_4;
|
|
let c1033_3 = {
|
|
strong: {
|
|
fontFamily: Fonts.PRIMARY_SEMIBOLD
|
|
},
|
|
italic: {
|
|
fontStyle: "italic"
|
|
},
|
|
code: {
|
|
fontFamily: Fonts.CODE_NORMAL
|
|
},
|
|
del: {
|
|
textDecorationLine: "line-through",
|
|
textDecorationStyle: "solid"
|
|
}
|
|
};
|
|
const r43 = isAndroid() ? _Module666.default : NativeModules.LocalizationManager;
|
|
const r47 = r43 != null ? r43.getConstants().Language : "en-US";
|
|
export function getSystemLocale(a0) {
|
|
const r11 = isAndroid() ? _Module666.default : NativeModules.LocalizationManager;
|
|
return r11 != null ? r11.getConstants().Language : a0;
|
|
}
|
|
const normalizedLocale = getNormalizedLocale(r47, "en-US");
|
|
const format = makeReactFormatter({
|
|
$i: (a0, a1) => <LegacyText key={a1} style={c1033_3.italic}>
|
|
{a0}
|
|
</LegacyText>,
|
|
$b: (a0, a1) => <LegacyText key={a1} style={c1033_3.strong}>
|
|
{a0}
|
|
</LegacyText>,
|
|
$del: (a0, a1) => <LegacyText key={a1} style={c1033_3.del}>
|
|
{a0}
|
|
</LegacyText>,
|
|
$p: (a0, a1) => <LegacyText key={a1}>
|
|
{a0}
|
|
</LegacyText>,
|
|
$code: (a0, a1) => <LegacyText key={a1} style={c1033_3.code}>
|
|
{a0}
|
|
</LegacyText>,
|
|
$link: (a0, a1, a2) => {
|
|
const [target] = a2;
|
|
return <IntlLink key={a1} target={target}>
|
|
{a0}
|
|
</IntlLink>;
|
|
}
|
|
});
|
|
c1033_4 = new IntlManager({
|
|
initialLocale: normalizedLocale,
|
|
defaultLocale: "en-US"
|
|
}).withFormatters({
|
|
format,
|
|
formatToPlainString: stringFormatter,
|
|
formatToMarkdownString: markdownFormatter,
|
|
formatToParts: astFormatter
|
|
});
|
|
export { c1033_4 as intl };
|
|
export const getAvailableLocales = _util.getAvailableLocales;
|
|
export const getLanguages = _util.getLanguages;
|
|
export function useSyncMessages(a0) {
|
|
return _util.useSyncMessages(a0, c1033_4);
|
|
}
|
|
export const t = _defaultMessages;
|
|
export { international_messages as international };
|
|
export { r47 as systemLocale };
|
|
export { normalizedLocale as initialLocale };
|