Full code cleanup
This commit is contained in:
parent
3a4a2a2016
commit
fa971ffbbf
300 changed files with 16352 additions and 19284 deletions
|
@ -208,14 +208,14 @@ function compileTranslationsFromWeblate() {
|
|||
const allTranslations = new TranslationPart()
|
||||
|
||||
for (const translationFile of translations) {
|
||||
try{
|
||||
|
||||
const contents = JSON.parse(readFileSync(translationFile, "utf-8"));
|
||||
let language = translationFile.substring(translationFile.lastIndexOf("/") + 1)
|
||||
language = language.substring(0, language.length - 5)
|
||||
allTranslations.add(language, contents)
|
||||
}catch (e) {
|
||||
throw "Could not read file "+ translationFile+" due to "+e
|
||||
try {
|
||||
|
||||
const contents = JSON.parse(readFileSync(translationFile, "utf-8"));
|
||||
let language = translationFile.substring(translationFile.lastIndexOf("/") + 1)
|
||||
language = language.substring(0, language.length - 5)
|
||||
allTranslations.add(language, contents)
|
||||
} catch (e) {
|
||||
throw "Could not read file " + translationFile + " due to " + e
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue