jenkins-bot has submitted this change and it was merged.
Change subject: Normalize titles in template descriptions in context menu
......................................................................
Normalize titles in template descriptions in context menu
For {{echo}} we would show "echo", but for {{Echo}} we would
show "Echo". Same for {{cite web}} vs {{cite_web}}. Normalize
these template names before displaying them in the context menu.
Reported by Matma Rex on IRC.
Bug: 66893
Change-Id: I84945aab13e53cd0aba529c298b5cc0b2e7eff1e
---
M modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
Bartosz Dziewoński: Looks good to me, but someone else must approve
Jforrester: Looks good to me, but someone else must approve
Trevor Parscal: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
index 94f43fe..cb25f61 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
@@ -64,7 +64,12 @@
}
}
- return words.join( ', ' );
+ return words
+ .map( function ( template ) {
+ var title = mw.Title.newFromText( template );
+ return title ? title.getPrefixedText() : template;
+ } )
+ .join( ', ' );
};
/* Methods */
--
To view, visit https://gerrit.wikimedia.org/r/141082
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I84945aab13e53cd0aba529c298b5cc0b2e7eff1e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits