Rework XML parser: part 1
This is the first step of the parser refactoring: here we change the configuration, next step will change data saving.
This commit is contained in:
parent
92530ef1b2
commit
c560e13f24
18 changed files with 370 additions and 122 deletions
|
|
@ -19,7 +19,7 @@ LANG = ["ar", "zh", "cz", "en", "fr", "gr", "it",
|
|||
URL = "http://api.wordreference.com/0.8/%s/json/%%s%%s/%%s"
|
||||
|
||||
def load(context):
|
||||
if not context.config or not context.config.hasAttribute("wrapikey"):
|
||||
if not context.config or "wrapikey" not in context.config:
|
||||
raise ImportError("You need a WordReference API key in order to use "
|
||||
"this module. Add it to the module configuration "
|
||||
"file:\n<module name=\"translate\" wrapikey=\"XXXXX\""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue