fix is_asian_name

This commit is contained in:
rlx 2017-08-02 19:52:06 +02:00
parent 18176630ef
commit 7d2c17c90e

View file

@ -318,11 +318,11 @@ def get_sort_name(name):
lastname, firstname = [names[2], names[0] + '-' + names[1].lower()]
elif '-' in names_[1]:
lastname, firstname = [names[0], names[1] + '-' + names[2].lower()]
elif names[0] in ASIAN_FIRST_NAMES and names[2] not in ASIAN_FIRST_NAMES:
elif names[0].lower() in ASIAN_FIRST_NAMES and names[2].lower() not in ASIAN_FIRST_NAMES:
lastname, firstname = [names[2], names[0] + ' ' + names[1]]
elif names[0] not in ASIAN_FIRST_NAMES and names[2] in ASIAN_FIRST_NAMES:
elif names[0].lower() not in ASIAN_FIRST_NAMES and names[2].lower() in ASIAN_FIRST_NAMES:
lastname, firstname = [names[0], names[1] + ' ' + names[2]]
elif names[0] in ASIAN_LAST_NAMES:
elif names[0].lower() in ASIAN_LAST_NAMES:
lastname, firstname = [names[0], names[1] + ' ' + names[2]]
else:
lastname, firstname = [names[2], names[0] + ' ' + names[1]]