More things
This commit is contained in:
@@ -24,7 +24,12 @@ function escapeHtml(text: string): string {
|
||||
}
|
||||
|
||||
export function useAppLocale() {
|
||||
const { locale, setLocale, t } = useI18n()
|
||||
/* The global composer, not `useI18n()`: that one insists on a component
|
||||
instance, and this composable also runs from the auth plugin, which has
|
||||
none — a plugin runs in the Nuxt app's context, never in a `setup`. It is
|
||||
the same composer `useI18n()` hands to a component anyway, since no part of
|
||||
the wiki keeps messages of its own. */
|
||||
const { locale, setLocale, t } = useNuxtApp().$i18n
|
||||
|
||||
/* Translate a message that is drawn with v-html. Every interpolated value
|
||||
is escaped — tags, slugs and usernames wander into these — while the
|
||||
|
||||
Reference in New Issue
Block a user