mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(nuxt) dynamically load all locale components
This commit is contained in:
parent
5b77e76a37
commit
0b78d349b7
@ -3,12 +3,13 @@ import { useNuxtApp } from 'nuxt/app';
|
||||
|
||||
import useConfig from '~/composables/useConfig.ts';
|
||||
import useSimpleHead from '~/composables/useSimpleHead.ts';
|
||||
import EnglishTable from '~/data/pronouns/EnglishTable.vue';
|
||||
|
||||
definePageMeta({
|
||||
translatedPaths: (config) => translatedPathByConfigModule(config.english),
|
||||
});
|
||||
|
||||
const EnglishTable = useLocaleComponent('pronouns', 'EnglishTable');
|
||||
|
||||
const { $translator: translator } = useNuxtApp();
|
||||
useSimpleHead({
|
||||
title: translator.translate('english.headerLonger'),
|
||||
|
@ -4,13 +4,13 @@ import { useNuxtApp } from 'nuxt/app';
|
||||
import type NounsDictionary from '~/components/nouns/NounsDictionary.vue';
|
||||
import useConfig from '~/composables/useConfig.ts';
|
||||
import useSimpleHead from '~/composables/useSimpleHead.ts';
|
||||
import NounsExtra from '~/data/nouns/NounsExtra.vue';
|
||||
|
||||
definePageMeta({
|
||||
translatedPaths: (config) => translatedPathByConfigModule(config.nouns),
|
||||
});
|
||||
|
||||
const NounsNav = useLocaleComponent('nouns', 'NounsNav');
|
||||
const NounsExtra = useLocaleComponent('nouns', 'NounsExtra');
|
||||
|
||||
const { $translator: translator } = useNuxtApp();
|
||||
useSimpleHead({
|
||||
|
@ -1,11 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import useConfig from '~/composables/useConfig.ts';
|
||||
import Suggested from '~/data/pronouns/Suggested.vue';
|
||||
|
||||
definePageMeta({
|
||||
translatedPaths: (config) => translatedPathByConfigModule(config.pronouns),
|
||||
});
|
||||
|
||||
const Suggested = useLocaleComponent('pronouns', 'Suggested');
|
||||
|
||||
const config = useConfig();
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user