--- i18n helper
-function Node._i18n(self, config, section, option, title, description)
-
- -- i18n loaded?
- if type(luci.i18n) == "table" then
-
- local key = config and config:gsub("[^%w]+", "") or ""
-
- if section then key = key .. "_" .. section:lower():gsub("[^%w]+", "") end
- if option then key = key .. "_" .. tostring(option):lower():gsub("[^%w]+", "") end
-
- self.title = title or luci.i18n.translate( key, option or section or config )
- self.description = description or luci.i18n.translate( key .. "_desc", "" )
- end
+-- hook helper
+function Node._run_hook(self, hook)
+ if type(self[hook]) == "function" then
+ return self[hook](self)
+ end