Multichill has uploaded a new change for review.
https://gerrit.wikimedia.org/r/89046
Change subject: Fix normalization of template name in harvest_template
......................................................................
Fix normalization of template name in harvest_template
bug: 55122
Change-Id: Ie5969c5ac07c0a0f2b8a104f16513e24f0aa796a
---
M scripts/harvest_template.py
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/46/89046/1
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 4ccd825..950fec1 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -108,8 +108,7 @@
templates = pywikibot.extract_templates_and_params(pagetext)
for (template, fielddict) in templates:
# Clean up the template
- template = template.replace(u'_', u' ')
- template = template[0].upper() + template[1:]
+ template = pywikibot.Page(page.site, template,
ns=10).title(withNamespace=False)
# We found the template we were looking for
if template in self.templateTitles:
--
To view, visit https://gerrit.wikimedia.org/r/89046
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5969c5ac07c0a0f2b8a104f16513e24f0aa796a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Multichill <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits