forked from GitHub/gf-core
minibar.js: show the type error messages that can occur for grammars with dependent types
This commit is contained in:
@@ -356,9 +356,11 @@ function show_translations(translationResults) {
|
|||||||
//trans.translations=translations;
|
//trans.translations=translations;
|
||||||
trans.single_translation=[];
|
trans.single_translation=[];
|
||||||
trans.innerHTML="";
|
trans.innerHTML="";
|
||||||
|
/*
|
||||||
trans.appendChild(wrap("h3",text(cnt<1 ? "No translations?" :
|
trans.appendChild(wrap("h3",text(cnt<1 ? "No translations?" :
|
||||||
cnt>1 ? ""+cnt+" translations:":
|
cnt>1 ? ""+cnt+" translations:":
|
||||||
"One translation:")));
|
"One translation:")));
|
||||||
|
*/
|
||||||
for(p=0;p<cnt;p++) {
|
for(p=0;p<cnt;p++) {
|
||||||
var tra=translationResults[p];
|
var tra=translationResults[p];
|
||||||
if (tra.translations != null) {
|
if (tra.translations != null) {
|
||||||
@@ -377,6 +379,11 @@ function show_translations(translationResults) {
|
|||||||
trans.appendChild(wrap("table",tbody));
|
trans.appendChild(wrap("table",tbody));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(tra.typeErrors) {
|
||||||
|
var errs=tra.typeErrors;
|
||||||
|
for(var i=0;i<errs.length;i++)
|
||||||
|
trans.appendChild(wrap("pre",text(errs[i].msg)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user