jenkins-bot has submitted this change and it was merged.
Change subject: (bugfix) "manual" is not a dict and can't be used for
translation
......................................................................
(bugfix) "manual" is not a dict and can't be used for translation
on the other hand we have these translations on mediawiki and the
L10N_msg is obsolete. Update this part from compat.
Change-Id: I9e0903f5a93dd4cd5da342a591c68c59267ffef7
---
M scripts/reflinks.py
1 file changed, 8 insertions(+), 15 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 4ec04a1..cf88bc8 100644
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -60,14 +60,10 @@
'¶ms;': pagegenerators.parameterHelp
}
-localized_msg = ('fr', ) # localized message at mediawik
+localized_msg = ('fr', 'it', 'pl') # localized message at
mediawiki
# localized message at specific wikipedia site
# should be moved to mediawiki pywikibot manual
-L10N_msg = {
- 'it': u'Utente:Marco27Bot/refLinks.py',
- 'pl': u'Wikipedysta:MastiBot/refLinks',
-}
stopPage = {
@@ -404,16 +400,13 @@
self.site = pywikibot.Site()
# Check
manual = 'mw:Manual:Pywikibot/refLinks'
- if self.site.family.name == 'wikipedia':
- manual = pywikibot.translate(self.site.code, manual)
- else:
- code = None
- for alt in [self.site.code] + i18n._altlang(self.site.code):
- if alt in localized_msg:
- code = alt
- break
- if code:
- manual += '/%s' % code
+ code = None
+ for alt in [self.site.code] + i18n._altlang(self.site.code):
+ if alt in localized_msg:
+ code = alt
+ break
+ if code:
+ manual += '/%s' % code
self.msg = i18n.twtranslate(self.site, 'reflinks-msg', locals())
self.stopPage = pywikibot.Page(self.site,
pywikibot.translate(self.site, stopPage))
--
To view, visit
https://gerrit.wikimedia.org/r/133678
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9e0903f5a93dd4cd5da342a591c68c59267ffef7
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>