commit 535c033e24090510883f708c6f9bc613a0cd08ee
parent 660f38959af84bb9cfaa6ca557ced602c38f5eae
Author: Davide P. Cervone <dpvc@union.edu>
Date: Fri, 5 Apr 2013 18:45:50 -0400
Handle HTML snippets better, and fix up messages in FontWarnings and v1.0-warning extensions. Fix French menu items and a few others (thanks Fred). Fix scale-all-math dialog.
Diffstat:
12 files changed, 293 insertions(+), 347 deletions(-)
diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js
@@ -1,5 +1,6 @@
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
+
/*************************************************************
*
* MathJax.js
@@ -1056,205 +1057,127 @@ MathJax.Localization = {
locale: "fr",
directory: "[MathJax]/localization",
- strings: {fr: {}},
-
- _: function (messageId, phrase) {
-
- // These variables are used in string parsing
- var locale = this;
- var args = arguments;
- var i, s, m, resultString, resultArray;
-
- function parseNextUnicodePoint(appendToResult)
- {
- var n = s.charCodeAt(i);
- if (n <= 0xD7FF || 0xE000 <= n) {
- // Code points U+0000 to U+D7FF and U+E000 to U+FFFF.
- // Append the character.
- if (appendToResult) resultString += s[i]
- i++;
- return;
- } else if (i+1 < m) {
- // Code points U+10000 to U+10FFFF
- // Append the surrogate pairs.
- if (appendToResult) { resultString += s[i]; resultString += s[i+1]; }
- i+=2
- return;
- }
- // Ignore lead surrogate at the end of the string.
- // This should not happen with valid unicode string.
- i++;
- }
-
- function parseArgument(appendToResult)
- {
- if (!(/\d/.test(s[0]))) return false;
-
- // %INTEGER argument substitution
- var argIndex = s.match(/^\d+/)[0];
- i += argIndex.length;
- var key = +argIndex+1;
- if (key in args) {
- if (appendToResult) {
- var e = args[key];
- if (e instanceof Array) {
- // if that's an array, concatenate it to the result array
- resultArray.push(resultString);
- resultArray = resultArray.concat(e);
- resultString = "";
- } else if (typeof e === "number") {
- // if that's a number, append a localized version.
- resultString += locale.number(e.toString())
- } else {
- // otherwise, just concatenate it to the result string
- resultString += e;
- }
- }
- return true;
- }
-
- // invalid index: just %INTEGER and continue
- if (appendToResult) { resultString += "%" + argIndex; }
- i++;
- return true;
- }
-
- function parseInteger(appendToResult)
- {
- var number = s.match(/^\{(\d+)\}/);
- if (!number) return false;
-
- // %{INTEGER} escaped integer
- if (appendToResult) { resultString += number[1]; }
- i += number[0].length;
- return true;
- }
+ strings: {
+ en: {isLoaded: true}, // nothing needs to be loaded for this
+ fr: {}
+ },
- function parseChoiceBlock(blockName, choiceFunction)
- {
- var pattern = "^\\{"+blockName+":%(\\d)+\\|";
- var blockStart = s.match(pattern);
- if (!blockStart) return false;
-
- var key = +blockStart[1]+1;
- if (!(key in args)) return false;
-
- // %\{blockName:%INTEGER|form1|form2 ... \}
- i = blockStart[0].length;
-
- var choiceIndex = choiceFunction(args[key]), j = 1;
- var isChosenBlock = (j === choiceIndex);
- var blockFound = isChosenBlock;
-
- while (i < m) {
- if (s[i] == "|") {
- // new choice block
- i++; j++;
- isChosenBlock = (j === choiceIndex);
- if (isChosenBlock) blockFound = true;
- continue;
- }
- if (s[i] == "}") {
- // closing brace
- i++;
- break;
- }
- if (s[i] != "%" || i+1 == m) {
- // normal char or % at the end of the string
- parseNextUnicodePoint(isChosenBlock);
- continue;
+ //
+ // The pattern for substitution escapes:
+ // %n or %{n} or %{plural:%n|option1|option1|...} or %c
+ //
+ pattern: /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%(?:\d+|\{\d+\}|.)|[^\}])*)+\}|.)/g,
+
+ _: function (id,phrase) {
+ if (phrase instanceof Array) {return this.processSnippet(id,phrase)}
+ return this.processString(this.lookupPhrase(id,phrase),[].slice.call(arguments,2));
+ },
+
+ processString: function (string,args,domain) {
+ //
+ // Process arguments for substitution
+ // If the argument is a snippet (and we are processing snippets) do so,
+ // Otherwise, if it is a number, convert it for the lacale
+ //
+ for (var i = 0, m = args.length; i < m; i++) {
+ if (domain && args[i] instanceof Array) {args[i] = this.processSnippet(domain,args[i])}
+ }
+ //
+ // Split string at escapes and process them individually
+ //
+ var parts = string.split(this.pattern);
+ for (var i = 1, m = parts.length; i < m; i += 2) {
+ var c = parts[i].charAt(0); // first char will be { or \d or a char to be kept literally
+ if (c >= "0" && c <= "9") { // %n
+ parts[i] = args[parts[i]-1] || "???";
+ if (typeof parts[i] === "number") parts[i] = this.number(parts[i]);
+ } else if (c === "{") { // %{n} or %{plural:%n|...}
+ c = parts[i].substr(1);
+ if (c >= "0" && c <= "9") { // %{n}
+ parts[i] = args[parts[i].substr(1,parts[i].length-2)-1] || "???";
+ if (typeof parts[i] === "number") parts[i] = this.number(parts[i]);
+ } else { // %{plural:%n|...}
+ var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
+ if (match[1] === "plural") {
+ var n = args[match[2]-1];
+ if (typeof n === "undefined") {
+ parts[i] = "???"; // argument doesn't exist
+ } else {
+ n = this.plural(n) - 1; // index of the form to use
+ var plurals = match[3].replace(/%\|/g,"%\uEFEF").split(/\|/); // the parts (replacing %| with a special character)
+ if (n >= 0 && n < plurals.length) {
+ parts[i] = this.processString(plurals[n].replace(/\uEFEF/g,"|"),args,domain);
+ } else {
+ parts[i] = "???"; // no string for this index
+ }
+ }
+ } else {parts[i] = "%"+parts[i]} // not "plural:put back the % and leave unchanged
}
-
- // keep only the substring after the %
- i++; s = s.substr(i); m -= i; i = 0;
-
- // %INTEGER argument substitution
- if (parseArgument(isChosenBlock)) continue;
-
- // %{INTEGER} escaped integer
- if (parseInteger(isChosenBlock)) continue;
-
- // %CHAR: escaped character
- parseNextUnicodePoint(isChosenBlock);
- continue;
- }
-
- if (!blockFound) {
- i = 0;
- return false;
}
-
- return true;
}
-
- function transformString(string)
- {
- s = string;
- i = 0;
- m = s.length;
- resultString = "";
- resultArray = [];
-
- while (i < m) {
- if (s[i] != "%" || i+1 == m) {
- // normal char or % at the end of the string
- parseNextUnicodePoint(true);
- continue;
- }
-
- // keep only the substring after the %
- i++; s = s.substr(i); m -= i; i = 0;
-
- // %INTEGER argument substitution
- if (parseArgument(true)) continue;
-
- // %{INTEGER} escaped integer
- if (parseInteger(true)) continue;
-
- // %\{plural:%INTEGER|form1|form2 ... \} plural forms
- if (parseChoiceBlock("plural", locale.plural)) continue;
-
- // %CHAR: escaped character
- parseNextUnicodePoint(true);
- continue;
+ //
+ // If we are not forming a snippet, return the completed string
+ //
+ if (!domain) {return parts.join("")}
+ //
+ // We need to return an HTML snippet, so buld it from the
+ // broken up string with inserted parts (that could be snippets)
+ //
+ var snippet = [], part = "";
+ for (i = 0; i < m; i++) {
+ part += parts[i]; i++; // add the string and move on to substitution result
+ if (i < m) {
+ if (parts[i] instanceof Array) { // substitution was a snippet
+ snippet.push(part); // add the accumulated string
+ snippet = snippet.concat(parts[i]); // concatenate the substution snippet
+ part = ""; // start accumulating a new string
+ } else { // substitution was a string
+ part += parts[i]; // add to accumulating string
+ }
}
-
- if (resultArray.length == 0) return resultString;
-
- return resultArray;
}
-
- function transformHTMLSnippet(snippet)
- {
- for (var key in snippet) {
- var e = snippet[key];
- if (typeof e === "string") {
- // transform the string content
- snippet[key] = transformString(e);
- continue;
- }
- if (e[1]) {
- // transform attribute values
- for (var key2 in e[1]) {
- snippet[key][1][key2] = transformString(e[1][key2]);
- }
- }
- if (e[2]) {
- // transform the HTML content
- snippet[key][2] = transformHTMLSnippet(e[2]);
+ if (part !== "") {snippet.push(part)} // add final string
+ return snippet;
+ },
+
+ processSnippet: function (domain,snippet) {
+ var result = []; // the new snippet
+ //
+ // Look through the original snippet for
+ // strings or snippets to translate
+ //
+ for (var i = 0, m = snippet.length; i < m; i++) {
+ if (snippet[i] instanceof Array) {
+ //
+ // This could be a sub-snippet:
+ // ["tag"] or ["tag",{properties}] or ["tag",{properties},snippet]
+ // Or it could be something to translate:
+ // [id,string,args] or [domain,snippet]
+ var data = snippet[i];
+ if (typeof data[1] === "string") { // [id,string,args]
+ var id = data[0]; if (!(id instanceof Array)) {id = [domain,id]}
+ var phrase = this.lookupPhrase(id,data[1]);
+ result = result.concat(this.processString(phrase,data.slice(2),domain));
+ } else if (data[1] instanceof Array) { // [domain,snippet]
+ result = result.concat(this.processSnippet.apply(this,data));
+ } else if (data.length >= 3) { // ["tag",{properties},snippet]
+ result.push([data[0],data[1],this.processSnippet(domain,data[2])]);
+ } else { // ["tag"] or ["tag",{properties}]
+ result.push(snippet[i]);
}
+ } else { // a string
+ result.push(snippet[i]);
}
- return snippet;
}
+ return result;
+ },
+ lookupPhrase: function (id,phrase,domain) {
//
// Get the domain and messageID
//
- var domain = "_";
- if (messageId instanceof Array) {
- domain = (messageId[0] || "_");
- messageId = (messageId[1] || "");
- }
+ if (!domain) {domain = "_"}
+ if (id instanceof Array) {domain = (id[0] || "_"); id = (id[1] || "")}
//
// Check if the data is available and if not,
// load it and throw a restart error so the calling
@@ -1270,18 +1193,14 @@ MathJax.Localization = {
if (localeData) {
if (localeData.domains && domain in localeData.domains) {
var domainData = localeData.domains[domain];
- if (domainData.strings && messageId in domainData.strings)
- {phrase = domainData.strings[messageId]}
+ if (domainData.strings && id in domainData.strings)
+ {phrase = domainData.strings[id]}
}
}
-
- if (typeof phrase === "string") {
- // handle the phrase as a simple string
- return transformString(phrase);
- }
-
- // handle the phrase as a HTML snippet
- return transformHTMLSnippet(phrase);
+ //
+ // return the translated phrase
+ //
+ return phrase;
},
//
@@ -2004,8 +1923,7 @@ MathJax.Hub = {
// Put up final message, reset the state and return
//
if (state.scripts.length && this.config.showProcessingMessages)
- // Localization: see filterText
- {MathJax.Message.Set(["ProcessMath","Processing math: %1%%",100],0)}
+ {MathJax.Message.Set(["ProcessMath","Processing math: %1%%",100],0)}
state.start = new Date().getTime(); state.i = state.j = 0;
return null;
},
diff --git a/unpacked/extensions/FontWarnings.js b/unpacked/extensions/FontWarnings.js
@@ -88,11 +88,8 @@
(function (HUB,HTML) {
var VERSION = "2.1.1";
- var _ = function (id) {
- return MathJax.Localization._.apply(MathJax.Localization,
- [["FontWarnings",id]].concat([].slice.call(arguments,1))
- );
- }
+ var STIXURL = "http://www.stixfonts.org/";
+ var MATHJAXURL = "http://www.mathjax.org/help-v2/fonts";
var CONFIG = HUB.CombineConfig("FontWarnings",{
//
@@ -119,37 +116,35 @@
// The messages for the various situations
//
Message: {
- // Localization:
- // how do we ensure it is updated when the language is changed?
+
webFont: [
["closeBox"],
- _("webFont",
+ ["webFont",
"MathJax is using web-based fonts to display the mathematics "+
"on this page. These take time to download, so the page would "+
"render faster if you installed math fonts directly in your "+
- "system's font folder."),
+ "system's font folder."],
["fonts"]
],
imageFonts: [
["closeBox"],
- _("imageFonts",
- "MathJax is using its image fonts rather than local or web-based fonts. "+
- "This will render slower than usual, and the mathematics may not print "+
- "at the full resolution of your printer."),
-
+ ["imageFonts",
+ "MathJax is using its image fonts rather than local or web-based fonts. "+
+ "This will render slower than usual, and the mathematics may not print "+
+ "at the full resolution of your printer."],
["fonts"],
["webfonts"]
],
noFonts: [
["closeBox"],
- _("noFonts",
- "MathJax is unable to locate a font to use to display "+
- "its mathematics, and image fonts are not available, so it "+
- "is falling back on generic unicode characters in hopes that "+
- "your browser will be able to display them. Some characters "+
- "may not show up properly, or possibly not at all."),
+ ["noFonts",
+ "MathJax is unable to locate a font to use to display "+
+ "its mathematics, and image fonts are not available, so it "+
+ "is falling back on generic unicode characters in hopes that "+
+ "your browser will be able to display them. Some characters "+
+ "may not show up properly, or possibly not at all."],
["fonts"],
["webfonts"]
]
@@ -183,40 +178,48 @@
[["span",{style:{position:"relative", bottom:".2em"}},["x"]]]
]],
- // Localization:
- // - decide HTML snippet format
- // how do we ensure it is updated when the language is changed?
- webFonts: [
- ["p"],
- _("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.")
- ],
-
- fonts: _("fonts",
- "%1 MathJax can use either the %2 or the %3 "+
- ". Download and install either one to improve your MathJax experience.",
- [["p"]],
- [["a",{href:"http://www.stixfonts.org/",target:"_blank"},
- _("STIXfonts", "STIX fonts")]],
- [["a",{href:"http://www.mathjax.org/help-v2/fonts/",target:"_blank"},
- [_("TeXfonts", "MathJax TeX fonts")]]]
- ),
+ webfonts: [
+ ["p"],
+ ["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."
+ ]
+ ],
+
+ fonts: [
+ ["p"],
+ ["fonts",
+ "MathJax can use either the %1 or the %2",
+ [["a",{href:STIXURL,target:"_blank"},[["STIXfonts","STIX fonts"]]]],
+ [["a",{href:MATHJAXURL,target:"_blank"},[["TeXfonts","MathJax TeX fonts"]]]]
+ ]
+ ],
+
+// fonts: [
+// ["p"],
+// ["fonts",
+// "MathJax can use either the [STIX fonts](%1) or the [MathJax TeX fonts](%2)",
+// "http://www.stixfonts.org/","http://www.mathjax.org/help-v2/fonts/"]
+// ],
- STIXfonts: _("PageDesigned",
- "%1 This page is designed to use the %2."+
- " Download and install those fonts to improve your MathJax experience.",
- [["p"]],
- [["a",{href:"http://www.mathjax.org/help-v2/fonts/",target:"_blank"},
- [_("STIXfonts", "STIX fonts")]]]),
+ STIXfonts: [
+ ["p"],
+ ["PageDesigned",
+ "This page is designed to use the %1. " +
+ "Download and install those fonts to improve your MathJax experience.",
+ [["a",{href:STIXURL,target:"_blank"},[["STIXfonts","STIX fonts"]]]]
+ ]
+ ],
- TeXfonts: _("PageDesigned",
- "%1 This page is designed to use the %2."+
- " Download and install those fonts to improve your MathJax experience.",
- [["p"]],
- [["a",{href:"http://www.mathjax.org/help-v2/fonts/",target:"_blank"},
- [_("TeXfonts", "MathJax TeX fonts")]]])
+ TeXfonts: [
+ ["p"],
+ ["PageDesigned",
+ "This page is designed to use the %1. " +
+ "Download and install those fonts to improve your MathJax experience.",
+ [["a",{href:MATHJAXURL,target:"_blank"},[["TeXfonts","MathJax TeX fonts"]]]]
+ ]
+ ]
},
@@ -251,10 +254,17 @@
} else {delete CONFIG.messageStyle.filter}
CONFIG.messageStyle.maxWidth = (document.body.clientWidth-75) + "px";
var i = 0; while (i < data.length) {
- if (data[i] instanceof Array && CONFIG.HTML[data[i][0]])
- {data.splice.apply(data,[i,1].concat(CONFIG.HTML[data[i][0]]))} else {i++}
+ if (data[i] instanceof Array) {
+ if (data[i].length === 1 && CONFIG.HTML[data[i][0]]) {
+ data.splice.apply(data,[i,1].concat(CONFIG.HTML[data[i][0]]));
+ } else if (typeof data[i][1] === "string") {
+ data.splice.apply(data,[i,1].concat(message));
+ i += message.length;
+ } else {i++}
+ } else {i++}
}
- DATA.div = HTMLCSS.addElement(frame,"div",{id:"MathJax_FontWarning",style:CONFIG.messageStyle},data);
+ DATA.div = HTMLCSS.addElement(frame,"div",
+ {id:"MathJax_FontWarning",style:CONFIG.messageStyle},data);
if (CONFIG.removeAfter) {
HUB.Register.StartupHook("End",function ()
{DATA.timer = setTimeout(FADEOUT,CONFIG.removeAfter)});
@@ -296,7 +306,13 @@
if (message.match(/- Web-Font/)) {if (localFonts) {MSG = "webFont"}}
else if (message.match(/- using image fonts/)) {MSG = "imageFonts"}
else if (message.match(/- no valid font/)) {MSG = "noFonts"}
- if (MSG && CONFIG.Message[MSG]) {CREATEMESSAGE(CONFIG.Message[MSG])}
+ if (MSG && CONFIG.Message[MSG]) {
+ MathJax.Callback.Queue(
+ ["loadDomain",MathJax.Localization,"FontWarnings"], // load locale
+ ["loadDomain",MathJax.Localization,"FontWarnings"], // load domain
+ [CREATEMESSAGE,CONFIG.Message[MSG]]
+ );
+ }
}
});
}
diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js
@@ -772,7 +772,7 @@
MENU.Scale = function () {
var HTMLCSS = OUTPUT["HTML-CSS"], nMML = OUTPUT.NativeMML, SVG = OUTPUT.SVG;
var SCALE = (HTMLCSS||nMML||SVG||{config:{scale:100}}).config.scale;
- var scale = prompt(_("ScaleMath", "Scale all mathematics (compared to surrounding text) by %1%%",SCALE));
+ var scale = prompt(_("ScaleMath", "Scale all mathematics (compared to surrounding text) by"),SCALE+"%");
if (scale) {
if (scale.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)) {
scale = parseFloat(scale);
@@ -898,7 +898,7 @@
MENU.cookie.mpContext = MENU.cookie.mpMouse = CONFIG.settings.mpMouse;
MENU.saveCookie();
MathJax.Hub.Queue(["Rerender",MathJax.Hub])
- } else if (!discoverable && item.name[0] === "Menu Events" && CONFIG.settings.mpContext) {
+ } else if (!discoverable && item.name[1] === "Menu Events" && CONFIG.settings.mpContext) {
alert(_.apply(_,MESSAGE.IE9warning));
}
};
diff --git a/unpacked/extensions/v1.0-warning.js b/unpacked/extensions/v1.0-warning.js
@@ -58,39 +58,43 @@
CONFIG.style.position = "absolute";
} else {delete CONFIG.style.filter}
CONFIG.style.maxWidth = (document.body.clientWidth-75) + "px";
- DIV = HTML.addElement(frame,"div",{id:"MathJax_ConfigWarning",style:CONFIG.style},
- // Localization:
- // - decide HTML snippet format
- // - how do we ensure it is updated when the language is changed?
- MathJax.Localization._(["ConfigWarning", "MissingConfig"],
- "%1 MathJax no longer loads a default configuration file; " +
- "you must specify such files explicitly. " +
- "This page seems to use the older default %2 file"+
- ", and so needs to be updated. This is explained further at %3",
- [[
- "div",{
- style: {
- position:"absolute", overflow:"hidden", top:".1em", right:".1em",
- border: "1px outset", width:"1em", height:"1em",
- "text-align": "center", cursor: "pointer",
- "background-color": "#EEEEEE", color:"#606060",
+ MathJax.Localization.Try(function () {
+ DIV = HTML.addElement(frame,"div",{id:"MathJax_ConfigWarning",style:CONFIG.style},
+ MathJax.Localization._("v1.0-warning",
+ [
+ [
+ "div",{
+ style: {
+ position:"absolute", overflow:"hidden", top:".1em", right:".1em",
+ border: "1px outset", width:"1em", height:"1em",
+ "text-align": "center", cursor: "pointer",
+ "background-color": "#EEEEEE", color:"#606060",
- "border-radius": ".5em", // Opera 10.5
- "-webkit-border-radius": ".5em", // Safari and Chrome
- "-moz-border-radius": ".5em", // Firefox
- "-khtml-border-radius": ".5em" // Konqueror
- },
- onclick: function () {DIV.style.display = "none"}
- },
- [["span",{style:{position:"relative", bottom:".2em"}},["x"]]]
- ]],
- [["code",{},["config/MathJax.js"]]],
- [["p",{style:{"text-align":"center"}},[
- ["a",
- {href:"http://www.mathjax.org/help/configuration"},
- ["http://www.mathjax.org/help/configuration"]
- ]
- ]]]))
+ "border-radius": ".5em", // Opera 10.5
+ "-webkit-border-radius": ".5em", // Safari and Chrome
+ "-moz-border-radius": ".5em", // Firefox
+ "-khtml-border-radius": ".5em" // Konqueror
+ },
+ onclick: function () {DIV.style.display = "none"}
+ },
+ [["span",{style:{position:"relative", bottom:".2em"}},["x"]]]
+ ],
+ ["MissingConfig",
+ "MathJax no longer loads a default configuration file; " +
+ "you must specify such files explicitly. " +
+ "This page seems to use the older default %1 " +
+ "file, and so needs to be updated. This is explained further at %1",
+ [["code",{},["config/MathJax.js"]]],
+ [["p",{style:{"text-align":"center"}},[
+ ["a",
+ {href:"http://www.mathjax.org/help-v2/configuration"},
+ ["http://www.mathjax.org/help-v2/configuration"]
+ ]
+ ]]]
+ ]
+ ])
+ );
+ });
});
})(MathJax.Hub,MathJax.HTML);
diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js
@@ -137,7 +137,7 @@
loadWebFont: function (font) {
HUB.Startup.signal.Post("HTML-CSS Jax - Web-Font "+HTMLCSS.fontInUse+"/"+font.directory);
- var n = MESSAGE(["LoadWebFont","Loading webfont %1",HTMLCSS.fontInUse+"/"+font.directory]);
+ var n = MESSAGE(["LoadWebFont","Loading web-font %1",HTMLCSS.fontInUse+"/"+font.directory]);
var done = MathJax.Callback({}); // called when font is loaded
var callback = MathJax.Callback(["loadComplete",this,font,n,done]);
AJAX.timer.start(AJAX,[this.checkWebFont,font,callback],0,this.timeout);
diff --git a/unpacked/localization/fr/FontWarnings.js b/unpacked/localization/fr/FontWarnings.js
@@ -32,12 +32,12 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
"être améliorée.",
fonts:
- "%1 MathJax peut utiliser les %2 ou bien les %3. Téléchargez et"+
+ "MathJax peut utiliser les %1 ou bien les %2. Téléchargez et"+
"installez l'une de ces familles de polices pour améliorer votre"+
"expérience avec MathJax.",
PageDesigned:
- "%1 Cette page est conçue pour utiliser les %2. Téléchargez "+
+ "Cette page est conçue pour utiliser les %1. Téléchargez "+
" et installez ces polices pour améliorer votre expérience "+
"avec MathJax",
@@ -50,4 +50,4 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
}
});
-MathJax.Ajax.loadComplete("[MathJax]/localization/fr/FontWarnings.js");
-\ No newline at end of file
+MathJax.Ajax.loadComplete("[MathJax]/localization/fr/FontWarnings.js");
diff --git a/unpacked/localization/fr/HTML-CSS.js b/unpacked/localization/fr/HTML-CSS.js
@@ -0,0 +1,26 @@
+MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
+ "HTML-CSS": {
+ isLoaded: true,
+ strings: {
+
+ LoadWebFont: "Téléchargement la police Web %1",
+
+ CantLoadWebFont: "Impossible de télécharcharger la police Web %1",
+
+ FirefoxCantLoadWebFont:
+ "Firefox ne peut télécharger les polices Web à partir d'un hôte "+
+ "distant",
+
+ CantFindFontUsing:
+ "Impossible de trouver une police valide en utilisant %1",
+
+ WebFontsNotAvailable:
+ "Polices Web non disponibles -- des images de caractères vont être "+
+ "utilisées à la place"
+
+ }
+ }
+
+});
+
+MathJax.Ajax.loadComplete("[MathJax]/localization/fr/HTML-CSS.js");
diff --git a/unpacked/localization/fr/MathML.js b/unpacked/localization/fr/MathML.js
@@ -46,4 +46,4 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
}
});
-MathJax.Ajax.loadComplete("[MathJax]/localization/fr/MathML.js");
-\ No newline at end of file
+MathJax.Ajax.loadComplete("[MathJax]/localization/fr/MathML.js");
diff --git a/unpacked/localization/fr/MathMenu.js b/unpacked/localization/fr/MathMenu.js
@@ -3,44 +3,44 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
isLoaded: true,
strings: {
- Show: "Voir Maths Comme",
- MathMLcode: "du Code MathML",
- OriginalMathML: "d'Origine MathML",
- TeXCommands: "Commandes TeX",
- AsciiMathInput: "AsciiMathml Entrée",
- Original: "Forme Originale",
- ErrorMessage: "Message d'Erreur",
- texHints: "Voir les notes TeX dans MathML",
- Settings: "Paramètres Maths",
- ZoomTrigger: "Trigger Zoom",
- Hover: "Flotter",
+ Show: "Afficher la Formule sous Forme",
+ MathMLcode: "de Code MathML",
+ OriginalMathML: "de Code MathML d'Origine",
+ TeXCommands: "de Commandes TeX",
+ AsciiMathInput: "de code AsciiMathml",
+ Original: "d'Origine",
+ ErrorMessage: "de Message d'Erreur",
+ texHints: "Afficher les indications TeX dans le code MathML",
+ Settings: "Paramètres des formules",
+ ZoomTrigger: "Déclenchement du Zoom par",
+ Hover: "Survol de la Souris",
Click: "Clic de Souris",
DoubleClick: "Double-Clic",
NoZoom: "Pas de Zoom",
- TriggerRequires: "Trigger Nécessite",
+ TriggerRequires: "Le déclenchement nécessite l'appui sur la touche",
Option: "Option",
Alt: "Alt",
Command: "Command",
Control: "Control",
Shift: "Shift",
ZoomFactor: "Facteur de Zoom",
- Renderer: "Traduire Maths",
- MPHandles: "Laissez MathPlayer Gérer:",
- MenuEvents: "Sélections du menu",
+ Renderer: "Mode de Rendu",
+ MPHandles: "Laissez MathPlayer Gérer les",
+ MenuEvents: "Êvénements du menu",
MouseEvents: "Êvénements de la Souris",
- MenuAndMouse: "Les Êvénements de Menu et de la Souris",
+ MenuAndMouse: "Êvénements de Menu et de la Souris",
FontPrefs: "Préférences des Polices",
ForHTMLCSS: "Pour le HTML-CSS:",
Auto: "Auto",
- TeXLocal: "TeX (local)",
+ TeXLocal: "TeX (locales)",
TeXWeb: "TeX (web)",
TeXImage: "TeX (image)",
- STIXLocal: "STIX (local)",
+ STIXLocal: "STIX (locales)",
ContextMenu: "Menu Contextuel",
Browser: "Navigateur",
- Scale: "Ajuster tous les Maths ...",
- Discoverable: "Mettez en Surbrillance lors de Survol",
- About: "À propos de MathJax",
+ Scale: "Mise à l'échelle des formules ...",
+ Discoverable: "Mettez en Surbrillance lors du Survol",
+ About: "À Propos de MathJax",
Help: "Aide MathJax",
localTeXfonts: "utilisant les polices locales TeX",
@@ -60,7 +60,7 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
"les expressions mathématiques.",
MSIENativeMMLWarning:
- "Internet Explorer a besoin de module complémentaire MathPlayer " +
+ "Internet Explorer a besoin du module complémentaire MathPlayer " +
"pour afficher le MathML.",
OperaNativeMMLWarning:
@@ -84,7 +84,7 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
ScaleMath:
"Mise à l'échelle des expressions mathématiques (par rapport au " +
- "text environnant) de %1%%",
+ "text environnant) de",
NonZeroScale:
"L'échelle ne peut être nulle",
@@ -115,4 +115,4 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
}
});
-MathJax.Ajax.loadComplete("[MathJax]/localization/fr/MathMenu.js");
-\ No newline at end of file
+MathJax.Ajax.loadComplete("[MathJax]/localization/fr/MathMenu.js");
diff --git a/unpacked/localization/fr/TeX.js b/unpacked/localization/fr/TeX.js
@@ -251,4 +251,4 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
}
});
-MathJax.Ajax.loadComplete("[MathJax]/localization/fr/TeX.js");
-\ No newline at end of file
+MathJax.Ajax.loadComplete("[MathJax]/localization/fr/TeX.js");
diff --git a/unpacked/localization/fr/fr.js b/unpacked/localization/fr/fr.js
@@ -6,7 +6,7 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr,{
strings: {
CookieConfig:
- "MathJax a trouvé un cookie de configuration utilisateur qui inclut"+
+ "MathJax a trouvé un cookie de configuration utilisateur qui inclut "+
"du code à exécuter. Souhaitez vous l'exécuter?\n\n"+
"(Choisissez Annuler sauf si vous avez créé ce cookie vous-même",
@@ -25,27 +25,14 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr,{
LoadFailed: "Échec du téléchargement de %1",
- CantLoadWebFont: "Impossible de télécharcharger la police Web %1",
-
- ProcessMath: "Traitement des maths: %1%%",
+ ProcessMath: "Traitement des formules: %1%%",
Processing: "Traitement",
- TypesetMath: "Composition des maths: %1%%",
+ TypesetMath: "Composition des formules: %1%%",
Typesetting: "Composition",
- FirefoxCantLoadWebFont:
- "Firefox ne peut télécharger les polices Web à partir d'un hôte"+
- "distant",
-
- CantFindFontUsing:
- "Impossible de trouver une police valide en utilisant %1",
-
- WebFontsNotAvailable:
- "Polices Web non disponibles -- des images de caractères vont être"+
- "utilisées à la place",
-
MathJaxNotSupported:
"Votre navigateur ne supporte pas MathJax"
@@ -55,7 +42,8 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr,{
FontWarnings: {},
"v1.0-warning": {},
TeX: {},
- MathML: {}
+ MathML: {},
+ "HTML-CSS": {}
},
plural: function(n) {
@@ -64,9 +52,9 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr,{
},
number: function(n) {
- return n.replace(".", ","); // replace dot by comma
+ return String(n).replace(".", ","); // replace dot by comma
}
});
-MathJax.Ajax.loadComplete("[MathJax]/localization/fr/fr.js");
-\ No newline at end of file
+MathJax.Ajax.loadComplete("[MathJax]/localization/fr/fr.js");
diff --git a/unpacked/localization/fr/v1.0-warning.js b/unpacked/localization/fr/v1.0-warning.js
@@ -3,13 +3,13 @@ MathJax.Hub.Insert(MathJax.Localization.strings.fr.domains,{
isLoaded: true,
strings: {
MissingConfig:
- "%1 MathJax ne charge plus de fichier de configuration par défaut; "+
+ "MathJax ne charge plus de fichier de configuration par défaut; "+
"vous devez spécifier ces fichiers de façons explicites. Cette "+
"page semble utiliser l'ancien fichier de configuration par "+
- "défaut %2 and doit donc être mise à jour. Ceci est expliqué "+
- "en détails à l'addresse suivante: %3"
+ "défaut %1 and doit donc être mise à jour. Ceci est expliqué "+
+ "en détails à l'addresse suivante: %2"
}
}
});
-MathJax.Ajax.loadComplete("[MathJax]/localization/fr/v1.0-warning.js");
-\ No newline at end of file
+MathJax.Ajax.loadComplete("[MathJax]/localization/fr/v1.0-warning.js");