Robmoen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/73116


Change subject: When normalizing category titles with mw.Title, use getMain 
method
......................................................................

When normalizing category titles with mw.Title, use getMain method

This will get the name attribute plus this extension

Bug: 50702
Change-Id: I57298ef34b413002f1506b499903b73a18969e68
---
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/16/73116/1

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
index 1eebe89..3dc6aa8 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
@@ -79,7 +79,7 @@
                for ( i = 0, len = data[1].length; i < len; i++ ) {
                        try {
                                title = new mw.Title( data[1][i] );
-                               result.push( title.getNameText() );
+                               result.push( title.getMain() );
                        } catch ( e ) { }
                        // If the received title isn't valid, just ignore it
                }
@@ -181,7 +181,7 @@
                title = new mw.Title( this.categoryPrefix + value );
                return {
                        'name': title.getPrefixedText(),
-                       'value': title.getNameText(),
+                       'value': title.getMain(),
                        'metaItem': {}
                };
        } catch ( e ) { }

-- 
To view, visit https://gerrit.wikimedia.org/r/73116
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57298ef34b413002f1506b499903b73a18969e68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to