Index: translate/storage/xliff.py
===================================================================
--- translate/storage/xliff.py (revision 7897)
+++ translate/storage/xliff.py (working copy)
@@ -283,6 +283,17 @@
groups.append(pairs) #not extend
return groups
+ def delcontextgroup(self, name):
+ """Removes all the context groups with the specified name"""
+ #XXX: I really not sure about this behavior, maybe we should remove
+ # only the first group with the given name
+ grouptags = self.xmlelement.findall(
+ ".//%s" % self.namespaced("context-group"))
+ for group in grouptags:
+ if group.get("name") == name:
+ self.xmlelement.remove(group)
+ # break
+
def getrestype(self):
"""returns the restype attribute in the trans-unit tag"""
return self.xmlelement.get("restype")