lyrics: add translation lyrics for netease.ts (#951)

* lyrics: add translation lyrics for netease.ts
This commit is contained in:
et21ff 2025-06-22 03:19:23 +08:00 committed by GitHub
parent e3751229b6
commit ae41fe99bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 90 additions and 2 deletions

View file

@ -101,6 +101,30 @@ export const LyricSettings = () => {
isHidden: !isElectron(),
title: t('setting.lyricFetchProvider', { postProcess: 'sentenceCase' }),
},
{
control: (
<Switch
aria-label="Enable NetEase translations"
defaultChecked={settings.enableNeteaseTranslation}
onChange={(e) => {
const isChecked = e.currentTarget.checked;
setSettings({
lyrics: {
...settings,
enableNeteaseTranslation: e.currentTarget.checked,
},
});
localSettings?.set('enableNeteaseTranslation', isChecked);
}}
/>
),
description: t('setting.neteaseTranslation', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: !isElectron(),
title: t('setting.neteaseTranslation', { postProcess: 'sentenceCase' }),
},
{
control: (
<NumberInput