Fixed localization issues pointed out by fred (this creates some new messages that need to be translated).
This commit is contained in:
parent
5b2a6a1d35
commit
173c501eae
|
@ -186,7 +186,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
if (global.label) {TEX.Error(["MultipleCommand","Multiple %1",name])}
|
||||
global.label = label;
|
||||
if (AMS.labels[label] || AMS.eqlabels[label])
|
||||
{TEX.Error(["MultipleLabel","Label '%1' mutiply defined",label])}
|
||||
{TEX.Error(["MultipleLabel","Label '%1' multiply defined",label])}
|
||||
AMS.eqlabels[label] = "???"; // will be replaced by tag value later
|
||||
}
|
||||
},
|
||||
|
@ -461,7 +461,8 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
|||
EndRow: function () {
|
||||
if (this.row.length != 1) {
|
||||
TEX.Error(["MultlineRowsOneCol",
|
||||
"multline rows must have exactly one column"]);
|
||||
"The rows within the %1 environment must have exactly one column",
|
||||
"multline"]);
|
||||
}
|
||||
this.table.push(this.row); this.row = [];
|
||||
},
|
||||
|
|
|
@ -125,13 +125,16 @@ MathJax.Extension["TeX/color"] = {
|
|||
get_rgb: function (rgb) {
|
||||
rgb = rgb.split(/,/); var RGB = "#";
|
||||
if (rgb.length !== 3)
|
||||
{this.TEX.Error(["rgbArg1","rgb colors require 3 decimal numbers"])}
|
||||
{this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","rgb"])}
|
||||
for (var i = 0; i < 3; i++) {
|
||||
if (!rgb[i].match(/^(\d+(\.\d*)?|\.\d+)$/))
|
||||
{this.TEX.Error(["InvalidDecimalNumber","Invalid decimal number"])}
|
||||
var n = parseFloat(rgb[i]);
|
||||
if (n < 0 || n > 1)
|
||||
{this.TEX.Error(["rgbArg2","rgb values must be between 0 and 1"])}
|
||||
if (n < 0 || n > 1) {
|
||||
this.TEX.Error(["ModelArg2",
|
||||
"Color values for the %1 model must be between %2 and %3",
|
||||
"rgb",0,1]);
|
||||
}
|
||||
n = Math.floor(n*255).toString(16); if (n.length < 2) {n = "0"+n}
|
||||
RGB += n;
|
||||
}
|
||||
|
@ -144,13 +147,16 @@ MathJax.Extension["TeX/color"] = {
|
|||
get_RGB: function (rgb) {
|
||||
rgb = rgb.split(/,/); var RGB = "#";
|
||||
if (rgb.length !== 3)
|
||||
{this.TEX.Error(["RGBArg1","RGB colors require 3 numbers"])}
|
||||
{this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","RGB"])}
|
||||
for (var i = 0; i < 3; i++) {
|
||||
if (!rgb[i].match(/^\d+$/))
|
||||
{this.TEX.Error(["InvalidNumber","Invalid number"])}
|
||||
var n = parseInt(rgb[i]);
|
||||
if (n > 255)
|
||||
{this.TEX.Error(["RGBArg2","RGB values must be between 0 and 255"])}
|
||||
if (n > 255) {
|
||||
this.TEX.Error(["ModelArg2",
|
||||
"Color values for the %1 model must be between %2 and %3",
|
||||
"RGB",0,255]);
|
||||
}
|
||||
n = n.toString(16); if (n.length < 2) {n = "0"+n}
|
||||
RGB += n;
|
||||
}
|
||||
|
@ -164,8 +170,11 @@ MathJax.Extension["TeX/color"] = {
|
|||
if (!gray.match(/^(\d+(\.\d*)?|\.\d+)$/))
|
||||
{this.TEX.Error(["InvalidDecimalNumber","Invalid decimal number"])}
|
||||
var n = parseFloat(gray);
|
||||
if (n < 0 || n > 1)
|
||||
{this.TEX.Error(["GrayScalerArg","Grey-scale values must be between 0 and 1"])}
|
||||
if (n < 0 || n > 1) {
|
||||
this.TEX.Error(["ModelArg2",
|
||||
"Color values for the %1 model must be between %2 and %3",
|
||||
"gray",0,1]);
|
||||
}
|
||||
n = Math.floor(n*255).toString(16); if (n.length < 2) {n = "0"+n}
|
||||
return "#"+n+n+n;
|
||||
},
|
||||
|
|
|
@ -156,8 +156,9 @@
|
|||
STACKITEM.subsup = STACKITEM.Subclass({
|
||||
type: "subsup",
|
||||
stopError: /*_()*/ ["MissingScript","Missing superscript or subscript argument"],
|
||||
supError: /*_()*/ ["MissingOpenForSup","Missing open brace for superscript"],
|
||||
subError: /*_()*/ ["MissingOpenForSup","Missing open brace for subscript"],
|
||||
checkItem: function (item) {
|
||||
var script = ["","subscript","superscript"][this.position];
|
||||
if (item.type === "open" || item.type === "left") {return true}
|
||||
if (item.type === "mml") {
|
||||
if (this.primes) {
|
||||
|
@ -168,7 +169,7 @@
|
|||
return STACKITEM.mml(this.data[0]);
|
||||
}
|
||||
if (this.SUPER(arguments).checkItem.call(this,item))
|
||||
{TEX.Error(["MissingOpenForScript","Missing open brace for %1",script])}
|
||||
{TEX.Error(this[["","subError","supError"][this.position]])}
|
||||
},
|
||||
Pop: function () {}
|
||||
});
|
||||
|
@ -240,7 +241,7 @@
|
|||
STACKITEM.position = STACKITEM.Subclass({
|
||||
type: "position",
|
||||
checkItem: function (item) {
|
||||
if (item.isClose) {TEX.Error(["MissingBoxFor","Missing box for %1"])}
|
||||
if (item.isClose) {TEX.Error(["MissingBoxFor","Missing box for %1",name])}
|
||||
if (item.isNotStack) {
|
||||
var mml = item.mmlData();
|
||||
switch (this.move) {
|
||||
|
|
|
@ -20,8 +20,11 @@ MathJax.Localization.addTranslation("en","TeX",{
|
|||
Misplaced:
|
||||
"Misplaced %1",
|
||||
|
||||
MissingOpenForScript:
|
||||
"Missing open brace for %1",
|
||||
MissingOpenForSub:
|
||||
"Missing open brace for subscript",
|
||||
|
||||
MissingOpenForSup:
|
||||
"Missing open brace for superscript",
|
||||
|
||||
AmbiguousUseOf:
|
||||
"Ambiguous use of %1",
|
||||
|
@ -133,7 +136,7 @@ MathJax.Localization.addTranslation("en","TeX",{
|
|||
"%1 not allowed in %2 environment",
|
||||
|
||||
MultipleLabel:
|
||||
"Label '%1' mutiply defined",
|
||||
"Label '%1' multiply defined",
|
||||
|
||||
CommandAtTheBeginingOfLine:
|
||||
"%1 must come at the beginning of the line",
|
||||
|
@ -151,7 +154,7 @@ MathJax.Localization.addTranslation("en","TeX",{
|
|||
"Erroneous nesting of equation structures",
|
||||
|
||||
MultlineRowsOneCol:
|
||||
"multline rows must have exactly one column",
|
||||
"The rows within the %1 environment must have exactly one column",
|
||||
|
||||
/* bbox */
|
||||
|
||||
|
@ -171,30 +174,21 @@ MathJax.Localization.addTranslation("en","TeX",{
|
|||
|
||||
/* color */
|
||||
|
||||
UndefinedColorModel:
|
||||
UndefinedColorModel:
|
||||
"Color model '%1' not defined",
|
||||
|
||||
rgbArg1:
|
||||
"rgb colors require 3 decimal numbers",
|
||||
ModelArg1:
|
||||
"Color values for the %1 model require 3 numbers",
|
||||
|
||||
InvalidDecimalNumber:
|
||||
"Invalid decimal number",
|
||||
|
||||
rgbArg2:
|
||||
"rgb values must be between 0 and 1",
|
||||
|
||||
RGBArg1:
|
||||
"RGB colors require 3 numbers",
|
||||
ModelArg2:
|
||||
"Color values for the %1 model must be between %2 and %3",
|
||||
|
||||
InvalidNumber:
|
||||
"Invalid number",
|
||||
|
||||
RGBArg2:
|
||||
"RGB values must be between 0 and 255",
|
||||
|
||||
GrayScalerArg:
|
||||
"Grey-scale values must be between 0 and 1",
|
||||
|
||||
/* extpfeil */
|
||||
|
||||
NewextarrowArg1:
|
||||
|
@ -235,7 +229,7 @@ MathJax.Localization.addTranslation("en","TeX",{
|
|||
"Use of %1 doesn't match its definition",
|
||||
|
||||
RunawayArgument:
|
||||
"Argument manquant pour la commande %1?"
|
||||
"Runaway argument for %1?"
|
||||
|
||||
/* verb */
|
||||
|
||||
|
|
|
@ -20,8 +20,11 @@ MathJax.Localization.addTranslation("fr","TeX",{
|
|||
Misplaced:
|
||||
"Mauvaise position pour la commande %1",
|
||||
|
||||
MissingOpenForScript:
|
||||
"Accolade ouvrante manquante pour le script %1",
|
||||
MissingOpenForSub:
|
||||
"Missing open brace for subscript", // *NEW*
|
||||
|
||||
MissingOpenForSup:
|
||||
"Missing open brace for superscript", // *NEW*
|
||||
|
||||
AmbiguousUseOf:
|
||||
"Usage ambigu de la commande %1",
|
||||
|
@ -205,27 +208,18 @@ MathJax.Localization.addTranslation("fr","TeX",{
|
|||
UndefinedColorModel:
|
||||
"Le modèle de couleur '%1' n'est pas défini",
|
||||
|
||||
rgbArg1:
|
||||
"Les couleurs rgb nécéssitent 3 nombres décimaux",
|
||||
ModelArg1:
|
||||
"Color values for the %1 model require 3 numbers", // *NEW*
|
||||
|
||||
InvalidDecimalNumber:
|
||||
"Nombre décimal non valide",
|
||||
|
||||
rgbArg2:
|
||||
"Les valeurs rgb doivent être comprises entre 0 et 1",
|
||||
|
||||
RGBArg1:
|
||||
"Les couleurs RGB nécéssitent 3 nombres",
|
||||
ModelArg2:
|
||||
"Color values for the %1 model must be between %2 and %3", // *NEW*
|
||||
|
||||
InvalidNumber:
|
||||
"Nombre non valide",
|
||||
|
||||
RGBArg2:
|
||||
"Les valeurs RGB doivent être comprises entre 0 et 255",
|
||||
|
||||
GrayScalerArg:
|
||||
"Les valeurs de dégradé de gris doivent être comprises entre 0 et 1",
|
||||
|
||||
DoubleBackSlash:
|
||||
"\\ doit être suivi d'une séquence de contrôle",
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user