diff options
| author | Adrien Hopkins <[email protected]> | 2022-07-29 15:52:21 -0500 |
|---|---|---|
| committer | Adrien Hopkins <[email protected]> | 2022-07-29 15:52:21 -0500 |
| commit | 5535adee8c980ed142d6d3e3178df04e6f51eb4d (patch) | |
| tree | 0ae844abfd1f223fd79a8361862938908392bada /src | |
| parent | 11c725b7ac41fe75b54732b19814cffafdb2e7f9 (diff) | |
| download | coinos-ui-5535adee8c980ed142d6d3e3178df04e6f51eb4d.tar.gz coinos-ui-5535adee8c980ed142d6d3e3178df04e6f51eb4d.zip | |
reverted function commit (broke localization)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/i18n.js | 18 | ||||
| -rw-r--r-- | src/routes/__layout.svelte | 3 |
2 files changed, 8 insertions, 13 deletions
diff --git a/src/lib/i18n.js b/src/lib/i18n.js index 2d39e292..5232a399 100644 --- a/src/lib/i18n.js +++ b/src/lib/i18n.js @@ -41,15 +41,11 @@ function pickLocale(navigatorLocale, availableLocales) { } } -/** - * Loads all of the locales, picks a default locale, and sets up internationalization in that locale. - */ -export function setupI18n() { - localeCodes.forEach(addLocale); - let initialLocale = pickLocale(getLocaleFromNavigator(), localeCodes); +// add locales +localeCodes.forEach(addLocale); - init({ - fallbackLocale: 'en', - initialLocale: initialLocale, - }); -} +let initialLocale = pickLocale(getLocaleFromNavigator(), localeCodes); +init({ + fallbackLocale: 'en', + initialLocale: initialLocale, +}); diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 76b19234..ed1ad188 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -3,10 +3,9 @@ import { onMount } from 'svelte'; import { connect } from '$lib/socket'; - import { setupI18n } from '$lib/i18n'; + import '$lib/i18n'; onMount(connect); - setupI18n(); </script> <slot /> |
