fix is_asian_name
This commit is contained in:
parent
18176630ef
commit
7d2c17c90e
1 changed files with 3 additions and 3 deletions
|
@ -318,11 +318,11 @@ def get_sort_name(name):
|
||||||
lastname, firstname = [names[2], names[0] + '-' + names[1].lower()]
|
lastname, firstname = [names[2], names[0] + '-' + names[1].lower()]
|
||||||
elif '-' in names_[1]:
|
elif '-' in names_[1]:
|
||||||
lastname, firstname = [names[0], names[1] + '-' + names[2].lower()]
|
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]]
|
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]]
|
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]]
|
lastname, firstname = [names[0], names[1] + ' ' + names[2]]
|
||||||
else:
|
else:
|
||||||
lastname, firstname = [names[2], names[0] + ' ' + names[1]]
|
lastname, firstname = [names[2], names[0] + ' ' + names[1]]
|
||||||
|
|
Loading…
Reference in a new issue