Handle link elements with reporter labels
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 5 Nov 2008 05:36:03 +0000 (05:36 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 5 Nov 2008 05:36:03 +0000 (05:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11065 dcc99617-32d9-48b4-a31d-7c20da2025e4

build/i18n/scripts/fieldmapper.py

index e198c0a..e626d93 100755 (executable)
@@ -99,7 +99,7 @@ class IDLHandler(xml.sax.handler.ContentHandler):
     def startElement(self, name, attributes):
         """
         Return the reporter:label or name attribute value for each class
-        or field element.
+        field, or link element.
         """
         entity = None
         lineno = self.locator.getLineNumber()
@@ -111,6 +111,9 @@ class IDLHandler(xml.sax.handler.ContentHandler):
             elif name == 'field':
                 entity = "%s.%s.%s.label" % (name, self.classid, \
                     attributes['name'])
+            elif name == 'link':
+                entity = "%s.%s.%s.label" % (name, self.classid, \
+                    attributes['field'])
             label = attributes['reporter:label']
             if not self.entities.has_key(label):
                 self.entities[label] = [(str(entity), lineno)]