Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compilemessages: Normalize language names to NFC.

Anders Kaseorg14b7d097a0e1
diff --git a/zerver/management/commands/compilemessages.py b/zerver/management/commands/compilemessages.py
index d9b09a3cc10..4f4d2122fdb 100644
--- a/zerver/management/commands/compilemessages.py
+++ b/zerver/management/commands/compilemessages.py
@@ -1,6 +1,7 @@
import json
import os
import re
+import unicodedata
from subprocess import CalledProcessError, check_output
from typing import Any, Dict, List
@@ -129,8 +130,8 @@ class Command(compilemessages.Command):
with override_language(code):
name_local = _(name)
- info["name"] = name
- info["name_local"] = name_local
+ info["name"] = unicodedata.normalize("NFC", name)
+ info["name_local"] = unicodedata.normalize("NFC", name_local)
info["code"] = code
info["locale"] = locale
info["percent_translated"] = percentage