Skip to content

Commit

Permalink
Merge pull request #43 from plone/fix-listAvailableLanguageInformation
Browse files Browse the repository at this point in the history
Fix listAvailableLanguageInformation
  • Loading branch information
gforcada authored Nov 30, 2022
2 parents 0dc73e9 + 973cf1a commit de6e694
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions news/40.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed error in listAvailableLanguageInformation
5 changes: 1 addition & 4 deletions plone/i18n/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ def listAvailableLanguageInformation(self):
# flatten outer dict to list to make it sortable
new_langs.append(langs[lang])
new_langs.sort(
lambda x, y: cmp(
x.get("native", x.get("name")),
y.get("native", y.get("name")),
)
key=lambda x: x.get("native", x.get("name")),
)
return new_langs

Expand Down

0 comments on commit de6e694

Please sign in to comment.