mglyph messages: pass the def to the MML.Error function. #627

This commit is contained in:
Frédéric Wang 2013-10-21 12:38:26 +02:00
parent 5828d63598
commit 28afef1a95
2 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
} else { } else {
if (values.alt === "") if (values.alt === "")
{values.alt = LOCALE._(["MathML","BadMglyphFont"],"Bad font: %1",font.family)} {values.alt = LOCALE._(["MathML","BadMglyphFont"],"Bad font: %1",font.family)}
err = MML.Error(values.alt).With({mathsize:"75%"}); err = MML.Error(values.alt,{mathsize:"75%"});
this.Append(err); err.toHTML(span); this.data.pop(); this.Append(err); err.toHTML(span); this.data.pop();
span.bbox = err.HTMLspanElement().bbox; span.bbox = err.HTMLspanElement().bbox;
} }
@ -63,8 +63,8 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
} }
if (this.img.status !== "OK") { if (this.img.status !== "OK") {
err = MML.Error( err = MML.Error(
LOCALE._(["MathML","BadMglyph"],"Bad mglyph: %1",values.src) LOCALE._(["MathML","BadMglyph"],"Bad mglyph: %1",values.src),
).With({mathsize:"75%"}); {mathsize:"75%"});
this.Append(err); err.toHTML(span); this.data.pop(); this.Append(err); err.toHTML(span); this.data.pop();
span.bbox = err.HTMLspanElement().bbox; span.bbox = err.HTMLspanElement().bbox;
} else { } else {

View File

@ -75,8 +75,8 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
} }
if (this.img.status !== "OK") { if (this.img.status !== "OK") {
err = MML.Error( err = MML.Error(
LOCALE._(["MathML","BadMglyph"],"Bad mglyph: %1",values.src) LOCALE._(["MathML","BadMglyph"],"Bad mglyph: %1",values.src),
).With({mathsize:"75%"}); {mathsize:"75%"});
this.Append(err); svg = err.toSVG(); this.data.pop(); this.Append(err); svg = err.toSVG(); this.data.pop();
} else { } else {
var mu = this.SVGgetMu(svg); var mu = this.SVGgetMu(svg);