DLynch has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/343901 )
Change subject: Section editing: strip links from heading text used for edit
summary
......................................................................
Section editing: strip links from heading text used for edit summary
Stops us including "[edit]" in the summary when people have marked whole
headings for translation.
Bug: T160911
Change-Id: I906398e6bf45433d904795847f59b5bf0148092f
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/01/343901/1
diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index a9e718c..96502b6 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -2028,7 +2028,10 @@
headingNode = $section.data( 'view' );
if ( $section.length && new mw.Uri().query.summary ===
undefined ) {
- headingText = $section.text();
+ // We want just the top-level text within the
heading. This is
+ // mostly because of interactions when people
mark an entire
+ // heading as translatable, rather than just
its contents.
+ headingText =
$section.clone().children().remove().end().text();
}
if ( headingNode ) {
--
To view, visit https://gerrit.wikimedia.org/r/343901
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I906398e6bf45433d904795847f59b5bf0148092f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits