jenkins-bot has submitted this change and it was merged.
Change subject: weblinkchecker uses invalid pywikibot.page.site() ......................................................................
weblinkchecker uses invalid pywikibot.page.site()
Use Page.code instead for calls to twtranslate.
Change-Id: Ib7f5e267fd69fd9da0d42a362cf725e2e72158a1 --- M scripts/weblinkchecker.py 1 file changed, 5 insertions(+), 5 deletions(-)
Approvals: Ricordisamoa: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py index d4f511b..5cc4cf8 100644 --- a/scripts/weblinkchecker.py +++ b/scripts/weblinkchecker.py @@ -521,7 +521,7 @@ ok, message = linkChecker.check() except NotAnURLError: ok = False - message = i18n.twtranslate(pywikibot.page.site(), + message = i18n.twtranslate(self.page.site, 'weblinkchecker-badurl_msg', {'URL': self.url})
@@ -715,7 +715,7 @@
if archiveURL: archiveMsg = u'\n' + \ - i18n.twtranslate(pywikibot.Site(), + i18n.twtranslate(containingPage.site, 'weblinkchecker-archive_msg', {'URL': archiveURL}) else: @@ -723,7 +723,7 @@ # The caption will default to "Dead link". But if there is # already such a caption, we'll use "Dead link 2", # "Dead link 3", etc. - caption = i18n.twtranslate(pywikibot.Site(), + caption = i18n.twtranslate(containingPage.site, 'weblinkchecker-caption') i = 1 count = u'' @@ -735,13 +735,13 @@ caption += count content += '\n\n== %s ==\n\n%s\n\n%s%s--~~~~' % \ (caption, - i18n.twtranslate(pywikibot.Site(), + i18n.twtranslate(containingPage.site, 'weblinkchecker-report'), errorReport, archiveMsg) comment = u'[[%s#%s|→]] %s' % \ (talkPage.title(), caption, - i18n.twtranslate(pywikibot.Site(), + i18n.twtranslate(containingPage.site, 'weblinkchecker-summary')) try: talkPage.put(content, comment)
pywikibot-commits@lists.wikimedia.org