diff options
| author | Fuwn <[email protected]> | 2024-01-31 08:09:40 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-31 08:09:40 -0800 |
| commit | a1a9bd7e08397e7a98a33a249024b6a2e7e08b36 (patch) | |
| tree | fe19095cf84b02a346c81e68ddadaa17b952df92 /src/lib/Tools | |
| parent | feat(hovercover): half animation time (diff) | |
| download | due.moe-a1a9bd7e08397e7a98a33a249024b6a2e7e08b36.tar.xz due.moe-a1a9bd7e08397e7a98a33a249024b6a2e7e08b36.zip | |
feat(locale): localise birthdays
Diffstat (limited to 'src/lib/Tools')
| -rw-r--r-- | src/lib/Tools/Picker.svelte | 3 | ||||
| -rw-r--r-- | src/lib/Tools/tools.ts | 31 |
2 files changed, 23 insertions, 11 deletions
diff --git a/src/lib/Tools/Picker.svelte b/src/lib/Tools/Picker.svelte index b60a7039..cfc5c065 100644 --- a/src/lib/Tools/Picker.svelte +++ b/src/lib/Tools/Picker.svelte @@ -2,6 +2,7 @@ import { browser } from '$app/environment'; import { goto } from '$app/navigation'; import root from '$lib/Utility/root'; + import locale from '$stores/locale'; export let tool: string; </script> @@ -15,7 +16,7 @@ > <option value="default" selected disabled hidden>Select a tool to continue</option> <option value="wrapped">AniList Wrapped</option> - <option value="birthdays">Today's Character Birthdays</option> + <option value="birthdays">{$locale().tools.tool.characterBirthdays.long}</option> <option value="sequel_spy">Sequel Spy</option> <option value="discussions">Episode Discussion Collector</option> <option value="random_follower">Random Follower Finder</option> diff --git a/src/lib/Tools/tools.ts b/src/lib/Tools/tools.ts index 96aaeb47..2191243e 100644 --- a/src/lib/Tools/tools.ts +++ b/src/lib/Tools/tools.ts @@ -1,48 +1,59 @@ -export const tools: { [key: string]: { name: string; description?: string; id: string } } = { +import locale from '$stores/locale'; +import { get } from 'svelte/store'; + +export const tools: { + [key: string]: { + name: () => string; + description?: string; + id: string; + }; +} = { default: { - name: 'Tools', + name: () => 'Tools', description: 'A collection of tools to help you get the most out of AniList.', id: 'default' }, wrapped: { - name: 'AniList Wrapped & Statistics Panel', + name: () => 'AniList Wrapped & Statistics Panel', description: 'Instantly generate an AniList themed Wrapped for your profile, doubling as a statistics panel for your bio', id: 'wrapped' }, birthdays: { - name: "Today's Character Birthdays", + name: () => { + return get(locale)().tools.tool.characterBirthdays.long; + }, description: 'Find and display the birthdays of all characters for today, or any other day of the year', id: 'birthdays' }, sequel_spy: { - name: 'Sequel Spy (Missing Prequel Finder)', + name: () => 'Sequel Spy (Missing Prequel Finder)', description: "Find media with prequels you haven't seen yet for any given simulcast season", id: 'sequel_spy' }, discussions: { - name: 'Episode Discussion Collector', + name: () => 'Episode Discussion Collector', description: 'Find and display all episode discussions for a given user', id: 'discussions' }, random_follower: { - name: 'Random Follower Finder', + name: () => 'Random Follower Finder', description: 'Find a random follower of any given user', id: 'random_follower' }, likes: { - name: 'Likes', + name: () => 'Likes', description: 'Get All Likes of an Activity or Forum Thread', id: 'likes' }, dump_profile: { - name: 'Dump Profile', + name: () => 'Dump Profile', description: "Dump a user's profile to JSON", id: 'dump_profile' }, activity_history: { - name: 'Activity History Analyser', + name: () => 'Activity History Analyser', id: 'activity_history' } }; |