Mercurial > libervia-web
diff browser_side/menu.py @ 377:603fa314880e
browser side: fixed bad variable reference in menus management
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 25 Feb 2014 09:42:52 +0100 |
parents | 30d03d9f07e4 |
children | 933bce4cb816 |
line wrap: on
line diff
--- a/browser_side/menu.py Tue Feb 25 02:13:53 2014 +0100 +++ b/browser_side/menu.py Tue Feb 25 09:42:52 2014 +0100 @@ -179,12 +179,16 @@ if not path: print "WARNING: skipping menu without path" continue + if len(path) != len(path_i18n): + print "ERROR: inconsistency between menu paths" + continue menu_name = path[0] menu_name_i18n = path_i18n[0] - item_name_i18n = ' | '.join(path_i18n[1:]) + item_name = path[1:] if not item_name: print "WARNING: skipping menu with a path of lenght 1 [%s]" % path[0] continue + item_name_i18n = ' | '.join(path_i18n[1:]) addMenu(menu_name, menu_name_i18n, item_name_i18n, 'plugins', PluginMenuCmd(self.host, action_id)) menus_order.append(None) # we add separator