From d5ce12edb3822ae0f354a7a77f33f43fa16b205d Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sat, 20 Jan 2024 23:10:52 -0800
Subject: refactor(locale): typed locales

---
 src/routes/+layout.svelte | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'src/routes/+layout.svelte')

diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 8500526d..505096b9 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -14,16 +14,17 @@
 	import Root from '$lib/Home/Root.svelte';
 	import root from '$lib/Utility/root';
 	import { addMessages, init, _ } from 'svelte-i18n';
-	import en from '$lib/Locale/en.json';
-	import ja from '$lib/Locale/ja.json';
+	import english from '$lib/Locale/english';
+	import japanese from '$lib/Locale/japanese';
+	import type { LocaleDictionary } from '$lib/Locale/layout';
 
 	export let data;
 
-	addMessages('en', en);
-	addMessages('ja', ja);
+	addMessages('en', english as unknown as LocaleDictionary);
+	addMessages('ja', japanese as unknown as LocaleDictionary);
 
 	$: {
-		// import(`../lib/Locale/${$settings.displayLanguage}.json`).then((module) => {
+		// import(`../lib/Locale/${$settings.displayLanguage}`).then((module) => {
 		// 	addMessages($settings.displayLanguage, module.default);
 		// });
 
-- 
cgit v1.2.3

