[M] Move setting descriptions to i18n

This commit is contained in:
Azalea
2024-04-02 00:16:34 -04:00
parent 6a475434ad
commit 7728b4b1ab
6 changed files with 20 additions and 21 deletions

View File

@@ -116,8 +116,6 @@ export interface MusicMeta {
export type AllMusic = { [key: string]: MusicMeta }
export interface GameOption {
name: string
desc: string
key: string
value: any
type: "Boolean"

View File

@@ -87,6 +87,15 @@ export const EN_REF_SETTINGS = {
'settings.title': 'Settings',
'settings.tabs.profile': 'Profile',
'settings.tabs.game': 'Game',
'settings.fields.unlockMusic.name': 'Unlock All Music',
'settings.fields.unlockMusic.desc': 'Unlock all music and master difficulty in game.',
'settings.fields.unlockChara.name': 'Unlock All Characters',
'settings.fields.unlockChara.desc': 'Unlock all characters, voices, and partners in game.',
'settings.fields.unlockCollectables.name': 'Unlock All Collectables',
'settings.fields.unlockCollectables.desc': 'Unlock all collectables (nameplate, title, icon, frame) in game. ' +
'This setting is not relevant in chusan because in-game user box is disabled.',
'settings.fields.unlockTickets.name': 'Unlock All Tickets',
'settings.fields.unlockTickets.desc': 'Infinite map/ex tickets (note: maimai still limits which tickets can be used).',
}
export const EN_REF = { ...EN_REF_USER, ...EN_REF_Welcome, ...EN_REF_GENERAL,

View File

@@ -134,11 +134,11 @@
<div class="field">
{#if field.type === "Boolean"}
<div class="bool">
<input id={field.name} type="checkbox" bind:checked={field.value}
<input id={field.key} type="checkbox" bind:checked={field.value}
on:change={() => submitGameOption(field.key, field.value)} />
<label for={field.name}>
<span class="name">{field.name}</span>
<span class="desc">{field.desc}</span>
<label for={field.key}>
<span class="name">{ts(`settings.fields.${field.key}.name`)}</span>
<span class="desc">{ts(`settings.fields.${field.key}.desc`)}</span>
</label>
</div>
{/if}