Better output for errors
This commit is contained in:
parent
0f5c132287
commit
9d8f0698f1
2 changed files with 62 additions and 1 deletions
|
@ -300,7 +300,7 @@ function transformTranslation(obj: any, path: string[] = [], languageWhitelist :
|
|||
|
||||
|
||||
if(value["en"] === undefined){
|
||||
throw `At ${path.join(".")}: Missing 'en' translation for ${JSON.stringify(value)}`
|
||||
throw `At ${path.join(".")}: Missing 'en' translation at path ${path.join(".")}.${key}\n\tThe translations in other languages are ${JSON.stringify(value)}`
|
||||
}
|
||||
const subParts : string[] = value["en"].match(/{[^}]*}/g)
|
||||
let expr = `return new Translation(${JSON.stringify(value)}, "core:${path.join(".")}.${key}")`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue