From 2b92cd50fef7dc4a92fef29451e51c19e75ebda0 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 9 Apr 2013 13:17:36 -0400 Subject: [PATCH] Add localization/en directory (never actually used, but can serve as template for other translations until we have a program that manages the data files). --- unpacked/localization/en/FontWarnings.js | 44 ++++ unpacked/localization/en/HTML-CSS.js | 23 +++ unpacked/localization/en/MathML.js | 52 +++++ unpacked/localization/en/MathMenu.js | 129 ++++++++++++ unpacked/localization/en/TeX.js | 248 +++++++++++++++++++++++ unpacked/localization/en/en.js | 58 ++++++ unpacked/localization/en/v1.0-warning.js | 14 ++ 7 files changed, 568 insertions(+) create mode 100644 unpacked/localization/en/FontWarnings.js create mode 100644 unpacked/localization/en/HTML-CSS.js create mode 100644 unpacked/localization/en/MathML.js create mode 100644 unpacked/localization/en/MathMenu.js create mode 100644 unpacked/localization/en/TeX.js create mode 100644 unpacked/localization/en/en.js create mode 100644 unpacked/localization/en/v1.0-warning.js diff --git a/unpacked/localization/en/FontWarnings.js b/unpacked/localization/en/FontWarnings.js new file mode 100644 index 000000000..97787deb2 --- /dev/null +++ b/unpacked/localization/en/FontWarnings.js @@ -0,0 +1,44 @@ +MathJax.Localization.addTranslation("en","FontWarnings",{ + isLoaded: true, + strings: { + + 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.", + + 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.", + + 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.", + + 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: + "MathJax can use either the %1 or the %2. " + + "Download and install one of those fonts to improve your MathJax experience.", + + PageDesigned: + "This page is designed to use the %1. " + + "Download and install those fonts to improve your MathJax experience.", + + STIXfonts: + "STIX fonts", + + TeXfonts: + "MathJax TeX fonts" + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/localization/en/FontWarnings.js"); diff --git a/unpacked/localization/en/HTML-CSS.js b/unpacked/localization/en/HTML-CSS.js new file mode 100644 index 000000000..a1725c42d --- /dev/null +++ b/unpacked/localization/en/HTML-CSS.js @@ -0,0 +1,23 @@ +MathJax.Localization.addTranslation("en","HTML-CSS",{ + isLoaded: true, + strings: { + + LoadWebFont: + "Loading web-font %1", + + CantLoadWebFont: + "Can't load web font %1", + + FirefoxCantLoadWebFont: + "Firefox can't load web fonts from a remote host", + + CantFindFontUsing: + "Can't find a valid font using %1", + + WebFontsNotAvailable: + "Web-Fonts not available -- using image fonts instead" + + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/localization/en/HTML-CSS.js"); diff --git a/unpacked/localization/en/MathML.js b/unpacked/localization/en/MathML.js new file mode 100644 index 000000000..eebd1e388 --- /dev/null +++ b/unpacked/localization/en/MathML.js @@ -0,0 +1,52 @@ +MathJax.Localization.addTranslation("en","MathML",{ + isLoaded: true, + strings: { + + BadMglyph: + "Bad mglyph: %1", + + BadMglyphFont: + "Bad font: %1", + + MathPlayer: + "MathJax was not able to set up MathPlayer.\n\n"+ + "If MathPlayer is not installed, you need to install it first.\n"+ + "Otherwise, your security settings may be preventing ActiveX \n"+ + "controls from running. Use the Internet Options item under\n"+ + "the Tools menu and select the Security tab, then press the\n"+ + "Custom Level button. Check that the settings for\n"+ + "'Run ActiveX Controls', and 'Binary and script behaviors'\n"+ + "are enabled.\n\n"+ + "Currently you will see error messages rather than\n"+ + "typeset mathematics.", + + CantCreateXMLParser: + "MathJax can't create an XML parser for MathML. Check that\n"+ + "the 'Script ActiveX controls marked safe for scripting' security\n"+ + "setting is enabled (use the Internet Options item in the Tools\n"+ + "menu, and select the Security panel, then press the Custom Level\n"+ + "button to check this).\n\n"+ + "MathML equations will not be able to be processed by MathJax.", + + UnknownNodeType: + "Unknown node type: %1", + + UnexpectedTextNode: + "Unexpected text node: %1", + + ErrorParsingMathML: + "Error parsing MathML", + + ParsingError: + "Error parsing MathML: %1", + + MathMLSingleElement: + "MathML must be formed by a single element", + + MathMLRootElement: + "MathML must be formed by a element, not %1" + + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/localization/en/MathML.js"); diff --git a/unpacked/localization/en/MathMenu.js b/unpacked/localization/en/MathMenu.js new file mode 100644 index 000000000..0dffc6cfe --- /dev/null +++ b/unpacked/localization/en/MathMenu.js @@ -0,0 +1,129 @@ +MathJax.Localization.addTranslation("en","MathMenu",{ + isLoaded: true, + strings: { + + Show: "Show Math As", + MathMLcode: "MathML Code", + OriginalMathML: "Original MathML", + TeXCommands: "TeX Commands", + AsciiMathInput: "AsciiMathML input", + Original: "Original Form", + ErrorMessage: "Error Message", + texHints: "Show TeX hints in MathML", + Settings: "Math Settings", + ZoomTrigger: "Zoom Trigger", + Hover: "Hover", + Click: "Click", + DoubleClick: "Double-Click", + NoZoom: "No Zoom", + TriggerRequires: "Trigger Requires:", + Option: "Option", + Alt: "Alt", + Command: "Command", + Control: "Control", + Shift: "Shift", + ZoomFactor: "Zoom Factor", + Renderer: "Math Renderer", + MPHandles: "Let MathPlayer Handle:", + MenuEvents: "Menu Events", + MouseEvents: "Mouse Events", + MenuAndMouse: "Mouse and Menu Events", + FontPrefs: "Font Preferences", + ForHTMLCSS: "For HTML-CSS:", + Auto: "Auto", + TeXLocal: "TeX (local)", + TeXWeb: "TeX (web)", + TeXImage: "TeX (image)", + STIXLocal: "STIX (local)", + ContextMenu: "Contextual Menu", + Browser: "Browser", + Scale: "Scale All Math ...", + Discoverable: "Highlight on Hover", + Locale: "Language", + LoadLocale: "Load from URL ...", + About: "About MathJax", + Help: "MathJax Help", + + localTeXfonts: "using local TeX fonts", + webTeXfonts: "using web TeX font", + imagefonts: "using Image fonts", + localSTIXfonts: "using local STIX fonts", + webSVGfonts: "using web SVG fonts", + genericfonts: "using generic unicode fonts", + + wofforotffonts: "woff or otf fonts", + eotffonts: "eot fonts", + svgfonts: "svg fonts", + + WebkitNativeMMLWarning: + "Your browser doesn't seem to support MathML natively, " + + "so switching to MathML output may cause the mathematics " + + "on the page to become unreadable.", + + MSIENativeMMLWarning: + "Internet Explorer requires the MathPlayer plugin " + + "in order to process MathML output.", + + OperaNativeMMLWarning: + "Opera's support for MathML is limited, so switching to " + + "MathML output may cause some expressions to render poorly.", + + SafariNativeMMLWarning: + "Your browser's native MathML does not implement all the features " + + "used by MathJax, so some expressions may not render properly.", + + FirefoxNativeMMLWarning: + "Your browser's native MathML does not implement all the features " + + "used by MathJax, so some expressions may not render properly.", + + MSIESVGWarning: + "SVG is not implemented in Internet Explorer prior to " + + "IE9 or when it is emulating IE8 or below. " + + "Switching to SVG output will cause the mathemtics to " + + "not display properly.", + + LoadURL: + "Load translation data from this URL:", + + BadURL: + "The URL should be for a javascript file that defines MathJax translation data. " + + "Javascript file names should end with '.js'", + + BadData: + "Failed to load translation data from %1", + + SwitchAnyway: + "Switch the renderer anyway?\n\n" + + "(Press OK to switch, CANCEL to continue with the current renderer)", + + ScaleMath: + "Scale all mathematics (compared to surrounding text) by", + + NonZeroScale: + "The scale should not be zero", + + PercentScale: + "The scale should be a percentage (e.g., 120%%)", + + IE8warning: + "This will disable the MathJax menu and zoom features, " + + "but you can Alt-Click on an expression to obtain the MathJax " + + "menu instead.\n\nReally change the MathPlayer settings?", + + IE9warning: + "The MathJax contextual menu will be disabled, but you can " + + "Alt-Click on an expression to obtain the MathJax menu instead.", + + NoOriginalForm: + "No original form available", + + Close: + "Close", + + EqSource: + "MathJax Equation Source" + + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/localization/en/MathMenu.js"); diff --git a/unpacked/localization/en/TeX.js b/unpacked/localization/en/TeX.js new file mode 100644 index 000000000..785fadcc8 --- /dev/null +++ b/unpacked/localization/en/TeX.js @@ -0,0 +1,248 @@ +MathJax.Localization.addTranslation("en","TeX",{ + isLoaded: true, + strings: { + + ExtraOpenMissingClose: + "Extra open brace or missing close brace", + + ExtraCloseMissingOpen: + "Extra close brace or missing open brace", + + MissingLeftExtraRight: + "Missing \\left or extra \\right", + + MissingScript: + "Missing superscript or subscript argument", + + ExtraLeftMissingRight: + "Extra \\left or missing \\right", + + Misplaced: + "Misplaced %1", + + MissingOpenForScript: + "Missing open brace for %1", + + AmbiguousUseOf: + "Ambiguous use of %1", + + EnvBadEnd: + "\\begin{%1} ended with \\end{%2}", + + EnvMissingEnd: + "Missing \\end{%1}", + + MissingBoxFor: + "Missing box for %1", + + MissingCloseBrace: + "Missing close brace", + + UndefinedControlSequence: + "Undefined control sequence %1", + + DoubleExponent: + "Double exponent: use braces to clarify", + + DoubleSubscripts: + "Double subscripts: use braces to clarify", + + DoubleExponentPrime: + "Prime causes double exponent: use braces to clarify", + + CantUseHash1: + "You can't use 'macro parameter character #' in math mode", + + MisplacedMiddle: + "%1 must be within \\left and \\right", + + MisplacedLimits: + "%1 is allowed only on operators", + + MisplacedMoveRoot: + "%1 can appear only within a root", + + MultipleCommand: + "Multiple %1", + + IntegerArg: + "The argument to %1 must be an integer", + + NotMathMLToken: + "%1 is not a token element", + + InvalidMathMLAttr: + "Invalid MathML attribute: %1", + + UnknownAttrForElement: + "%1 is not a recognized attribute for %2", + + MaxMacroSub1: + "MathJax maximum macro substitution count exceeded; " + + "is there a recursive macro call?", + + MaxMacroSub2: + "MathJax maximum substitution count exceeded; " + + "is there a recursive latex environment?", + + MissingArgFor: + "Missing argument for %1", + + ExtraAlignTab: + "Extra alignment tab in \\cases text", + + BracketMustBeDimension: + "Bracket argument to %1 must be a dimension", + + InvalidEnv: + "Invalid environment name '%1'", + + UnknownEnv: + "Unknown environment '%1'", + + ExtraClose: + "Extra close brace", + + ExtraCloseLooking: + "Extra close brace while looking for %1", + + MissingCloseBracket: + "Couldn't find closing ']' for argument to %1", + + MissingOrUnrecognizedDelim: + "Missing or unrecognized delimiter for %1", + + MissingDimOrUnits: + "Missing dimension or its units for %1", + + TokenNotFoundForCommand: + "Couldn't find %1 for %2", + + MathNotTerminated: + "Math not terminated in text box", + + IllegalMacroParam: + "Illegal macro parameter reference", + + MaxBufferSize: + "MathJax internal buffer size exceeded; is there a recursive macro call?", + + /* AMSmath */ + + CommandNotAllowedInEnv: + "%1 not allowed in %2 environment", + + MultipleLabel: + "Label '%1' mutiply defined", + + CommandAtTheBeginingOfLine: + "%1 must come at the beginning of the line", + + IllegalAlign: + "Illegal alignment specified in %1", + + BadMathStyleFor: + "Bad math style for %1", + + PositiveIntegerArg: + "Argument to %1 must me a positive integer", + + ErroneousNestingEq: + "Erroneous nesting of equation structures", + + MultlineRowsOneCol: + "multline rows must have exactly one column", + +/* bbox */ + + MultipleBBoxProperty: + "%1 specified twice in %2", + + InvalidBBoxProperty: + "'%1' doesn't look like a color, a padding dimension, or a style", + +/* begingroup */ + + ExtraEndMissingBegin: + "Extra %1 or missing \\begingroup", + + GlobalNotFollowedBy: + "%1 not followed by \\let, \\def, or \\newcommand", + +/* color */ + + UndefinedColorModel: + "Color model '%1' not defined", + + rgbArg1: + "rgb colors require 3 decimal numbers", + + InvalidDecimalNumber: + "Invalid decimal number", + + rgbArg2: + "rgb values must be between 0 and 1", + + RGBArg1: + "RGB colors require 3 numbers", + + InvalidNumber: + "Invalid number", + + RGBArg2: + "RGB values must be between 0 and 255", + + GrayScalerArg: + "Grey-scale values must be between 0 and 1", + +/* extpfeil */ + + NewextarrowArg1: + "First argument to %1 must be a control sequence name", + + NewextarrowArg2: + "Second argument to %1 must be two integers separated by a comma", + + NewextarrowArg3: + "Third argument to %1 must be a unicode character number", + +/* mhchem */ + + NoClosingChar: + "Can't find closing %1", + +/* newcommand */ + + IllegalControlSequenceName: + "Illegal control sequence name for %1", + + IllegalParamNumber: + "Illegal number of parameters specified in %1", + + DoubleBackSlash: + "\\ must be followed by a control sequence", + + CantUseHash2: + "Illegal use of # in template for %1", + + SequentialParam: + "Parameters for %1 must be numbered sequentially", + + MissingReplacementString: + "Missing replacement string for definition of %1", + + MismatchUseDef: + "Use of %1 doesn't match its definition", + + RunawayArgument: + "Argument manquant pour la commande %1?" + +/* verb */ + + NoClosingDelim: + "Can't find closing delimiter for %1", + + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/localization/en/TeX.js"); diff --git a/unpacked/localization/en/en.js b/unpacked/localization/en/en.js new file mode 100644 index 000000000..4bc1e9cdd --- /dev/null +++ b/unpacked/localization/en/en.js @@ -0,0 +1,58 @@ +MathJax.Localization.addTranslation("en",null,{ + menuTitle: "English", + isLoaded: true, + domains: { + "_": { + isLoaded: true, + strings: { + + CookieConfig: + "MathJax has found a user-configuration cookie that includes code to "+ + "be run. Do you want to run it?\n\n"+ + "(You should press Cancel unless you set up the cookie yourself.)", + + MathProcessingError: + "Math Processing Error", + + MathError: + "Math Error", + + LoadFile: "Loading %1", + + Loading: "Loading", + + LoadFailed: "File failed to load: %1", + + ProcessMath: "Processing Math: %1%%", + + Processing: "Processing", + + TypesetMath: "Typesetting Math: %1%%", + + Typesetting: "Typesetting", + + MathJaxNotSupported: + "Your browser does not support MathJax" + + } + }, + MathMenu: {}, + FontWarnings: {}, + "v1.0-warning": {}, + TeX: {}, + MathML: {}, + "HTML-CSS": {} + }, + + plural: function(n) { + if (n === 1) {return 1} // one + return 2; // other + }, + + number: function(n) { + return String(n).replace(".", ","); // replace dot by comma + } + +}); + +MathJax.Ajax.loadComplete("[MathJax]/localization/en/en.js"); diff --git a/unpacked/localization/en/v1.0-warning.js b/unpacked/localization/en/v1.0-warning.js new file mode 100644 index 000000000..e4bbed506 --- /dev/null +++ b/unpacked/localization/en/v1.0-warning.js @@ -0,0 +1,14 @@ +MathJax.Localization.addTranslation("en","v1.0-warning",{ + isLoaded: true, + strings: { + + 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 %2" + + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/localization/en/v1.0-warning.js");