diff options
| author | Fuwn <[email protected]> | 2024-01-21 02:08:07 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-21 02:08:07 -0800 |
| commit | 4a2e83f9376238dcf8a9dd8d4839515e8c075802 (patch) | |
| tree | 9dc3c403039150bbd4c41ae50655a7384aa7016c /src/routes | |
| parent | feat(locale): typed locale getter (diff) | |
| download | due.moe-4a2e83f9376238dcf8a9dd8d4839515e8c075802.tar.xz due.moe-4a2e83f9376238dcf8a9dd8d4839515e8c075802.zip | |
refactor(settings): use typed localiser
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/settings/+page.svelte | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index c878f364..180b3554 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -13,7 +13,7 @@ import { getNotificationsContext } from 'svelte-notifications'; import { options } from '$lib/Notification/options.js'; import tooltip from '$lib/Tooltip/tooltip'; - import { _ } from 'svelte-i18n'; + import locale from '$stores/locale.js'; export let data; @@ -36,7 +36,7 @@ <a href="https://anilist.co/user/fuwn" target="_blank" - title={$_('settings.tooltips.author')} + title={$locale().settings.tooltips.author} use:tooltip>@fuwn</a > on AniList! </blockquote> @@ -44,7 +44,7 @@ {#if data.user === undefined} <div class="card">Please log in to modify settings.</div> {:else} - <Category title={$_('settings.rss_feeds.title')} id="feeds"> + <Category title={$locale().settings.rss_feeds.title} id="feeds"> <button on:click={() => { addNotification( @@ -61,14 +61,14 @@ ); }} > - {$_('settings.rss_feeds.buttons.copy_to_clipboard')} + {$locale().settings.rss_feeds.buttons.copy_to_clipboard} </button> Your AniList notifications RSS feed URL <SettingHint lineBreak> This <a href="https://en.wikipedia.org/wiki/RSS" target="_blank" - title={$_('settings.rss_feeds.tooltips.rss')} + title={$locale().settings.rss_feeds.tooltips.rss} use:tooltip data-tooltip-above>RSS</a > @@ -77,19 +77,19 @@ Do not share this link with <b>anyone</b>! </SettingHint> </Category> - <Category title={$_('settings.display.title')}><Display /></Category> - <Category title={$_('settings.calculation.title')}><Calculation /></Category> - <Category title={$_('settings.cache.title')}><Cache /></Category> + <Category title={$locale().settings.display.title}><Display /></Category> + <Category title={$locale().settings.calculation.title}><Calculation /></Category> + <Category title={$locale().settings.cache.title}><Cache /></Category> <Category id="debug"> <summary - >{$_('settings.debug.title')}<button + >{$locale().settings.debug.title}<button class="smaller-button button-badge badge-info" - title={$_('settings.debug.tooltips.version')} + title={$locale().settings.debug.tooltips.version} use:tooltip>{data.commit.slice(0, 7)}</button ></summary > <Debug /> </Category> - <Category title={$_('settings.attributions.title')} open={false}><Attributions /></Category> + <Category title={$locale().settings.attributions.title} open={false}><Attributions /></Category> {/if} |