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 0000000000000000000000000000000000000000..c1c1942f6e0edd47d14564254e95654157982967 --- /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 ae21b84f68b10beccfd8978247998426aa62e13a..f978b7847f90e6f00921f01a869e5d5463777be4 100644 --- a/lshw.spec +++ b/lshw.spec @@ -1,14 +1,16 @@ Name: lshw Version: B.02.18 -Release: 21 +Release: 23 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 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 @@ -38,6 +40,9 @@ The %{name}-help package contains doc files for %{name}. %patch01 -p1 %patch02 -R -p1 %patch03 -p1 +%patch04 -p1 + +cp %{SOURCE1} src/po/ %build mkdir -p build && cd build @@ -49,8 +54,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 +75,15 @@ src/lshw -json -disable usb -disable pcmcia -disable isapnp \ %files help %doc README.md %{_mandir}/man1/lshw.1.gz +%{_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 + * Fri Feb 14 2020 chengquan - B.02.18-21 - Rollback some patches for bugfix @@ -82,3 +92,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 0000000000000000000000000000000000000000..a850206c9e33aa8c3c3a4fdd89bd4eb3ca5b3dc5 --- /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 "此窗格显示有关所选硬件节点的详细信息"