jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
Fix template vars being passed to 'category-was-moved' template

The template itself already has the Category: prefix in it, and this
is spread across many, many different translated templates.

Change-Id: I4cb3c9ed90c5f12970d9832a2a3dea6620c360c8
---
M scripts/category.py
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/scripts/category.py b/scripts/category.py
index 17d5af7..6bb60d3 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -703,9 +703,10 @@

Do not use this function from outside the class.
"""
+ cat_name_only = self.newcat.title(withNamespace=False)
comment = i18n.twtranslate(self.site, 'category-was-moved',
- {'newcat': self.newcat.title(),
- 'title': self.newcat.title()})
+ {'newcat': cat_name_only,
+ 'title': cat_name_only})
self.oldtalk.move(self.newtalk.title(), comment)

def _update_wikibase_item(self):
@@ -719,9 +720,10 @@
except pywikibot.NoPage:
item = None
if item and item.exists():
+ cat_name_only = self.newcat.title(withNamespace=False)
comment = i18n.twtranslate(self.site, 'category-was-moved',
- {'newcat': self.newcat.title(),
- 'title': self.newcat.title()})
+ {'newcat': cat_name_only,
+ 'title': cat_name_only})
item.setSitelink(self.newcat, summary=comment)

def _hist(self):

To view, visit change 309741. To unsubscribe, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4cb3c9ed90c5f12970d9832a2a3dea6620c360c8
Gerrit-Change-Number: 309741
Gerrit-PatchSet: 1
Gerrit-Owner: Cyde <cydeweys@gmail.com>
Gerrit-Reviewer: Cyde <cydeweys@gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot <>