From 60335c2d3e2b6f26bf7379926c1e23820265f5bd Mon Sep 17 00:00:00 2001 From: yaoguangzhong Date: Thu, 8 Dec 2022 21:09:33 +0800 Subject: [PATCH 1/2] [PATCH openEuler-20.03-LTS-SP3]lshw: add some chinese translation category: bugfix bugzilla: https://gitee.com/src-openeuler/lshw/issues/I65DLI Signed-off-by: Guangzhong Yao --- lshw.spec | 12 +++++++++--- zh_CN.po | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 zh_CN.po diff --git a/lshw.spec b/lshw.spec index ae21b84..78b3074 100644 --- a/lshw.spec +++ b/lshw.spec @@ -1,10 +1,11 @@ Name: lshw Version: B.02.18 -Release: 21 +Release: 22 Summary: Hardware lister License: GPLv2 URL: http://ezix.org/project/wiki/HardwareLiSter Source0: http://www.ezix.org/software/files/%{name}-%{version}.tar.gz +Source1: zh_CN.po Patch0: lshw-B.02.18-scandir.patch Patch1: lshw-B.02.18-20cda77.patch Patch2: lshw-B.02.18-revert-json.patch @@ -39,6 +40,8 @@ The %{name}-help package contains doc files for %{name}. %patch02 -R -p1 %patch03 -p1 +cp %{SOURCE1} src/po/ + %build mkdir -p build && cd build %cmake .. -DNOLOGO=ON -DHWDATA=OFF -DPOLICYKIT=ON -DBUILD_SHARED_LIBS=OFF -GNinja @@ -49,8 +52,6 @@ cd build %ninja_install ln -s gtk-lshw %{buildroot}/%{_sbindir}/lshw-gui -rm -rf %{buildroot}/%{_datadir}/locale/fr/ - %check appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml cd build @@ -72,8 +73,12 @@ src/lshw -json -disable usb -disable pcmcia -disable isapnp \ %files help %doc README.md %{_mandir}/man1/lshw.1.gz +%{_datadir}/locale/* %changelog +* Thu Dec 8 2022 yaoguangzhong - B.02.18-22 +- add chinese translation + * Fri Feb 14 2020 chengquan - B.02.18-21 - Rollback some patches for bugfix @@ -82,3 +87,4 @@ src/lshw -json -disable usb -disable pcmcia -disable isapnp \ * Mon Sep 9 2019 luhuaxin - B.02.18-19 - Package init + diff --git a/zh_CN.po b/zh_CN.po new file mode 100644 index 0000000..a850206 --- /dev/null +++ b/zh_CN.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "Project-Id-Version: lshw\n" + "Report-Msgid-Bugs-To: \n" + "POT-Creation-Date: 2022-07-29\n" + "PO-Revision-Date: 2022-07-29\n" + "Last-Translator: wutao \n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + +msgid "_File" +msgstr "文件(_F)" + +msgid "_View" +msgstr "视图(_V)" + +msgid "_Help" +msgstr "帮助(_H)" + +msgid "Click to select and double-click to navigate" +msgstr "单击以选择并双击以导航" + +msgid "This pane displays detailed information about the selected hardware node" +msgstr "此窗格显示有关所选硬件节点的详细信息" -- Gitee From 496daec179ae1a08ad47d3314c53e005016aac8b Mon Sep 17 00:00:00 2001 From: yaoguangzhong Date: Fri, 9 Dec 2022 15:18:04 +0800 Subject: [PATCH 2/2] [PATCH openEuler-20.03-LTS-SP3]lshw: fix show computer icon category: bugfix bugzilla: https://gitee.com/src-openeuler/lshw/issues/I65DS8?from=project-issue Signed-off-by: Guangzhong Yao --- lshw-B.02.18-fix-show-computer-icon.patch | 28 +++++++++++++++++++++++ lshw.spec | 7 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 lshw-B.02.18-fix-show-computer-icon.patch diff --git a/lshw-B.02.18-fix-show-computer-icon.patch b/lshw-B.02.18-fix-show-computer-icon.patch new file mode 100644 index 0000000..c1c1942 --- /dev/null +++ b/lshw-B.02.18-fix-show-computer-icon.patch @@ -0,0 +1,28 @@ +From b9c3699c4f41361df4df4f573f7ec39d01c03d6d Mon Sep 17 00:00:00 2001 +From: ww0012633 +Date: Fri, 29 Jul 2022 16:51:59 +0800 +Subject: [PATCH] fix show computer icon + +--- + src/core/main.cc | 3 +-- + src/po/Makefile | 2 +- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/core/main.cc b/src/core/main.cc +index 03848da..46846f6 100644 +--- a/src/core/main.cc ++++ b/src/core/main.cc +@@ -145,8 +145,7 @@ bool scan_system(hwNode & system) + scan_abi(computer); + status(""); + +- if (computer.getDescription() == "") +- computer.setDescription("Computer"); ++ computer.setDescription("Computer"); + computer.assignPhysIds(); + computer.fixInconsistencies(); + +-- +2.27.0 + + diff --git a/lshw.spec b/lshw.spec index 78b3074..f978b78 100644 --- a/lshw.spec +++ b/lshw.spec @@ -1,6 +1,6 @@ Name: lshw Version: B.02.18 -Release: 22 +Release: 23 Summary: Hardware lister License: GPLv2 URL: http://ezix.org/project/wiki/HardwareLiSter @@ -10,6 +10,7 @@ Patch0: lshw-B.02.18-scandir.patch Patch1: lshw-B.02.18-20cda77.patch Patch2: lshw-B.02.18-revert-json.patch Patch3: lshw-B.02.18-cmake.patch +Patch4: lshw-B.02.18-fix-show-computer-icon.patch BuildRequires: gcc gcc-c++ cmake gettext BuildRequires: desktop-file-utils libappstream-glib ninja-build @@ -39,6 +40,7 @@ The %{name}-help package contains doc files for %{name}. %patch01 -p1 %patch02 -R -p1 %patch03 -p1 +%patch04 -p1 cp %{SOURCE1} src/po/ @@ -76,6 +78,9 @@ src/lshw -json -disable usb -disable pcmcia -disable isapnp \ %{_datadir}/locale/* %changelog +* Fri Dec 9 2022 yaoguangzhong - B.02.18-23 +- fix show computer icon + * Thu Dec 8 2022 yaoguangzhong - B.02.18-22 - add chinese translation -- Gitee