aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-31 08:09:40 -0800
committerFuwn <[email protected]>2024-01-31 08:09:40 -0800
commita1a9bd7e08397e7a98a33a249024b6a2e7e08b36 (patch)
treefe19095cf84b02a346c81e68ddadaa17b952df92 /src/lib
parentfeat(hovercover): half animation time (diff)
downloaddue.moe-a1a9bd7e08397e7a98a33a249024b6a2e7e08b36.tar.xz
due.moe-a1a9bd7e08397e7a98a33a249024b6a2e7e08b36.zip
feat(locale): localise birthdays
Diffstat (limited to 'src/lib')
-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
5 files changed, 47 insertions, 11 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'
}
};