Revert some whitespace changes

This commit is contained in:
LoveEevee 2020-04-27 20:07:43 +03:00
parent 6d0d5e1632
commit db5e76880b
3 changed files with 4 additions and 12 deletions

View File

@ -147,12 +147,10 @@ class Settings{
} }
setLang(lang, noEvent){ setLang(lang, noEvent){
strings = lang strings = lang
var boldFonts = strings.font === "Microsoft YaHei, sans-serif" var boldFonts = strings.font === "Microsoft YaHei, sans-serif"
loader.screen.style.fontFamily = strings.font loader.screen.style.fontFamily = strings.font
loader.screen.style.fontWeight = boldFonts ? "bold" : "" loader.screen.style.fontWeight = boldFonts ? "bold" : ""
loader.screen.classList[boldFonts ? "add" : "remove"]("bold-fonts") loader.screen.classList[boldFonts ? "add" : "remove"]("bold-fonts")
if(!noEvent){ if(!noEvent){
pageEvents.send("language-change", lang.id) pageEvents.send("language-change", lang.id)
} }

View File

@ -1073,9 +1073,7 @@ var translations = {
ko: "가사가있는" ko: "가사가있는"
} }
} }
var allStrings = {} var allStrings = {}
function separateStrings(){ function separateStrings(){
for(var j in languageList){ for(var j in languageList){
var lang = languageList[j] var lang = languageList[j]
@ -1083,9 +1081,8 @@ function separateStrings(){
id: lang id: lang
} }
var str = allStrings[lang] var str = allStrings[lang]
var translateObj = function(obj, name, str){ var translateObj = function(obj, name, str){
if(obj != null && "en" in obj && obj["en"] != null){ if("en" in obj){
for(var i in obj){ for(var i in obj){
str[name] = obj[lang] || obj.en str[name] = obj[lang] || obj.en
} }
@ -1096,11 +1093,9 @@ function separateStrings(){
} }
} }
} }
for(var i in translations){ for(var i in translations){
translateObj(translations[i], i, str) translateObj(translations[i], i, str)
} }
} }
} }
separateStrings() separateStrings()

View File

@ -77,8 +77,7 @@ class Titlescreen{
} }
} }
setLang(lang, noEvent){ setLang(lang, noEvent){
settings.setLang(lang, true) settings.setLang(lang, true)
if(this.songId){ if(this.songId){
return return
} }