follow-up: add directionality on remaining MathML error messages #627

This commit is contained in:
Frédéric Wang 2013-10-18 10:40:38 +02:00
parent 932b7e8f7c
commit aa8d543a45
2 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,9 @@
mml = this.TeXAtom(match[2]);
} else if (!(MML[type] && MML[type].isa && MML[type].isa(MML.mbase))) {
MathJax.Hub.signal.Post(["MathML Jax - unknown node type",type]);
return MML.merror(_("UnknownNodeType","Unknown node type: %1",type));
var err = MML.merror(_("UnknownNodeType","Unknown node type: %1",type));
if (MathJax.Localization.fontDirection()) {err = MML.mstyle(err).With({dir: "rtl"})};
return err;
} else {
mml = MML[type]();
}

View File

@ -46,6 +46,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
if (values.alt === "")
{values.alt = LOCALE._(["MathML","BadMglyphFont"],"Bad font: %1",font.family)}
err = MML.merror(values.alt).With({mathsize:"75%"});
if (LOCALE.fontDirection()) {err = MML.mstyle(err).With({dir: "rtl"})};
this.Append(err); err.toHTML(span); this.data.pop();
span.bbox = err.HTMLspanElement().bbox;
}
@ -65,6 +66,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
err = MML.merror(
LOCALE._(["MathML","BadMglyph"],"Bad mglyph: %1",values.src)
).With({mathsize:"75%"});
if (LOCALE.fontDirection()) {err = MML.mstyle(err).With({dir: "rtl"})};
this.Append(err); err.toHTML(span); this.data.pop();
span.bbox = err.HTMLspanElement().bbox;
} else {