From 227aebed65c73569bf014da68e4df8ce77a5d9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Fri, 2 Aug 2013 14:26:55 +0200 Subject: [PATCH] Fix some places where localization strings are wrongly used. #504 --- unpacked/MathJax.js | 4 ++-- unpacked/config/Accessible-full.js | 2 +- unpacked/config/Accessible.js | 2 +- unpacked/config/default.js | 3 +-- unpacked/extensions/FontWarnings.js | 10 +++++----- unpacked/jax/input/TeX/jax.js | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js index 7210d8013..c7f5651f2 100644 --- a/unpacked/MathJax.js +++ b/unpacked/MathJax.js @@ -2655,7 +2655,7 @@ MathJax.Hub.Startup = { BASE.InputJax = JAX.Subclass({ elementJax: "mml", // the element jax to load for this input jax - sourceMenuTitle: /*_(MathMenu)*/ ["OriginalForm","Original Form"], + sourceMenuTitle: /*_(MathMenu)*/ ["Original","Original Form"], copyTranslate: true, Process: function (script,state) { var queue = CALLBACK.Queue(), file; @@ -2851,7 +2851,7 @@ MathJax.Hub.Startup = { }; BASE.InputJax.Error = { id: "Error", version: "2.2", config: {}, - sourceMenuTitle: /*_(MathMenu)*/ ["OriginalForm","Original Form"] + sourceMenuTitle: /*_(MathMenu)*/ ["Original","Original Form"] }; })("MathJax"); diff --git a/unpacked/config/Accessible-full.js b/unpacked/config/Accessible-full.js index dc3146bd4..8fe41df2f 100644 --- a/unpacked/config/Accessible-full.js +++ b/unpacked/config/Accessible-full.js @@ -26,7 +26,7 @@ MathJax.Hub.Config({ mpMouse: true }, errorSettings: { - message: ["[Math Error]"] + message: ["[",["MathError","MathError"],"]"] } }); diff --git a/unpacked/config/Accessible.js b/unpacked/config/Accessible.js index c53aa2805..b03d33050 100644 --- a/unpacked/config/Accessible.js +++ b/unpacked/config/Accessible.js @@ -26,7 +26,7 @@ MathJax.Hub.Config({ mpMouse: true }, errorSettings: { - message: ["[Math Error]"] + message: ["[",["MathError","MathError"],"]"] } }); diff --git a/unpacked/config/default.js b/unpacked/config/default.js index a2cd92f30..030ddecd0 100644 --- a/unpacked/config/default.js +++ b/unpacked/config/default.js @@ -237,8 +237,7 @@ MathJax.Hub.Config({ // jax that prevents it from operating properly). // errorSettings: { - message: ["[Math Processing Error]"], // HTML snippet structure for message to use - messageId: "MathProcessingError", // ID of snippet for localization + message: ["[",["MathProcessingError","Math Processing Error"],"]"], style: {color: "#CC0000", "font-style":"italic"} // style for message }, diff --git a/unpacked/extensions/FontWarnings.js b/unpacked/extensions/FontWarnings.js index 39f804f48..2a2738e6b 100644 --- a/unpacked/extensions/FontWarnings.js +++ b/unpacked/extensions/FontWarnings.js @@ -134,7 +134,7 @@ "This will render slower than usual, and the mathematics may not print "+ "at the full resolution of your printer."], ["fonts"], - ["webfonts"] + ["webFonts"] ], noFonts: [ @@ -146,7 +146,7 @@ "your browser will be able to display them. Some characters "+ "may not show up properly, or possibly not at all."], ["fonts"], - ["webfonts"] + ["webFonts"] ] }, @@ -178,9 +178,9 @@ [["span",{style:{position:"relative", bottom:".2em"}},["x"]]] ]], - webfonts: [ + webFonts: [ ["p"], - ["webfonts", + ["webFonts", "Most modern browsers allow for fonts to be downloaded over the web. "+ "Updating to a more recent version of your browser (or changing "+ "browsers) could improve the quality of the mathematics on this page." @@ -252,7 +252,7 @@ data.splice.apply(data,[i,1].concat(CONFIG.HTML[data[i][0]])); } else if (typeof data[i][1] === "string") { var message = MathJax.Localization.lookupPhrase(["FontWarnings",data[i][0]],data[i][1]); - message = MathJax.Localization.processString(message,data[i].slice(2),"FontWarnings"); + message = MathJax.Localization.processMarkdown(message,data[i].slice(2),"FontWarnings"); data.splice.apply(data,[i,1].concat(message)); i += message.length; } else {i++} diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index da567bc21..8d99241dd 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -1435,7 +1435,7 @@ while (attr !== "") { match = attr.match(/^([a-z]+)\s*=\s*(\'[^']*'|"[^"]*"|[^ ]*)\s*/i); if (!match) - {TEX.Error("InvalidMathMLAttr","Invalid MathML attribute: %1",attr)} + {TEX.Error(["InvalidMathMLAttr","Invalid MathML attribute: %1",attr])} if (!MML[type].prototype.defaults[match[1]] && !this.MmlTokenAllow[match[1]]) { TEX.Error(["UnknownAttrForElement", "%1 is not a recognized attribute for %2",