jenkins-bot has submitted this change and it was merged.

Change subject: [bugfix] use message_package_name for i18n.twhas_key() method
......................................................................


[bugfix] use message_package_name for i18n.twhas_key() method

This patch re-enables using this method through Python Shell

Change-Id: I8e766f30dac4a13b6b215ddd7dc50a95386e730d
---
M pywikibot/i18n.py
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py
index 6b0dede..50cf790 100644
--- a/pywikibot/i18n.py
+++ b/pywikibot/i18n.py
@@ -359,7 +359,8 @@
     @param parameters: For passing parameters.
     """
     package = twtitle.split("-")[0]
-    transdict = getattr(__import__(messages_package_name, fromlist=[package]), 
package).msg
+    transdict = getattr(__import__(messages_package_name, fromlist=[package]),
+                        package).msg
 
     code_needed = False
     # If a site is given instead of a code, use its language
@@ -490,7 +491,8 @@
     @param twtitle: The TranslateWiki string title, in <package>-<key> format
     """
     package = twtitle.split("-")[0]
-    transdict = getattr(__import__("i18n", fromlist=[package]), package).msg
+    transdict = getattr(__import__(messages_package_name, fromlist=[package]),
+                        package).msg
     # If a site is given instead of a code, use its language
     if hasattr(code, 'code'):
         code = code.code

-- 
To view, visit https://gerrit.wikimedia.org/r/184120
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e766f30dac4a13b6b215ddd7dc50a95386e730d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to