From f13d753e497672d611a6b1b1d785a5771f743a25 Mon Sep 17 00:00:00 2001 From: wanglimin Date: Thu, 8 Dec 2022 19:29:01 +0800 Subject: [PATCH] fix Incomplete-Chineseization-of-disk-mount (cherry picked from commit 1f5bb070d86ffc801d045a7a5d3d2cde219246e8) --- Incomplete-Chineseization-of-disk-mount.patch | 60 +++++++++++++++++++ python-blivet.spec | 11 +++- 2 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 Incomplete-Chineseization-of-disk-mount.patch diff --git a/Incomplete-Chineseization-of-disk-mount.patch b/Incomplete-Chineseization-of-disk-mount.patch new file mode 100644 index 0000000..7e93840 --- /dev/null +++ b/Incomplete-Chineseization-of-disk-mount.patch @@ -0,0 +1,60 @@ +diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py +index efadd25..7b9243a 100644 +--- a/blivet/devicefactory.py ++++ b/blivet/devicefactory.py +@@ -39,6 +39,7 @@ from .partitioning import TotalSizeSet + from .partitioning import do_partitioning + from .size import Size + from .static_data import luks_data ++from .i18n import _ + + import gi + gi.require_version("BlockDev", "2.0") +@@ -714,7 +715,7 @@ class DeviceFactory(object): + # the container + size = self._get_device_size() + if size <= Size(0): +- raise DeviceFactoryError("not enough free space for new device") ++ raise DeviceFactoryError(_("not enough free space for new device")) + + parents = self._get_parent_devices() + +@@ -1322,7 +1323,7 @@ class LVMFactory(DeviceFactory): + self.size += self.device.size + + if self.size == Size(0): +- raise DeviceFactoryError("not enough free space for new device") ++ raise DeviceFactoryError(_("not enough free space for new device")) + else: + super(LVMFactory, self)._handle_no_size() + +diff --git a/po/blivet.pot b/po/blivet.pot +index 40ef843..7d49527 100644 +--- a/po/blivet.pot ++++ b/po/blivet.pot +@@ -126,6 +126,10 @@ msgstr "" + msgid "FCoE not available" + msgstr "" + ++#: ../blivet/devicefactory.py:718 ../blivet/devicefactory.py:1326 ++msgid "not enough free space for new device" ++msgstr "" ++ + #: ../blivet/iscsi.py:217 + msgid "Unable to change iSCSI initiator name once set" + msgstr "" +diff --git a/po/zh_CN.po b/po/zh_CN.po +index aad3d0f..31f7017 100644 +--- a/po/zh_CN.po ++++ b/po/zh_CN.po +@@ -150,6 +150,10 @@ msgstr "" + msgid "FCoE not available" + msgstr "FCoE 不可用" + ++#: ../blivet/devicefactory.py:718 ../blivet/devicefactory.py:1326 ++msgid "not enough free space for new device" ++msgstr "新设备没有足够的剩余空间" ++ + #: ../blivet/iscsi.py:217 + msgid "Unable to change iSCSI initiator name once set" + msgstr "设定后就无法更改 iSCSI 启动程序名称" diff --git a/python-blivet.spec b/python-blivet.spec index e9ba19b..3e8bd68 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -3,7 +3,7 @@ Name: python-blivet Version: 3.4.2 -Release: 3 +Release: 4 Epoch: 1 Summary: A python module for system storage configuration License: LGPLv2+ @@ -24,8 +24,7 @@ Patch9001: 0001-Make-sure-we-mount-the-top-level-subvolume-when-moun.patch %ifarch sw_64 Patch9002: blivet-3.4.2-sw.patch %endif - - +patch9003: Incomplete-Chineseization-of-disk-mount.patch %description The python-blivet package is a python module for examining and modifying @@ -126,6 +125,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install %doc README.md %changelog +* Fri Dec 09 2022 wanglimin - 1:3.4.2-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: Incomplete Chineseization of disk mount + * Tue Oct 18 2022 wuzx - 3.4.2-3 - add sw64 patch -- Gitee