MCPcopy Create free account
hub / github.com/effect-app/libs / trans

Function trans

packages/vue/src/makeIntl.ts:43–50  ·  view source on GitHub ↗
(
      id: keyof (typeof messages)[Locale],
      values?: Record<
        string,
        PrimitiveType | FormatXMLElementFn<string, string>
      >
      // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
    )

Source from the content-addressed store, hash-verified

41 const locale = LocaleContext.use()
42
43 const trans = (
44 id: keyof (typeof messages)[Locale],
45 values?: Record<
46 string,
47 PrimitiveType | FormatXMLElementFn<string, string>
48 >
49 // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
50 ) => intls[locale.value].formatMessage({ id: id as any }, values)
51
52 watch(
53 locale,

Callers 4

onDialogClosingFunction · 0.85
leafHookFunction · 0.85
checkHookFunction · 0.85
walkAstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…