diff --git a/apps/authentication/templates/authentication/login.html b/apps/authentication/templates/authentication/login.html
index 4d7489034..e1fe3c393 100644
--- a/apps/authentication/templates/authentication/login.html
+++ b/apps/authentication/templates/authentication/login.html
@@ -297,8 +297,7 @@
-
-
+
{{ current_lang.title }}
@@ -378,8 +377,8 @@
diff --git a/apps/i18n/core/zh/LC_MESSAGES/django.mo b/apps/i18n/core/zh/LC_MESSAGES/django.mo
index 473fc70af..86489391b 100644
--- a/apps/i18n/core/zh/LC_MESSAGES/django.mo
+++ b/apps/i18n/core/zh/LC_MESSAGES/django.mo
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:da9be1aa1bc652c62b69c5a0feecd6d6b698d96a896af19843e623943622f9e7
-size 139087
+oid sha256:b431db400fb354892d5f52df1aa95d71f4646567b8f3421b6f254dd431cca5ae
+size 139088
diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json
index 273cb4036..a9a9563d1 100644
--- a/apps/i18n/lina/en.json
+++ b/apps/i18n/lina/en.json
@@ -1040,8 +1040,8 @@
"StrategyHelpTips": "Identify the unique attributes of assets (such as platforms) based on priority of strategies; when an asset's attribute (like nodes) can be configured to multiple, all Actions of the strategies will be executed.",
"StrategyList": "Policy List",
"StrategyUpdate": "Update the Policy",
- "SuEnabled": "Enable switch",
- "SuFrom": "Switch From",
+ "SuEnabled": "Enable SU",
+ "SuFrom": "SU From",
"Submit": "Submit",
"Success": "Success",
"SuccessAsset": "Successful Assets",
@@ -1197,7 +1197,7 @@
"UserProfile": "Profile",
"UserSession": "Asset Sessions",
"UserSetting": "Preference",
- "UserSwitchFrom": "Switch from",
+ "UserSwitchFrom": "SU from",
"UserUpdate": "Update the User",
"Username": "Username",
"UsernamePlaceholder": "Please Enter Username",
diff --git a/apps/jumpserver/views/other.py b/apps/jumpserver/views/other.py
index 6a05acaa5..6ff280d57 100644
--- a/apps/jumpserver/views/other.py
+++ b/apps/jumpserver/views/other.py
@@ -6,6 +6,7 @@ from django.conf import settings
from django.http import HttpResponse
from django.http import HttpResponseRedirect, JsonResponse, Http404
from django.shortcuts import redirect
+from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View, TemplateView
@@ -32,7 +33,8 @@ class I18NView(View):
def get(self, request, lang):
referer_url = request.META.get('HTTP_REFERER', '/')
response = HttpResponseRedirect(referer_url)
- response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang)
+ expires = timezone.now() + timezone.timedelta(days=365)
+ response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang, expires=expires)
return response