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.groups = boxes.generators.ui_groups
|
||||
self.groups_by_name = boxes.generators.ui_groups_by_name
|
||||
self._readEdgeDescriptions()
|
||||
|
||||
def add(self, msg, comment=None, reference=None):
|
||||
if not msg or msg in self.message_set:
|
||||
|
@ -56,6 +57,12 @@ class Boxes2pot:
|
|||
modulenames = modulename.split(".")
|
||||
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):
|
||||
for group in box.argparser._action_groups:
|
||||
if not group._group_actions:
|
||||
|
@ -79,7 +86,7 @@ class Boxes2pot:
|
|||
if isinstance(c, (float, int)):
|
||||
continue
|
||||
self.add(c, "possible choice for " + name, location)
|
||||
|
||||
|
||||
def readBoxes(self):
|
||||
for group in self.groups:
|
||||
location = "boxes/generators/__init__.py"
|
||||
|
|
Loading…
Reference in New Issue