1 Star 0 Fork 9

kylinsecos/lightdm

forked from src-openEuler/lightdm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1001-fix-translator-fixed-the-issue-that-lightdm-s-PAM-me.patch 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
From 817fea974287bdea8686ced43f708531148d98bc Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinos.com.cn>
Date: Tue, 25 Jan 2022 15:41:57 +0800
Subject: [PATCH] fix(translator): fixed the issue that lightdm's PAM messages
were not translated
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复lightdm返回的PAM消息未经过翻译,并将翻译指定为UTF-8编码,避免lightdm-qt5接口之中乱码问题
Signed-off-by: liuxinhao <liuxinhao@kylinos.com.cn>
---
src/lightdm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/lightdm.c b/src/lightdm.c
index 81b9117..2df2f9f 100644
--- a/src/lightdm.c
+++ b/src/lightdm.c
@@ -20,6 +20,7 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
+#include <locale.h>
#include "configuration.h"
#include "display-manager.h"
@@ -551,6 +552,10 @@ main (int argc, char **argv)
sigaction (SIGPIPE, &action, NULL);
sigaction (SIGHUP, &action, NULL);
+ setlocale(LC_CTYPE,"");
+ setlocale(LC_MESSAGES,"");
+ bind_textdomain_codeset("Linux-PAM", "UTF-8");
+
/* When lightdm starts sessions it needs to run itself in a new mode */
if (argc >= 2 && strcmp (argv[1], "--session-child") == 0)
return session_child_run (argc, argv);
--
2.18.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kylinsecos_admin/lightdm.git
git@gitee.com:kylinsecos_admin/lightdm.git
kylinsecos_admin
lightdm
lightdm
master

搜索帮助