mirror of
https://github.com/blender/blender
synced 2026-09-27 19:44:35 +03:00
Credits Script: Improve author name collation by folding their case
Some author names are written in lower case, which by default places them after title case ones. This commit uses `str.casefold()` to ignore case during sorting. Ref !160527
This commit is contained in:
parent
9ddb532e51
commit
5c45585ae0
1 changed files with 2 additions and 2 deletions
|
|
@ -223,12 +223,12 @@ class Credits:
|
|||
if sort == "commit":
|
||||
sorted_authors = dict(sorted(
|
||||
self.users.items(),
|
||||
key=lambda item: (item[1].commit_total, normalize('NFD', item[0])),
|
||||
key=lambda item: (item[1].commit_total, normalize('NFD', item[0]).casefold()),
|
||||
))
|
||||
else:
|
||||
sorted_authors = dict(sorted(
|
||||
self.users.items(),
|
||||
key=lambda item: (normalize('NFD', item[0]), item[1].commit_total),
|
||||
key=lambda item: (normalize('NFD', item[0]).casefold(), item[1].commit_total),
|
||||
))
|
||||
|
||||
fh.write("<h3>Individual Contributors</h3>\n\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue