Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compilemessages: Sort language list with Unicode Collation Algorithm.
Anders Kaseorgefa8dd3a4726
diff --git a/requirements/common.in b/requirements/common.inindex 47ebe5a4ecc..b845bdc585f 100644--- a/requirements/common.in+++ b/requirements/common.in@@ -189,3 +189,6 @@ sentry-sdk# For detecting URLs to linktlds++# Unicode Collation Algorithm for sorting multilingual strings+pyucadiff --git a/requirements/dev.txt b/requirements/dev.txtindex 72e6bb361db..70fa2bcd344 100644--- a/requirements/dev.txt+++ b/requirements/dev.txt@@ -947,6 +947,10 @@ pytz==2020.1 \--hash=sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed \--hash=sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048 \# via -r requirements/common.in, babel, django, moto, twilio+pyuca==1.2 \+ --hash=sha256:8a382fe74627f08c0d18908c0713ca4a20aad5385f077579e56208beea2893b2 \+ --hash=sha256:abaa12e1bd2c7c68ca8396ff8383bc0654a739cef3ae68fd7af58bf29af0a91e \+ # via -r requirements/common.inpywatchman==1.4.1 \--hash=sha256:d0047eb275deafb0011eda0a1a815fbd9742478c3d2b5ad6956d300e447dc2f9 \# via pyre-checkdiff --git a/requirements/prod.txt b/requirements/prod.txtindex 305eb967874..d9e8ab4af9a 100644--- a/requirements/prod.txt+++ b/requirements/prod.txt@@ -669,6 +669,10 @@ pytz==2020.1 \--hash=sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed \--hash=sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048 \# via -r requirements/common.in, babel, django, twilio+pyuca==1.2 \+ --hash=sha256:8a382fe74627f08c0d18908c0713ca4a20aad5385f077579e56208beea2893b2 \+ --hash=sha256:abaa12e1bd2c7c68ca8396ff8383bc0654a739cef3ae68fd7af58bf29af0a91e \+ # via -r requirements/common.inpyyaml==5.3.1 \--hash=sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97 \--hash=sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76 \diff --git a/version.py b/version.pyindex cdefdc15b25..383b93cc7f4 100644--- a/version.py+++ b/version.py@@ -44,4 +44,4 @@ API_FEATURE_LEVEL = 34# historical commits sharing the same major version, in which case a# minor version bump suffices.-PROVISION_VERSION = '112.2'+PROVISION_VERSION = '113.0'diff --git a/zerver/management/commands/compilemessages.py b/zerver/management/commands/compilemessages.pyindex 39ec6c78aab..f12fc0be25f 100644--- a/zerver/management/commands/compilemessages.py+++ b/zerver/management/commands/compilemessages.py@@ -13,6 +13,7 @@ from django.core.management.commands import compilemessagesfrom django.utils.translation import override as override_languagefrom django.utils.translation import ugettext as _from django.utils.translation.trans_real import to_language+from pyuca import Collatorclass Command(compilemessages.Command):@@ -45,7 +46,8 @@ class Command(compilemessages.Command):del lang_info['name_local']lang_list.append(lang_info)- lang_list.sort(key=lambda lang: lang['name'])+ collator = Collator()+ lang_list.sort(key=lambda lang: collator.sort_key(lang['name']))with open(output_path, 'wb') as output_file:output_file.write(