New global function: add_hook: add a hook in the current context directly associated to the current module
This commit is contained in:
parent
1b5b5af60b
commit
bbfd34fe7b
6 changed files with 28 additions and 27 deletions
|
|
@ -15,10 +15,10 @@ LANG = ["ar", "zh", "cz", "en", "fr", "gr", "it",
|
|||
|
||||
def load(context):
|
||||
from hooks import Hook
|
||||
context.hooks.add_hook("cmd_hook", Hook(cmd_translate, "translate"))
|
||||
context.hooks.add_hook("cmd_hook", Hook(cmd_translate, "traduction"))
|
||||
context.hooks.add_hook("cmd_hook", Hook(cmd_translate, "traduit"))
|
||||
context.hooks.add_hook("cmd_hook", Hook(cmd_translate, "traduire"))
|
||||
add_hook("cmd_hook", Hook(cmd_translate, "translate"))
|
||||
add_hook("cmd_hook", Hook(cmd_translate, "traduction"))
|
||||
add_hook("cmd_hook", Hook(cmd_translate, "traduit"))
|
||||
add_hook("cmd_hook", Hook(cmd_translate, "traduire"))
|
||||
|
||||
|
||||
def cmd_translate(msg):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue