mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-23 23:25:02 +00:00
Merge "Add tracking category for pages that use a deprecated LaTeX syntax"
This commit is contained in:
commit
b9dcb9525e
|
@ -85,6 +85,8 @@
|
|||
"math-tracking-category-error-desc": "Pages in this category have errors in the usage of math tags.",
|
||||
"math-tracking-category-mhchem-deprecation": "Pages that use a deprecated format of the chem tags",
|
||||
"math-tracking-category-mhchem-deprecation-desc": "Pages in this category use a deprecated format of the chem tags",
|
||||
"math-tracking-category-texvc-deprecation": "Pages that use a deprecated format of the math tags",
|
||||
"math-tracking-category-texvc-deprecation-desc": "Pages in this category use a deprecated format of the math tags",
|
||||
"math-tracking-category-render-error": "Pages with math render errors",
|
||||
"math-tracking-category-render-error-desc": "Pages in this category have rendering errors in the math tags.",
|
||||
"math_unknown_error": "unknown error",
|
||||
|
|
|
@ -85,6 +85,8 @@
|
|||
"math-tracking-category-error-desc": "Tracking category description.",
|
||||
"math-tracking-category-mhchem-deprecation": "Tracking category name.",
|
||||
"math-tracking-category-mhchem-deprecation-desc": "Tracking category description.",
|
||||
"math-tracking-category-texvc-deprecation": "Tracking category name.",
|
||||
"math-tracking-category-texvc-deprecation-desc": "Tracking category description.",
|
||||
"math-tracking-category-render-error": "Tracking category name.",
|
||||
"math-tracking-category-render-error-desc": "Tracking category description.",
|
||||
"math_unknown_error": "Used as error message for unknown texvc error.\n\nThis message follows the message {{msg-mw|Math failure}}.\n{{Identical|Unknown error}}",
|
||||
|
|
|
@ -66,8 +66,14 @@ class MathMathML extends MathRenderer {
|
|||
parent::addTrackingCategories( $parser );
|
||||
if ( $this->hasWarnings() ) {
|
||||
foreach ( $this->warnings as $warning ) {
|
||||
if ( isset( $warning->type ) && $warning->type === 'mhchem-deprecation' ) {
|
||||
$parser->addTrackingCategory( 'math-tracking-category-mhchem-deprecation' );
|
||||
if ( isset( $warning->type ) ) {
|
||||
switch ( $warning->type ) {
|
||||
case 'mhchem-deprecation':
|
||||
$parser->addTrackingCategory( 'math-tracking-category-mhchem-deprecation' );
|
||||
break;
|
||||
case 'texvc-deprecation':
|
||||
$parser->addTrackingCategory( 'math-tracking-category-texvc-deprecation' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue