Update 0BDFDB.plugin.js
This commit is contained in:
parent
bb0db8a635
commit
087010763f
|
@ -8546,7 +8546,7 @@ module.exports = (_ => {
|
|||
let format = config.asObject ? ((l, isNotFirst) => {
|
||||
return `${isNotFirst ? "," : ""}\n\t\t"${l == "en" ? "default" : l}": {${translations[l].map((s, i) => `\n\t\t\t"${stringKeys[i]}": "${formatTranslation(l, s, i)}"`).join(",")}\n\t\t}`;
|
||||
}) : ((l, isNotFirst) => {
|
||||
return `\n\t\t\t\t\t${l == "en" ? "default" : `case "${l}"`}:${l.length > 2 ? "\t" : "\t\t"}// ${BDFDB.LanguageUtils.languages[l].name}\n\t\t\t\t\t\treturn {${translations[l].map((s, i) => `\n\t\t\t\t\t\t\t${stringKeys[i]}:${"\t".repeat(10 - ((stringKeys[i].length + 2) / 4))}"${formatTranslation(l, s, i)}"`).join(",")}\n\t\t\t\t\t\t};`;
|
||||
return `\n\t\t\t\t\t${l == "en" ? "default" : `case "${l}"`}:"\t\t"// ${BDFDB.LanguageUtils.languages[l].name}\n\t\t\t\t\t\treturn {${translations[l].map((s, i) => `\n\t\t\t\t\t\t\t${stringKeys[i]}:${"\t".repeat(10 - ((stringKeys[i].length + 2) / 4))}"${formatTranslation(l, s, i)}"`).join(",")}\n\t\t\t\t\t\t};`;
|
||||
});
|
||||
let result = Object.keys(translations).filter(n => n != "en").sort().map((l, i) => format(l, i)).join("");
|
||||
if (translations.en) result += format("en", result ? 1 : 0);
|
||||
|
|
Loading…
Reference in New Issue