jenkins-bot has submitted this change and it was merged.
Change subject: i18n: Allow empty translations ......................................................................
i18n: Allow empty translations
Check for 'trans is None' (= no translation found) instead of for 'not trans' (= no translation found, or empty translation)
Can be relevant for empty configuration variables.
Change-Id: Icf8ca6a76d1fdcbe7be3a4ac276a5e9d0688108b --- M pywikibot/i18n.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py index 8e818eb..ac2c0f6 100644 --- a/pywikibot/i18n.py +++ b/pywikibot/i18n.py @@ -362,7 +362,7 @@ break except KeyError: continue - if not trans: + if trans is None: raise TranslationError("No English translation has been defined " "for TranslateWiki key %r" % twtitle) # send the language code back via the given list