From 58f7d52150456713d3132408668a92d0f6f3d084 Mon Sep 17 00:00:00 2001
From: Ruben Beltran del Rio <ruben@unlimited.pizza>
Date: Thu, 15 Apr 2021 23:06:26 +0200
Subject: Port to sveltekit

---
 .../language_selector/language_selector.svelte     | 33 +++++++++++-----------
 1 file changed, 16 insertions(+), 17 deletions(-)

(limited to 'src/components/language_selector/language_selector.svelte')

diff --git a/src/components/language_selector/language_selector.svelte b/src/components/language_selector/language_selector.svelte
index 3ac4894..3338810 100644
--- a/src/components/language_selector/language_selector.svelte
+++ b/src/components/language_selector/language_selector.svelte
@@ -1,28 +1,27 @@
 <script>
-  import { locale, locales } from 'svelte-i18n';
-  import { getLangNameFromCode } from 'language-name-map';
+	import { locale, locales } from 'svelte-i18n';
+	import { getLangNameFromCode } from 'language-name-map';
 
-  $: namedLocales = $locales
-    .map((code) => ({
-      code,
-      ...getLangNameFromCode(code)
-    }))
-    .sort((a, b) => a.native - b.native);
+	$: namedLocales = $locales
+	  .map((code) => ({
+	    code,
+	    ...getLangNameFromCode(code)
+	  }))
+	  .sort((a, b) => a.native - b.native);
 
-  let selected = $locale;
+	let selected = $locale;
 
-  $: {
-    console.log(`the current locale is ${selected}`);
-    locale.set(selected);
-  }
+	$: {
+	  console.log(`the current locale is ${selected}`);
+	  locale.set(selected);
+	}
 </script>
 
 <select bind:value={selected}>
-  {#each namedLocales as namedLocale}
-    <option value="{ namedLocale.code }">{ namedLocale.native }</option>
-  {/each}
+	{#each namedLocales as namedLocale}
+		<option value={namedLocale.code}>{namedLocale.native}</option>
+	{/each}
 </select>
 
 <style>
 </style>
-
-- 
cgit 

