Module: check_mk
Branch: master
Commit: 2d5534d618529dfaa6b5f630f4a1e73af74cf3bb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2d5534d618529d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 27 09:33:56 2014 +0100
Fixed localization of visual type strings
---
web/htdocs/visuals.py | 51 +++++++++++++++++++++++++------------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index f81a77d..fbcc746 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -30,27 +30,6 @@ from lib import *
from valuespec import *
import config, table
-visual_types = {
- 'views': {
- 'show_url' : 'view.py',
- 'ident_attr' : 'view_name',
- 'title' : _("view"),
- 'plural_title' : _("views"),
- 'module_name' : 'views',
- 'multicontext_links' : False,
- },
- 'dashboards': {
- 'show_url' : 'dashboard.py',
- 'ident_attr' : 'name',
- 'title' : _("dashboard"),
- 'plural_title' : _("dashboards"),
- 'module_name' : 'dashboard',
- 'popup_add_handler' : 'popup_list_dashboards',
- 'add_visual_handler' : 'popup_add_dashlet',
- 'multicontext_links' : False,
- },
-}
-
# .--Plugins-------------------------------------------------------------.
# | ____ _ _ |
# | | _ \| |_ _ __ _(_)_ __ ___ |
@@ -69,10 +48,32 @@ def load_plugins():
if loaded_with_language == current_language:
return
- global title_functions ; title_functions = []
- global infos ; infos = {}
- global multisite_filters ; multisite_filters = {}
- global ubiquitary_filters ; ubiquitary_filters = [] # Always show this
filters
+ global visual_types
+ visual_types = {
+ 'views': {
+ 'show_url' : 'view.py',
+ 'ident_attr' : 'view_name',
+ 'title' : _("view"),
+ 'plural_title' : _("views"),
+ 'module_name' : 'views',
+ 'multicontext_links' : False,
+ },
+ 'dashboards': {
+ 'show_url' : 'dashboard.py',
+ 'ident_attr' : 'name',
+ 'title' : _("dashboard"),
+ 'plural_title' : _("dashboards"),
+ 'module_name' : 'dashboard',
+ 'popup_add_handler' : 'popup_list_dashboards',
+ 'add_visual_handler' : 'popup_add_dashlet',
+ 'multicontext_links' : False,
+ },
+ }
+
+ global title_functions ; title_functions = []
+ global infos ; infos = {}
+ global multisite_filters ; multisite_filters = {}
+ global ubiquitary_filters ; ubiquitary_filters = [] # Always show these filters
load_web_plugins('visuals', globals())
loaded_with_language = current_language