wip: RichText & Templating for i18n, refactored & began i18n for Discord Server Rules using the new features
This commit is contained in:
parent
feacb9b754
commit
a3adc2526f
25 changed files with 929 additions and 141 deletions
|
|
@ -3,11 +3,13 @@ import "./assets/style.scss";
|
|||
import { computed, ref, type Ref } from "vue";
|
||||
import LocalePicker from "./components/organisms/LocalePicker.vue";
|
||||
import { vOnClickOutside } from "@vueuse/components";
|
||||
import { useLocale } from "./i18n";
|
||||
import { useRouter } from "vue-router";
|
||||
import SmartLink from "./components/organisms/SmartLink.vue";
|
||||
import SmartLink from "./components/atoms/SmartLink.vue";
|
||||
import type { SmartDest } from "./utils/smart-dest";
|
||||
import type { Locale } from "./i18n/locale";
|
||||
import { useI18n } from "./i18n";
|
||||
|
||||
const i18n = useI18n();
|
||||
|
||||
const burgerOpen: Ref<boolean> = ref<boolean>(false);
|
||||
|
||||
|
|
@ -19,8 +21,6 @@ const closeBurger = (): void => {
|
|||
burgerOpen.value = false;
|
||||
};
|
||||
|
||||
const locale = useLocale();
|
||||
|
||||
const router = useRouter();
|
||||
router.beforeEach(() => {
|
||||
closeBurger();
|
||||
|
|
@ -39,7 +39,7 @@ const NAVBAR_ITEM_ORDER = [
|
|||
|
||||
const navbarItems = computed(() =>
|
||||
NAVBAR_ITEM_ORDER.map((id): NavbarItem => {
|
||||
const label = locale.value.navbar[id];
|
||||
const label = i18n.t(`navbar.${id}`);
|
||||
|
||||
const to = ((): SmartDest => {
|
||||
switch (id) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue