aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Locale/english.ts8
-rw-r--r--src/lib/Locale/japanese.ts8
-rw-r--r--src/lib/Locale/layout.ts8
-rw-r--r--src/lib/Tools/Picker.svelte3
-rw-r--r--src/lib/Tools/tools.ts31
-rw-r--r--src/routes/+layout.svelte4
-rw-r--r--src/routes/tools/+page.svelte4
-rw-r--r--src/routes/tools/[tool]/+page.svelte2
8 files changed, 53 insertions, 15 deletions
diff --git a/src/lib/Locale/english.ts b/src/lib/Locale/english.ts
index b1f5f9ea..92a1f608 100644
--- a/src/lib/Locale/english.ts
+++ b/src/lib/Locale/english.ts
@@ -187,6 +187,14 @@ const English: Locale = {
hint: 'Concluded manga and light novels that you have not read all available chapters of'
}
}
+ },
+ tools: {
+ tool: {
+ characterBirthdays: {
+ short: 'Character Birthdays',
+ long: "Today's Character Birthdays"
+ }
+ }
}
};
diff --git a/src/lib/Locale/japanese.ts b/src/lib/Locale/japanese.ts
index 105b4b9b..2deccb45 100644
--- a/src/lib/Locale/japanese.ts
+++ b/src/lib/Locale/japanese.ts
@@ -189,6 +189,14 @@ const Japanese: Locale = {
hint: '完結したマンガ&ライトノベルで、全章を読んでいないもの'
}
}
+ },
+ tools: {
+ tool: {
+ characterBirthdays: {
+ short: 'キャラクターの誕生日',
+ long: '今日のキャラクターの誕生日'
+ }
+ }
}
};
diff --git a/src/lib/Locale/layout.ts b/src/lib/Locale/layout.ts
index c2ecc94c..00c19ea9 100644
--- a/src/lib/Locale/layout.ts
+++ b/src/lib/Locale/layout.ts
@@ -192,4 +192,12 @@ export interface Locale {
};
};
};
+ tools: {
+ tool: {
+ characterBirthdays: {
+ short: LocaleValue;
+ long: LocaleValue;
+ };
+ };
+ };
}
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'
}
};
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 6d57ff78..a29529d7 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -116,7 +116,9 @@
<a href={root('/schedule')} class="header-item">{$locale().navigation.subtitleSchedule}</a
>
<a href={root('/updates')} class="header-item">{$locale().navigation.newReleases}</a>
- <a href={root('/birthdays')} class="header-item">Character Birthdays</a>
+ <a href={root('/birthdays')} class="header-item">
+ {$locale().tools.tool.characterBirthdays.short}
+ </a>
</div>
</div>
<a href={root('/tools')} class="header-item">{$locale().navigation.tools}</a>
diff --git a/src/routes/tools/+page.svelte b/src/routes/tools/+page.svelte
index edc18410..6dac37ec 100644
--- a/src/routes/tools/+page.svelte
+++ b/src/routes/tools/+page.svelte
@@ -9,7 +9,7 @@
<Picker {tool} />
-<HeadTitle route={tools[tool].name} path={`/tools?tool=${tool}`} />
+<HeadTitle route={tools[tool].name()} path={`/tools?tool=${tool}`} />
<div class="card">
<p>Select a tool to continue.</p>
@@ -18,7 +18,7 @@
{#each Object.keys(tools) as t}
{#if t !== 'default'}
<li>
- <a href={root(`/tools/${tools[t].id}`)} on:click={() => (tool = t)}>{tools[t].name}</a>
+ <a href={root(`/tools/${tools[t].id}`)} on:click={() => (tool = t)}>{tools[t].name()}</a>
{#if tools[t].description}
<blockquote>{tools[t].description}</blockquote>
{/if}
diff --git a/src/routes/tools/[tool]/+page.svelte b/src/routes/tools/[tool]/+page.svelte
index e6f151ad..137df74d 100644
--- a/src/routes/tools/[tool]/+page.svelte
+++ b/src/routes/tools/[tool]/+page.svelte
@@ -45,7 +45,7 @@
</blockquote>
</div>
{:else}
- <HeadTitle route={tools[tool].name} path={`/tools?tool=${tool}`} />
+ <HeadTitle route={tools[tool].name()} path={`/tools?tool=${tool}`} />
{#if tool === 'activity_history'}
<ActivityHistory user={data.user} />