From d45cd218470ddca67af6871387682b2d4c350702 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Sun, 28 Jan 2024 01:02:34 -0600 Subject: [PATCH] just a couple tiny changes to i18n related code. --- src/i18n/ui.ts | 6 ------ src/i18n/utils.ts | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index e5679bd..178b523 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -1,12 +1,6 @@ import en from './en.json'; import jp from './jp.json'; - -export const languages = { - en: 'English', - jp: "日本語", - }; - export const defaultLang = 'en'; export const ui = { diff --git a/src/i18n/utils.ts b/src/i18n/utils.ts index a206047..85f2065 100644 --- a/src/i18n/utils.ts +++ b/src/i18n/utils.ts @@ -1,6 +1,7 @@ import { ui, defaultLang } from './ui'; export function getLangFromUrl(url: URL) { + // comma lol const [, lang] = url.pathname.split('/'); if (lang in ui) return lang as keyof typeof ui; return defaultLang;