Add edge descriptions to pot file (translation catalog)
This commit is contained in:
parent
9b890f48bf
commit
18a1766f8c
|
@ -45,6 +45,7 @@ class Boxes2pot:
|
||||||
self.boxes = {b.__name__ : b() for b in boxes.generators.getAllBoxGenerators().values() if b.webinterface}
|
self.boxes = {b.__name__ : b() for b in boxes.generators.getAllBoxGenerators().values() if b.webinterface}
|
||||||
self.groups = boxes.generators.ui_groups
|
self.groups = boxes.generators.ui_groups
|
||||||
self.groups_by_name = boxes.generators.ui_groups_by_name
|
self.groups_by_name = boxes.generators.ui_groups_by_name
|
||||||
|
self._readEdgeDescriptions()
|
||||||
|
|
||||||
def add(self, msg, comment=None, reference=None):
|
def add(self, msg, comment=None, reference=None):
|
||||||
if not msg or msg in self.message_set:
|
if not msg or msg in self.message_set:
|
||||||
|
@ -56,6 +57,12 @@ class Boxes2pot:
|
||||||
modulenames = modulename.split(".")
|
modulenames = modulename.split(".")
|
||||||
return "/".join(modulenames) + ".py"
|
return "/".join(modulenames) + ".py"
|
||||||
|
|
||||||
|
def _readEdgeDescriptions(self):
|
||||||
|
for char, descr in edges.getDescriptions().items():
|
||||||
|
self.add(descr, f"{char} edge description", "boxes/edges.py")
|
||||||
|
self.add(f"{char} {descr}", f"{char} edge description",
|
||||||
|
"boxes/edges.py")
|
||||||
|
|
||||||
def addBoxParams(self, name, box, location=None):
|
def addBoxParams(self, name, box, location=None):
|
||||||
for group in box.argparser._action_groups:
|
for group in box.argparser._action_groups:
|
||||||
if not group._group_actions:
|
if not group._group_actions:
|
||||||
|
|
Loading…
Reference in New Issue