[fix] Load namespace translations when cache is generated

This commit is contained in:
Jérôme Lebleu 2014-11-17 15:45:34 +01:00
parent d840d11427
commit c264d2448f

View file

@ -372,13 +372,11 @@ class ActionsMap(object):
except IOError: except IOError:
self.use_cache = False self.use_cache = False
actionsmaps = self.generate_cache(namespaces) actionsmaps = self.generate_cache(namespaces)
break elif n not in actionsmap:
else:
with open('%s/actionsmap/%s.yml' % (pkg.datadir, n)) as f: with open('%s/actionsmap/%s.yml' % (pkg.datadir, n)) as f:
actionsmaps[n] = ordered_yaml_load(f) actionsmaps[n] = ordered_yaml_load(f)
# Load translations # Load translations
# FIXME: Allow several namespaces in m18n
m18n.load_namespace(n) m18n.load_namespace(n)
# Generate parsers # Generate parsers