Skip to content

Commit bb3ce01

Browse files
committed
lang support on place name already exists...sorry
1 parent b4f7be9 commit bb3ce01

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lxml/lxmlGramplet.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,12 @@ def ParseXML(self, tree, filename):
423423

424424
if three.tag == NAMESPACE + 'pname':
425425
text = str(three.attrib.get('value'))
426-
# GEPS045 (XML schema 1.8.0)
427-
#translation = str(three.attrib.get('lang'))
428-
#if translation == 'None':
429-
#translation = xml_lang()[0:2]
430-
#text = text + _(' - (? or %(lang)s)') % {'lang':translation}
431-
#else:
432-
#text = text + _(' - (%(lang)s)') % {'lang':translation}
426+
translation = str(three.attrib.get('lang'))
427+
if translation == 'None':
428+
translation = xml_lang()[0:2]
429+
text = text + _(' - (? or %(lang)s)') % {'lang':translation}
430+
else:
431+
text = text + _(' - (%(lang)s)') % {'lang':translation}
433432
if text not in places:
434433
places.append(text) # temp display
435434
if three.tag == NAMESPACE + 'stitle' and three.text not in sources:

0 commit comments

Comments
 (0)