fix Incomplete-Chineseization-of-disk-mount

This commit is contained in:
wanglimin 2022-12-08 15:56:42 +08:00
parent 3d41a4d186
commit e9e52382aa
2 changed files with 83 additions and 2 deletions

View File

@ -0,0 +1,74 @@
From 5cac6005312fd6f0cb47b73571254acaff70078c Mon Sep 17 00:00:00 2001
From: wangzhiyi <wangzhiyi@xfusion.com>
Date: Tue, 22 Nov 2022 18:13:27 +0800
Subject: Sinicization"not enough free space for new device"
---
blivet/devicefactory.py | 5 +++--
po/blivet.pot | 4 ++++
po/zh_CN.po | 4 ++++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index 9214ad5..3d3029e 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")
@@ -704,7 +705,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()
@@ -1302,7 +1303,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 29f34b9..c8526de 100644
--- a/po/blivet.pot
+++ b/po/blivet.pot
@@ -50,6 +50,10 @@ msgstr ""
msgid "FCoE not available"
msgstr ""
+#: ../blivet/devicefactory.py:708 ../blivet/devicefactory.py:1306
+msgid "not enough free space for new device"
+msgstr ""
+
#: ../blivet/zfcp.py:62
msgid "You have not specified a device number or the number is invalid"
msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 480801d..05c635e 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -71,6 +71,10 @@ msgstr ""
msgid "FCoE not available"
msgstr "FCoE 不可用"
+#: ../blivet/devicefactory.py:708 ../blivet/devicefactory.py:1306
+msgid "not enough free space for new device"
+msgstr "新设备没有足够的剩余空间"
+
#: ../blivet/zfcp.py:62
msgid "You have not specified a device number or the number is invalid"
msgstr "您没有指定设备号码或号码无效"
--
2.27.0

View File

@ -3,7 +3,7 @@
Name: python-blivet
Version: 3.2.2
Release: 10
Release: 11
Epoch: 1
Summary: A python module for system storage configuration
License: LGPLv2+
@ -31,6 +31,7 @@ Patch6004: backport-Remove-action-device-from-LVM-reject-list.patch
Patch6005: backport-Ignore-devices-marked-as-hidden-in-sysfs-1856974.patch
Patch6006: backport-Fix-reading-hidden-sysfs-attribute.patch
Patch6007: backport-Fix-logging-information-about-ignoring-hidden-device.patch
Patch9002: Incomplete-Chineseization-of-disk-mount.patch
%description
The python-blivet package is a python module for examining and modifying
@ -131,7 +132,13 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%doc README
%changelog
* Thu Sep 1 2022 yueyuankun <yueyuankun@kylinos.cn> - 3.2.2-10
* Thu Dec 08 2022 wanglimin<wanglimin@xfusion.com> - 1:3.2.2-11
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: Incomplete Chineseization of disk mount
* Thu Sep 1 2022 yueyuankun <yueyuankun@kylinos.cn> - 1:3.2.2-10
- Type:bugfix
- ID:NA
- SUG:NA