From 6870908054fb1f91c4ab7b8195fedce250dab1c3 Mon Sep 17 00:00:00 2001 From: longcheng Date: Thu, 20 Jul 2023 13:59:21 +0800 Subject: [PATCH] Fix interface translation garbled code under GB18030 encoding --- ...ig-printer-Fix-interface-translation.patch | 35 +++++++++++++++++++ system-config-printer.spec | 6 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0006-fix-system-config-printer-Fix-interface-translation.patch diff --git a/0006-fix-system-config-printer-Fix-interface-translation.patch b/0006-fix-system-config-printer-Fix-interface-translation.patch new file mode 100644 index 0000000..ee16dea --- /dev/null +++ b/0006-fix-system-config-printer-Fix-interface-translation.patch @@ -0,0 +1,35 @@ +From d5d42c5e277cd3ce7df96aaba2331fe76322e27b Mon Sep 17 00:00:00 2001 +From: luoqing +Date: Fri, 9 Jun 2023 11:29:59 +0800 +Subject: [PATCH 6/6] fix(system-config-printer):Fix interface translation + garbled code under GB18030 encoding +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复在GB18030编码下界面翻译乱码 + +Close #7014 +--- + system-config-printer.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/system-config-printer.py b/system-config-printer.py +index f3e2663..98cdad6 100755 +--- a/system-config-printer.py ++++ b/system-config-printer.py +@@ -67,9 +67,11 @@ cups.ppdSetConformance (cups.PPD_CONFORM_RELAXED) + import locale + try: + locale.setlocale (locale.LC_ALL, "") ++ locale.bind_textdomain_codeset("system-config-printer","UTF-8") + except locale.Error: + os.environ['LC_ALL'] = 'C' + locale.setlocale (locale.LC_ALL, "") ++ locale.bind_textdomain_codeset("system-config-printer","UTF-8") + import gettext + gettext.install(domain=config.PACKAGE, localedir=config.localedir) + +-- +2.27.0 + diff --git a/system-config-printer.spec b/system-config-printer.spec index c53650b..61052c0 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -3,7 +3,7 @@ Name: system-config-printer Summary: a graphical tool for CUPS administration Version: 1.5.11 -Release: 23 +Release: 24 License: GPLv2+ URL: https://github.com/zdohnal/system-config-printer Source0: https://github.com/zdohnal/system-config-printer/archive/%{version}.tar.gz @@ -26,6 +26,7 @@ Patch2: Use-ValueError-instead-of-ImportError-to-catch-excep.patch Patch3: Fix-typo.patch Patch4: Update-da.po.patch Patch5: Update-de.po.patch +Patch6: 0006-fix-system-config-printer-Fix-interface-translation.patch %description %{name} is a graphical tool for CUPS administration. It @@ -86,6 +87,9 @@ rm -rf /var/cache/foomatic/foomatic.pickle exit 0 %changelog +* Thu Jul 20 2023 longcheng - 1.5.11-24 +- Fix interface translation garbled code under GB18030 encoding + * Tue Feb 21 2023 yaoxin - 1.5.11-23 - Fix build failed -- Gitee