jenkins-bot has submitted this change and it was merged.
Change subject: [i18n] Enable twn support. ......................................................................
[i18n] Enable twn support.
Bug: T110856 Change-Id: Ie32504a8f7b2539af96e5381d07818df7aac216f --- M scripts/unusedfiles.py 1 file changed, 2 insertions(+), 12 deletions(-)
Approvals: XZise: Looks good to me, but someone else must approve Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py index 84df568..47c13da 100755 --- a/scripts/unusedfiles.py +++ b/scripts/unusedfiles.py @@ -24,15 +24,6 @@ import pywikibot from pywikibot import i18n, pagegenerators, Bot
-comment = { - 'ar': u'صور للاستبعاد', - 'en': u'images for elimination', - 'fa': u'تصویر استفاده نشده', - 'he': u'תמונות להסרה', - 'it': u'Bot: segnalo immagine orfana da eliminare', - 'pt': u'Bot: marcação de imagens para eliminação', -} - template_to_the_image = { 'it': u'{{immagine orfana}}', 'fa': u'{{تصاویر بدون استفاده}}', @@ -59,11 +50,10 @@ template_to_the_image) template_user = i18n.translate(self.site, template_to_the_user) - summary = i18n.translate(self.site, comment, fallback=True) - if not all([template_image, template_user, comment]): + self.summary = i18n.twtranslate(self.site, 'unusedfiles-comment') + if not all([template_image, template_user]): raise pywikibot.Error(u'This script is not localized for %s site.' % self.site) - self.summary = summary generator = pagegenerators.UnusedFilesGenerator(site=self.site) generator = pagegenerators.PreloadingGenerator(generator) for image in generator: