103 |
element = result |
element = result |
104 |
if info.has_key('attributes') and hasattr(element, 'attributes'): |
if info.has_key('attributes') and hasattr(element, 'attributes'): |
105 |
attrs = element.attributes.setdefault(element.ns, {}) |
attrs = element.attributes.setdefault(element.ns, {}) |
106 |
for name in info['attributes'].split(): |
for name in info['attributes'].split(';'): |
107 |
msgid = attrs[name] |
attr = name.strip().split() |
108 |
attrs[name] = context.translate(domain, msgid, None, request, target, msgid) |
if len(attr) == 1: |
109 |
|
msgid = attrs[name] |
110 |
|
elif len(attr) == 2: |
111 |
|
name, msgid = attr |
112 |
|
else: # old-style |
113 |
|
for name in attr: |
114 |
|
msgid = attrs[name] |
115 |
|
attrs[name] = context.translate(domain, msgid, None, request, target, msgid) |
116 |
|
msgid = name = None |
117 |
|
if msgid is not None: |
118 |
|
attrs[name] = context.translate(domain, msgid, None, request, target, msgid) |
119 |
if info.has_key('name'): |
if info.has_key('name'): |
120 |
name = info['name'] |
name = info['name'] |
121 |
element = context.tr_engine.postprocess(element, context) |
element = context.tr_engine.postprocess(element, context) |