From e8f574892dbec351c495368af9747e7afb8d6038 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 6 Feb 2024 06:14:28 -0800 Subject: feat(locale): localise debug settings --- src/lib/Locale/english.ts | 14 ++++++++++++++ src/lib/Locale/japanese.ts | 14 ++++++++++++++ src/lib/Locale/layout.ts | 12 ++++++++++++ src/lib/Settings/Categories/Debug.svelte | 16 +++++++++------- 4 files changed, 49 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/lib/Locale/english.ts b/src/lib/Locale/english.ts index 9e0868d0..fe449d34 100644 --- a/src/lib/Locale/english.ts +++ b/src/lib/Locale/english.ts @@ -216,6 +216,20 @@ const English: Locale = { long: "Today's Character Birthdays" } } + }, + debug: { + clearCaches: 'Clear anime and manga list caches', + resetAllSettings: { + title: 'Reset ALL settings', + hint: 'Resets all settings present on this page to their default values' + }, + clearLocalStorage: { + title: 'Clear', + hint1: + 'Resets all of your settings to their default values and clears both AniList media list and manga data caches', + hint2: + 'If you are having issues with data loading or logging out, it is recommended to clear your site data.' + } } }; diff --git a/src/lib/Locale/japanese.ts b/src/lib/Locale/japanese.ts index fb9cff07..7326a3a0 100644 --- a/src/lib/Locale/japanese.ts +++ b/src/lib/Locale/japanese.ts @@ -218,6 +218,20 @@ const Japanese: Locale = { long: '今日のキャラクターの誕生日' } } + }, + debug: { + clearCaches: 'ブラウザのAniListアニメと漫画リストのキャッシュを消去する', + resetAllSettings: { + title: 'すべての設定をリセット', + hint: 'このページにあるすべての設定をデフォルト値にリセットします' + }, + clearLocalStorage: { + title: 'クリア', + hint1: + 'すべての設定をデフォルト値にリセットし、AniListメディアリストと漫画データキャッシュをクリアします', + hint2: + 'データの読み込みやログアウトに問題がある場合、サイトデータをクリアすることをお勧めします。' + } } }; diff --git a/src/lib/Locale/layout.ts b/src/lib/Locale/layout.ts index 99ff5cae..d2af0a4c 100644 --- a/src/lib/Locale/layout.ts +++ b/src/lib/Locale/layout.ts @@ -220,4 +220,16 @@ export interface Locale { }; }; }; + debug: { + clearCaches: LocaleValue; + resetAllSettings: { + title: LocaleValue; + hint: LocaleValue; + }; + clearLocalStorage: { + title: LocaleValue; + hint1: LocaleValue; + hint2: LocaleValue; + }; + }; } diff --git a/src/lib/Settings/Categories/Debug.svelte b/src/lib/Settings/Categories/Debug.svelte index d8da8aa8..4da6c256 100644 --- a/src/lib/Settings/Categories/Debug.svelte +++ b/src/lib/Settings/Categories/Debug.svelte @@ -3,6 +3,7 @@ import { getNotificationsContext } from 'svelte-notifications'; import SettingHint from '../SettingHint.svelte'; import { options } from '$lib/Notification/options'; + import locale from '$stores/locale'; const { addNotification } = getNotificationsContext(); @@ -16,7 +17,7 @@ heading: 'Anime and manga list caches successfully cleared' }) ); - }}>Clear anime and manga list caches{$locale().debug.clearCaches}

@@ -29,10 +30,12 @@ heading: 'All settings successfully reset' }) ); - }}>Reset ALL settings + {$locale().debug.resetAllSettings.title} + - Resets all settings present on this page to their default values + {$locale().debug.resetAllSettings.hint}

@@ -45,11 +48,10 @@ heading: 'localStorage successfully cleared' }) ); - }}>Clear localStorage{$locale().debug.clearLocalStorage.title} localStorage - Resets all of your settings to their default values and clears both AniList media list and manga - data caches + {$locale().debug.clearLocalStorage.hint1}
- If you are having issues with data loading or logging out, it is recommended to clear your site data. + {$locale().debug.clearLocalStorage.hint2}
-- cgit v1.2.3