diff options
| author | Fuwn <[email protected]> | 2024-01-20 23:10:52 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-20 23:10:52 -0800 |
| commit | d5ce12edb3822ae0f354a7a77f33f43fa16b205d (patch) | |
| tree | efe175362887f0b0bf4021ec4abe20db81449ae5 /src/lib/Locale/layout.ts | |
| parent | feat(locale): settings framework localisation (diff) | |
| download | due.moe-d5ce12edb3822ae0f354a7a77f33f43fa16b205d.tar.xz due.moe-d5ce12edb3822ae0f354a7a77f33f43fa16b205d.zip | |
refactor(locale): typed locales
Diffstat (limited to 'src/lib/Locale/layout.ts')
| -rw-r--r-- | src/lib/Locale/layout.ts | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/lib/Locale/layout.ts b/src/lib/Locale/layout.ts new file mode 100644 index 00000000..45c58a33 --- /dev/null +++ b/src/lib/Locale/layout.ts @@ -0,0 +1,74 @@ +type LocaleValue = string | LocaleValue[] | { [key: string]: LocaleValue }; + +export interface LocaleDictionary { + [key: string]: LocaleDictionary | string | Array<string | LocaleDictionary> | null; +} + +export interface Locale { + navigation: { + home: LocaleValue; + completed: LocaleValue; + subtitle_schedule: LocaleValue; + new_releases: LocaleValue; + tools: LocaleValue; + settings: LocaleValue; + profile: LocaleValue; + log_in: LocaleValue; + log_out: LocaleValue; + }; + settings: { + tooltips: { + author: LocaleValue; + }; + rss_feeds: { + title: LocaleValue; + buttons: { + copy_to_clipboard: LocaleValue; + }; + tooltips: { + rss: LocaleValue; + }; + }; + display: { + title: LocaleValue; + categories: { + media: LocaleValue; + date_and_time: LocaleValue; + motion_and_accessibility: LocaleValue; + collapse_panels_by_default: LocaleValue; + hide_panels: LocaleValue; + include_additional_media: LocaleValue; + }; + tooltips: { + beta: LocaleValue; + }; + }; + debug: { + title: LocaleValue; + tooltips: { + version: LocaleValue; + }; + }; + calculation: { + title: LocaleValue; + }; + cache: { + title: LocaleValue; + }; + attributions: { + title: LocaleValue; + }; + media: { + anime: LocaleValue; + manga: LocaleValue; + upcoming_anime: LocaleValue; + paused_media: LocaleValue; + unresolved_media: LocaleValue; + planned_anime: LocaleValue; + }; + languages: { + english: LocaleValue; + japanese: LocaleValue; + }; + }; +} |