From f2efc4e68270f0f2db3f7184b6b6badc727b00bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=8B=86=E5=AE=B6=E5=A4=A7=E4=B8=BB=E6=95=99?=
<1984096954@qq.com>
Date: Mon, 7 Aug 2023 23:32:28 +0800
Subject: [PATCH] feat(lyrics): Add pronunciation lyric mode (#2091)
* feat: Add pronunciation lyric mode
* fix(lyrics): Fixed issue where lyric-mode-switch displays when the translation setting is off
---
src/locale/lang/en.js | 2 +
src/locale/lang/tr.js | 2 +
src/locale/lang/zh-CN.js | 2 +
src/locale/lang/zh-TW.js | 2 +
src/utils/lyrics.js | 1 +
src/views/lyrics.vue | 86 +++++++++++++++++++++++++++++++++++++++-
6 files changed, 93 insertions(+), 2 deletions(-)
diff --git a/src/locale/lang/en.js b/src/locale/lang/en.js
index ba06a24..4a63758 100644
--- a/src/locale/lang/en.js
+++ b/src/locale/lang/en.js
@@ -113,6 +113,8 @@ export default {
pause: 'Pause',
mute: 'Mute',
nextUp: 'Next Up',
+ translationLyric: 'lyric (trans)',
+ PronunciationLyric: 'lyric (pronounce)',
},
modal: {
close: 'Close',
diff --git a/src/locale/lang/tr.js b/src/locale/lang/tr.js
index bbd1834..296aac3 100644
--- a/src/locale/lang/tr.js
+++ b/src/locale/lang/tr.js
@@ -108,6 +108,8 @@ export default {
pause: 'Durdur',
mute: 'Sesi kapat',
nextUp: 'Sıradaki',
+ translationLyric: 'şarkı sözleri (çeviri)',
+ PronunciationLyric: 'şarkı sözleri (çeviri)',
},
modal: {
close: 'Kapat',
diff --git a/src/locale/lang/zh-CN.js b/src/locale/lang/zh-CN.js
index 42d8998..266fead 100644
--- a/src/locale/lang/zh-CN.js
+++ b/src/locale/lang/zh-CN.js
@@ -114,6 +114,8 @@ export default {
pause: '暂停',
mute: '静音',
nextUp: '播放列表',
+ translationLyric: '歌词(译)',
+ PronunciationLyric: '歌词(音)',
},
modal: {
close: '关闭',
diff --git a/src/locale/lang/zh-TW.js b/src/locale/lang/zh-TW.js
index dd80094..6434199 100644
--- a/src/locale/lang/zh-TW.js
+++ b/src/locale/lang/zh-TW.js
@@ -110,6 +110,8 @@ export default {
pause: '暫停',
mute: '靜音',
nextUp: '播放清單',
+ translationLyric: '歌詞(譯)',
+ PronunciationLyric: '歌詞(音)',
},
modal: {
close: '關閉',
diff --git a/src/utils/lyrics.js b/src/utils/lyrics.js
index fd9919a..b9a7e59 100644
--- a/src/utils/lyrics.js
+++ b/src/utils/lyrics.js
@@ -2,6 +2,7 @@ export function lyricParser(lrc) {
return {
lyric: parseLyric(lrc?.lrc?.lyric || ''),
tlyric: parseLyric(lrc?.tlyric?.lyric || ''),
+ romalyric: parseLyric(lrc?.romalrc?.lyric || ''),
lyricuser: lrc.lyricUser,
transuser: lrc.transUser,
};
diff --git a/src/views/lyrics.vue b/src/views/lyrics.vue
index efe29e9..40acc7f 100644
--- a/src/views/lyrics.vue
+++ b/src/views/lyrics.vue
@@ -201,6 +201,28 @@
>