Use proper casing for i18n locales (#1998)

This commit is contained in:
Jeff
2026-05-11 19:42:07 -07:00
committed by GitHub
parent e49e488b4c
commit e2a1d813a9
224 changed files with 17323 additions and 18474 deletions
@@ -31,7 +31,7 @@ export const CacheSettings = memo(() => {
}
toast.success({
message: t('setting.clearCacheSuccess', { postProcess: 'sentenceCase' }),
message: t('setting.clearCacheSuccess'),
});
} catch (error) {
console.error(error);
@@ -49,10 +49,10 @@ export const CacheSettings = memo(() => {
openModal({
children: (
<ConfirmModal onConfirm={() => clearCache(full)}>
{t(`common.areYouSure`, { postProcess: 'sentenceCase' })}
{t(`common.areYouSure`)}
</ConfirmModal>
),
title: t(`setting.${key}`, { postProcess: 'sentenceCase' }),
title: t(`setting.${key}`),
});
};
@@ -65,14 +65,13 @@ export const CacheSettings = memo(() => {
size="compact-md"
variant="filled"
>
{t('common.clear', { postProcess: 'sentenceCase' })}
{t('common.clear')}
</Button>
),
description: t('setting.clearQueryCache', {
context: 'description',
postProcess: 'sentenceCase',
}),
title: t('setting.clearQueryCache', { postProcess: 'sentenceCase' }),
title: t('setting.clearQueryCache'),
},
{
control: (
@@ -82,15 +81,14 @@ export const CacheSettings = memo(() => {
size="compact-md"
variant="filled"
>
{t('common.clear', { postProcess: 'sentenceCase' })}
{t('common.clear')}
</Button>
),
description: t('setting.clearCache', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !browser,
title: t('setting.clearCache', { postProcess: 'sentenceCase' }),
title: t('setting.clearCache'),
},
];
@@ -102,15 +100,10 @@ export const CacheSettings = memo(() => {
return (
<>
<SettingsSection
options={options}
title={t('page.setting.cache', { postProcess: 'sentenceCase' })}
/>
<SettingsSection options={options} title={t('page.setting.cache')} />
{isElectron() && (
<Button onClick={handleOpenApplicationDirectory} variant="default">
{t('action.openApplicationDirectory', {
postProcess: 'sentenceCase',
})}
{t('action.openApplicationDirectory')}
</Button>
)}
</>
@@ -43,12 +43,10 @@ export const DiscordSettings = memo(() => {
icon: 'icon',
paused: 'paused',
playing: 'playing',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.discordRichPresence', {
discord: 'Discord',
postProcess: 'sentenceCase',
}),
},
{
@@ -68,12 +66,10 @@ export const DiscordSettings = memo(() => {
context: 'description',
defaultId: '1165957668758900787',
discord: 'Discord',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.discordApplicationId', {
discord: 'Discord',
postProcess: 'sentenceCase',
}),
},
{
@@ -91,12 +87,9 @@ export const DiscordSettings = memo(() => {
),
description: t('setting.discordPausedStatus', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.discordPausedStatus', {
postProcess: 'sentenceCase',
}),
title: t('setting.discordPausedStatus'),
},
{
control: (
@@ -113,12 +106,9 @@ export const DiscordSettings = memo(() => {
),
description: t('setting.discordStateIcon', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.discordStateIcon', {
postProcess: 'sentenceCase',
}),
title: t('setting.discordStateIcon'),
},
{
control: (
@@ -135,12 +125,9 @@ export const DiscordSettings = memo(() => {
),
description: t('setting.discordListening', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.discordListening', {
postProcess: 'sentenceCase',
}),
title: t('setting.discordListening'),
},
{
control: (
@@ -152,14 +139,12 @@ export const DiscordSettings = memo(() => {
{
label: t('setting.discordDisplayType', {
context: 'songname',
postProcess: 'sentenceCase',
}),
value: DiscordDisplayType.SONG_NAME,
},
{
label: t('setting.discordDisplayType_artistname', {
context: 'artistname',
postProcess: 'sentenceCase',
}),
value: DiscordDisplayType.ARTIST_NAME,
},
@@ -177,13 +162,11 @@ export const DiscordSettings = memo(() => {
),
description: t('setting.discordDisplayType', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.discordDisplayType', {
discord: 'Discord',
musicbrainz: 'musicbrainz',
postProcess: 'sentenceCase',
}),
},
{
@@ -193,9 +176,7 @@ export const DiscordSettings = memo(() => {
clearable={false}
data={[
{
label: t('setting.discordLinkType_none', {
postProcess: 'sentenceCase',
}),
label: t('setting.discordLinkType_none'),
value: DiscordLinkType.NONE,
},
{ label: 'last.fm', value: DiscordLinkType.LAST_FM },
@@ -224,12 +205,10 @@ export const DiscordSettings = memo(() => {
discord: 'Discord',
lastfm: 'last.fm',
musicbrainz: 'musicbrainz',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.discordLinkType', {
discord: 'Discord',
postProcess: 'sentenceCase',
}),
},
{
@@ -249,12 +228,10 @@ export const DiscordSettings = memo(() => {
context: 'description',
discord: 'Discord',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.discordServeImage', {
discord: 'Discord',
postProcess: 'sentenceCase',
}),
},
{
@@ -273,20 +250,13 @@ export const DiscordSettings = memo(() => {
description: t('setting.lastfmApiKey', {
context: 'description',
lastfm: 'Last.fm',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.lastfmApiKey', {
lastfm: 'Last.fm',
postProcess: 'sentenceCase',
}),
},
];
return (
<SettingsSection
options={discordOptions}
title={t('page.setting.discord', { postProcess: 'sentenceCase' })}
/>
);
return <SettingsSection options={discordOptions} title={t('page.setting.discord')} />;
});
@@ -46,10 +46,9 @@ export const PasswordSettings = memo(() => {
),
description: t('setting.passwordStore', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.passwordStore', { postProcess: 'sentenceCase' }),
title: t('setting.passwordStore'),
},
];
@@ -32,9 +32,7 @@ export const RemoteSettings = memo(() => {
} else {
toast.error({
message: errorMsg,
title: enabled
? t('error.remoteEnableError', { postProcess: 'sentenceCase' })
: t('error.remoteDisableError', { postProcess: 'sentenceCase' }),
title: enabled ? t('error.remoteEnableError') : t('error.remoteDisableError'),
});
}
}, 50);
@@ -48,12 +46,12 @@ export const RemoteSettings = memo(() => {
},
});
toast.warn({
message: t('error.remotePortWarning', { postProcess: 'sentenceCase' }),
message: t('error.remotePortWarning'),
});
} else {
toast.error({
message: errorMsg,
title: t('error.remotePortError', { postProcess: 'sentenceCase' }),
title: t('error.remotePortError'),
});
}
}, 100);
@@ -75,7 +73,6 @@ export const RemoteSettings = memo(() => {
<Text isMuted isNoSelect size="sm">
{t('setting.enableRemote', {
context: 'description',
postProcess: 'sentenceCase',
})}{' '}
<a href={url} rel="noreferrer noopener" target="_blank">
{url}
@@ -83,7 +80,7 @@ export const RemoteSettings = memo(() => {
</Text>
),
isHidden,
title: t('setting.enableRemote', { postProcess: 'sentenceCase' }),
title: t('setting.enableRemote'),
},
{
control: (
@@ -99,10 +96,9 @@ export const RemoteSettings = memo(() => {
),
description: t('setting.remotePort', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden,
title: t('setting.remotePort', { postProcess: 'sentenceCase' }),
title: t('setting.remotePort'),
},
{
control: (
@@ -122,10 +118,9 @@ export const RemoteSettings = memo(() => {
),
description: t('setting.remoteUsername', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden,
title: t('setting.remoteUsername', { postProcess: 'sentenceCase' }),
title: t('setting.remoteUsername'),
},
{
control: (
@@ -145,17 +140,11 @@ export const RemoteSettings = memo(() => {
),
description: t('setting.remotePassword', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden,
title: t('setting.remotePassword', { postProcess: 'sentenceCase' }),
title: t('setting.remotePassword'),
},
];
return (
<SettingsSection
options={controlOptions}
title={t('page.setting.remote', { postProcess: 'sentenceCase' })}
/>
);
return <SettingsSection options={controlOptions} title={t('page.setting.remote')} />;
});
@@ -30,21 +30,18 @@ export const UpdateSettings = memo(() => {
{
label: t('setting.releaseChannel', {
context: 'optionLatest',
postProcess: 'titleCase',
}),
value: 'latest',
},
{
label: t('setting.releaseChannel', {
context: 'optionBeta',
postProcess: 'titleCase',
}),
value: 'beta',
},
{
label: t('setting.releaseChannel', {
context: 'optionAlpha',
postProcess: 'titleCase',
}),
value: 'alpha',
},
@@ -63,15 +60,14 @@ export const UpdateSettings = memo(() => {
),
description: t('setting.releaseChannel', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: disableAutoUpdates(),
title: t('setting.releaseChannel', { postProcess: 'sentenceCase' }),
title: t('setting.releaseChannel'),
},
{
control: (
<Switch
aria-label={t('setting.automaticUpdates', { postProcess: 'sentenceCase' })}
aria-label={t('setting.automaticUpdates')}
defaultChecked={!settings.disableAutoUpdate}
disabled={disableAutoUpdates()}
onChange={(e) => {
@@ -88,17 +84,11 @@ export const UpdateSettings = memo(() => {
),
description: t('setting.automaticUpdates', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: disableAutoUpdates(),
title: t('setting.automaticUpdates', { postProcess: 'sentenceCase' }),
title: t('setting.automaticUpdates'),
},
];
return (
<SettingsSection
options={updateOptions}
title={t('page.setting.updates', { postProcess: 'sentenceCase' })}
/>
);
return <SettingsSection options={updateOptions} title={t('page.setting.updates')} />;
});
@@ -60,10 +60,9 @@ export const WindowSettings = memo(() => {
),
description: t('setting.windowBarStyle', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.windowBarStyle', { postProcess: 'sentenceCase' }),
title: t('setting.windowBarStyle'),
},
{
control: (
@@ -99,13 +98,10 @@ export const WindowSettings = memo(() => {
),
description: t('setting.trayEnabled', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
note: t('common.restartRequired', {
postProcess: 'sentenceCase',
}),
title: t('setting.trayEnabled', { postProcess: 'sentenceCase' }),
note: t('common.restartRequired'),
title: t('setting.trayEnabled'),
},
{
control: (
@@ -126,10 +122,9 @@ export const WindowSettings = memo(() => {
),
description: t('setting.minimizeToTray', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron() || !settings.tray,
title: t('setting.minimizeToTray', { postProcess: 'sentenceCase' }),
title: t('setting.minimizeToTray'),
},
{
control: (
@@ -150,10 +145,9 @@ export const WindowSettings = memo(() => {
),
description: t('setting.exitToTray', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron() || !settings.tray,
title: t('setting.exitToTray', { postProcess: 'sentenceCase' }),
title: t('setting.exitToTray'),
},
{
control: (
@@ -174,10 +168,9 @@ export const WindowSettings = memo(() => {
),
description: t('setting.startMinimized', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron() || !settings.tray,
title: t('setting.startMinimized', { postProcess: 'sentenceCase' }),
title: t('setting.startMinimized'),
},
{
control: (
@@ -201,10 +194,9 @@ export const WindowSettings = memo(() => {
),
description: t('setting.preventSleepOnPlayback', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.preventSleepOnPlayback', { postProcess: 'sentenceCase' }),
title: t('setting.preventSleepOnPlayback'),
},
{
control: (
@@ -235,10 +227,5 @@ export const WindowSettings = memo(() => {
},
];
return (
<SettingsSection
options={windowOptions}
title={t('page.setting.application', { postProcess: 'sentenceCase' })}
/>
);
return <SettingsSection options={windowOptions} title={t('page.setting.application')} />;
});