Fix PR #225 when translate language is not en...

... and there are no correct locales in the artist sort-name node.
This commit is contained in:
Sophist
2014-03-21 07:38:57 +00:00
parent 356909c062
commit 754b75f0dd

View File

@@ -129,7 +129,7 @@ def _translate_artist_node(node):
transl, translsort = alias.text, alias.attribs["sort_name"]
if alias.attribs.get("primary") == "primary":
found_primary = True
if lang == "en" and not transl:
if not transl:
translsort = node.sort_name[0].text
transl = translate_from_sortname(node.name[0].text, translsort)
else: