代码拉取完成,页面将自动刷新
From 8e018f450b57f7ab1c0eec258d81816f75cd97de Mon Sep 17 00:00:00 2001
From: luoqing <luoqing@kylinsec.com.cn>
Date: Mon, 14 Nov 2022 16:21:25 +0800
Subject: [PATCH] fix(config):Specify the translation encoding format as UTF-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 指定翻译编码格式为UTF-8
---
src/firewall/config/__init__.py | 2 ++
src/firewall/config/__init__.py.in | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/firewall/config/__init__.py b/src/firewall/config/__init__.py
index 1dc34d5..cf6b63c 100644
--- a/src/firewall/config/__init__.py
+++ b/src/firewall/config/__init__.py
@@ -22,10 +22,12 @@
import locale
try:
locale.setlocale(locale.LC_ALL, "")
+ locale.bind_textdomain_codeset("firewalld","UTF-8")
except locale.Error:
import os
os.environ['LC_ALL'] = 'C'
locale.setlocale(locale.LC_ALL, "")
+ locale.bind_textdomain_codeset("firewalld","UTF-8")
DOMAIN = 'firewalld'
import gettext
diff --git a/src/firewall/config/__init__.py.in b/src/firewall/config/__init__.py.in
index 6322334..0b5804f 100644
--- a/src/firewall/config/__init__.py.in
+++ b/src/firewall/config/__init__.py.in
@@ -22,10 +22,12 @@
import locale
try:
locale.setlocale(locale.LC_ALL, "")
+ locale.bind_textdomain_codeset("firewalld","UTF-8")
except locale.Error:
import os
os.environ['LC_ALL'] = 'C'
locale.setlocale(locale.LC_ALL, "")
+ locale.bind_textdomain_codeset("firewalld","UTF-8")
DOMAIN = 'firewalld'
import gettext
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。