From 92c1261f6f1408f6b71ab40c4ee9654aaa725d51 Mon Sep 17 00:00:00 2001 From: AnthonyDuan Date: Sun, 14 Dec 2025 12:49:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=AD=E6=96=87=E6=9B=B2=E5=90=8D?= =?UTF-8?q?=E4=BC=98=E5=85=88=E6=98=BE=E7=A4=BA=20TITLEZH=EF=BC=8C?= =?UTF-8?q?=E5=85=B6=E6=AC=A1=20TITLEJA=EF=BC=9B=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E6=94=B9=E4=B8=BA=20vLightNova=201.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/src/js/importsongs.js | 10 +++++++++- public/src/js/songselect.js | 9 +++++++++ templates/index.html | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/public/src/js/importsongs.js b/public/src/js/importsongs.js index 7ebede4..207e035 100644 --- a/public/src/js/importsongs.js +++ b/public/src/js/importsongs.js @@ -1,4 +1,4 @@ -class ImportSongs{ +class ImportSongs{ constructor(...args){ this.init(...args) } @@ -322,6 +322,10 @@ songTitle = songTitle.slice(0, uraPos) } } + if(id === "cn" && !meta["titlecn"] && meta.titlezh){ + titleLang.cn = meta.titlezh + titleLangAdded = true + } if(meta["title" + id]){ titleLang[id] = meta["title" + id] titleLangAdded = true @@ -329,6 +333,10 @@ titleLang[id] = this.songTitle[songTitle][id] + ura titleLangAdded = true } + if(id === "cn" && !meta["subtitlecn"] && meta.subtitlezh){ + subtitleLang.cn = meta.subtitlezh + subtitleLangAdded = true + } if(meta["subtitle" + id]){ subtitleLang[id] = meta["subtitle" + id] subtitleLangAdded = true diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index ce17460..1497dce 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -3113,6 +3113,15 @@ class SongSelect{ getLocalTitle(title, titleLang){ if(titleLang){ + if(strings.id === "cn"){ + if(titleLang.cn){ + return titleLang.cn + } + if(titleLang.ja){ + return titleLang.ja + } + return title + } for(var id in titleLang){ if(id === "en" && strings.preferEn && !(strings.id in titleLang) && titleLang.en || id === strings.id && titleLang[id]){ return titleLang[id] diff --git a/templates/index.html b/templates/index.html index 26873f9..5e1812a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -29,9 +29,9 @@
{% if version.version and version.commit_short and version.commit %} - taiko-web ver.{{version.version}} ({{version.commit_short}}) + vLightNova 1.0.0 {% else %} - taiko-web vRAINBOW-BETA4 + vLightNova 1.0.0 {% endif %}