diff --git a/apps/common/template/email_template_en.html b/apps/common/template/email_template_en.html
new file mode 100644
index 000000000..c0fe75e72
--- /dev/null
+++ b/apps/common/template/email_template_en.html
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ Intelligent Knowledge Q&A System
+
+ |
+
+
+
+
+
+
+
+
+ Dear user:
+
+
+
+
+ ${code} This is your dynamic verification code. Please fill it in within 30 minutes. To protect the security of your account, please do not provide this verification code to anyone.
+
+
+
+
+
+ Intelligent knowledge base project team
+
+
+ Please do not reply to this system email
+
+
+
+
+
+ |
+
+
+
+
+
+
diff --git a/apps/common/template/email_template.html b/apps/common/template/email_template_zh.html
similarity index 98%
rename from apps/common/template/email_template.html
rename to apps/common/template/email_template_zh.html
index dff0ab305..29c1fc65d 100644
--- a/apps/common/template/email_template.html
+++ b/apps/common/template/email_template_zh.html
@@ -107,7 +107,6 @@
此为系统邮件,请勿回复
- Please do not reply to this system email
diff --git a/apps/common/template/email_template_zh_Hant.html b/apps/common/template/email_template_zh_Hant.html
new file mode 100644
index 000000000..d54d40231
--- /dev/null
+++ b/apps/common/template/email_template_zh_Hant.html
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+ 智慧知識庫問答系統
+
+ |
+
+
+
+
+
+
+
+
+ 尊敬的用戶:
+
+
+
+
+ ${code} 為您的動態驗證碼,請於30分鐘內填寫,為保障帳戶安全,請勿向任何人提供此驗證碼。
+
+
+
+
+
+ 智慧知識庫專案組
+
+
+ 此為系統郵件,請勿回覆
+
+
+
+
+
+ |
+
+
+
+
+
+
diff --git a/apps/dataset/serializers/document_serializers.py b/apps/dataset/serializers/document_serializers.py
index c8c616df3..b711182bc 100644
--- a/apps/dataset/serializers/document_serializers.py
+++ b/apps/dataset/serializers/document_serializers.py
@@ -249,7 +249,7 @@ class DocumentSerializers(ApiMixin, serializers.Serializer):
return HttpResponse(content, status=200, headers={'Content-Type': 'text/cxv',
'Content-Disposition': 'attachment; filename="csv_template.csv"'})
elif self.data.get('type') == 'excel':
- file = open(os.path.join(PROJECT_DIR, "apps", "dataset", 'template', f'csv_template_{to_locale(language)}.xlsx'), "rb")
+ file = open(os.path.join(PROJECT_DIR, "apps", "dataset", 'template', f'excel_template_{to_locale(language)}.xlsx'), "rb")
content = file.read()
file.close()
return HttpResponse(content, status=200, headers={'Content-Type': 'application/vnd.ms-excel',
diff --git a/apps/locales/en_US/LC_MESSAGES/django.po b/apps/locales/en_US/LC_MESSAGES/django.po
index b52a6f1b7..9d06f91b8 100644
--- a/apps/locales/en_US/LC_MESSAGES/django.po
+++ b/apps/locales/en_US/LC_MESSAGES/django.po
@@ -4981,7 +4981,7 @@ msgstr ""
#: .\apps\setting\models_provider\impl\volcanic_engine_model_provider\volcanic_engine_model_provider.py:115
msgid "volcano engine"
-msgstr "Volcano Engine"
+msgstr "Volcengine"
#: .\apps\setting\models_provider\impl\wenxin_model_provider\credential\llm.py:50
#, python-brace-format
diff --git a/apps/locales/zh_CN/LC_MESSAGES/django.po b/apps/locales/zh_CN/LC_MESSAGES/django.po
index 37390a150..8f0db08cf 100644
--- a/apps/locales/zh_CN/LC_MESSAGES/django.po
+++ b/apps/locales/zh_CN/LC_MESSAGES/django.po
@@ -3698,7 +3698,7 @@ msgstr "语音合成"
#: .\apps\setting\models_provider\base_model_provider.py:156
msgid "Vision Model"
-msgstr "图片理解"
+msgstr "视觉模型"
#: .\apps\setting\models_provider\base_model_provider.py:157
msgid "Image Generation"
diff --git a/apps/users/serializers/user_serializers.py b/apps/users/serializers/user_serializers.py
index 401fd165f..6bea8c1c4 100644
--- a/apps/users/serializers/user_serializers.py
+++ b/apps/users/serializers/user_serializers.py
@@ -39,8 +39,8 @@ from function_lib.models.function import FunctionLib
from setting.models import Team, SystemSetting, SettingType, Model, TeamMember, TeamMemberPermission
from smartdoc.conf import PROJECT_DIR
from users.models.user import User, password_encrypt, get_user_dynamics_permission
-from django.utils.translation import gettext_lazy as _
-
+from django.utils.translation import gettext_lazy as _, gettext, to_locale
+from django.utils.translation import get_language
user_cache = cache.caches['user_cache']
@@ -393,8 +393,10 @@ class SendEmailSerializer(ApiMixin, serializers.Serializer):
code = "".join(list(map(lambda i: random.choice(['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'
]), range(6))))
# 获取邮件模板
- file = open(os.path.join(PROJECT_DIR, "apps", "common", 'template', 'email_template.html'), "r",
- encoding='utf-8')
+ language = get_language()
+ file = open(
+ os.path.join(PROJECT_DIR, "apps", "common", 'template', f'email_template{to_locale(language)}.html'), "r",
+ encoding='utf-8')
content = file.read()
file.close()
code_cache_key = email + ":" + state