Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/239397
Change subject: Fixed tracking category incomplete commit ...................................................................... Fixed tracking category incomplete commit Change-Id: I3f57237239eafb750634c2978ba432284f5af750 --- M Graph.body.php M extension.json M i18n/en.json M i18n/qqq.json 4 files changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph refs/changes/97/239397/1 diff --git a/Graph.body.php b/Graph.body.php index 0dcf073..f7a9bdd 100644 --- a/Graph.body.php +++ b/Graph.body.php @@ -26,7 +26,8 @@ } public static function onParserAfterParse( Parser $parser ) { - self::finalizeParserOutput( $parser->getOutput(), $parser->getOptions()->getIsPreview() ); + self::finalizeParserOutput( $parser->getOutput(), $parser->getTitle(), + $parser->getOptions()->getIsPreview() ); return true; } @@ -45,9 +46,9 @@ $parser->getOutput(), $parser->getOptions()->getIsPreview() ); } - public static function finalizeParserOutput( ParserOutput $output, $isPreview ) { + public static function finalizeParserOutput( ParserOutput $output, $title, $isPreview ) { if ( $output->getExtensionData( 'graph_specs_broken' ) ) { - $output->addTrackingCategory( 'graph-broken-category' ); + $output->addTrackingCategory( 'graph-broken-category', $title ); } $specs = $output->getExtensionData( 'graph_specs' ); if ( $specs !== null ) { @@ -63,7 +64,7 @@ } $output->setProperty( 'graph_specs', FormatJson::encode( $specs, false, FormatJson::ALL_OK ) ); - $output->addTrackingCategory( 'graph-tracking-category' ); + $output->addTrackingCategory( 'graph-tracking-category', $title ); } } @@ -168,6 +169,6 @@ $output->setText( $html ); // Since we invoke parser manually, the ParserAfterParse never gets called, do it manually - Singleton::finalizeParserOutput( $output, $options->getIsPreview() ); + Singleton::finalizeParserOutput( $output, $title, $options->getIsPreview() ); } } diff --git a/extension.json b/extension.json index f647fc1..d2621b9 100644 --- a/extension.json +++ b/extension.json @@ -79,5 +79,9 @@ "GraphImgServiceAlways": false, "GraphImgServiceUrl": false }, + "TrackingCategories": [ + "graph-tracking-category", + "graph-broken-category" + ], "manifest_version": 1 } diff --git a/i18n/en.json b/i18n/en.json index e2417c8..6e9935e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -7,8 +7,8 @@ ] }, "graph-desc": "Allows <graph> tags or entire pages to become [http://trifacta.github.io/vega/ Vega]-based graphs", - "graph-category": "Pages with graphs", - "graph-category-desc": "The page includes a <code><nowiki><graph></nowiki></code> tag.", + "graph-tracking-category": "Pages with graphs", + "graph-tracking-category-desc": "The page includes a <code><nowiki><graph></nowiki></code> tag.", "graph-broken-category": "Pages with broken graphs", "graph-broken-category-desc": "The page includes a <code><nowiki><graph></nowiki></code> tag with invalid usage.", "graph-ve-dialog-edit-apply": "Apply", diff --git a/i18n/qqq.json b/i18n/qqq.json index 9a83098..f2422db 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -8,8 +8,8 @@ ] }, "graph-desc": "{{desc|name=Graph|url=https://www.mediawiki.org/wiki/Extension:Graph}}", - "graph-category": "Name of the tracking category", - "graph-category-desc": "Description on [[Special:TrackingCategories]] for the {{msg-mw|graph-category}} tracking category.", + "graph-tracking-category": "Name of the tracking category", + "graph-tracking-category-desc": "Description on [[Special:TrackingCategories]] for the {{msg-mw|graph-tracking-category}} tracking category.", "graph-broken-category": "Name of the tracking category", "graph-broken-category-desc": "Description on [[Special:TrackingCategories]] for the {{msg-mw|graph-broken-category}} tracking category.", "graph-ve-dialog-edit-apply": "Label for the apply button in the graph editing dialog\n{{Identical|Apply}}", -- To view, visit https://gerrit.wikimedia.org/r/239397 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f57237239eafb750634c2978ba432284f5af750 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Graph Gerrit-Branch: master Gerrit-Owner: Yurik <yu...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits