Chico Venancio has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/390777 )
Change subject: [bugfix] keeping categories from non-english sites
......................................................................
[bugfix] keeping categories from non-english sites
Adds the site for the text on the call to textlib.getCategoryLinks
to keep categories already in the page when using CategoryAddBot
Bug: T180289
Change-Id: I361a17a82931b09a7a8659d02b9a5eea21802c46
---
M scripts/category.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/77/390777/1
diff --git a/scripts/category.py b/scripts/category.py
index c244114..c104667 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -362,7 +362,7 @@
return
# store old text, so we don't have reload it every time
old_text = text
- cats = textlib.getCategoryLinks(text)
+ cats = textlib.getCategoryLinks(text, current_page.site)
pywikibot.output(u"Current categories:")
for cat in cats:
pywikibot.output(u"* %s" % cat.title())
--
To view, visit https://gerrit.wikimedia.org/r/390777
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I361a17a82931b09a7a8659d02b9a5eea21802c46
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Chico Venancio <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits