Make the formatter function series_sort() respect the book's language.

This commit is contained in:
Charles Haley 2023-04-06 16:25:29 +01:00
parent 5a20841bcb
commit 1495c4e185

View File

@ -1389,7 +1389,9 @@ class BuiltinSeriesSort(BuiltinFormatterFunction):
def evaluate(self, formatter, kwargs, mi, locals):
if mi.series:
return title_sort(mi.series)
langs = mi.languages
lang = langs[0] if len(langs) > 0 else None
return title_sort(mi.series, lang=lang)
return ''