9 Star 0 Fork 24

src-openEuler/python-blivet

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Incomplete-Chineseization-of-disk-mount.patch 2.72 KB
Copy Edit Raw Blame History
sun_hai authored 2024-12-04 16:59 +08:00 . fix anaconda partition error tip
From 7276d3ed7a3385292eb9a250735da575e345ff99 Mon Sep 17 00:00:00 2001
From: sun_hai_10 <sunhai10@huawei.com>
Date: Wed, 4 Dec 2024 17:42:17 +0800
Subject: [PATCH] Incomplete Chineseization of disk mount
---
blivet/devicefactory.py | 9 +++++----
po/zh_CN.po | 4 ++++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index b995cc2..a9b1f1a 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -41,6 +41,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", "3.0")
@@ -724,7 +725,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()
@@ -1348,7 +1349,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()
@@ -2119,7 +2120,7 @@ class StratisFactory(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(StratisFactory, self)._handle_no_size()
@@ -2170,7 +2171,7 @@ class StratisFactory(DeviceFactory):
# 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()
try:
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 5b7ac92..21309ac 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -152,6 +152,10 @@ msgstr ""
msgid "FCoE not available"
msgstr "FCoE 不可用"
+#: ../blivet/devicefactory.py:727 ../blivet/devicefactory.py:1351 ../blivet/devicefactory.py:2122 ../blivet/devicefactory.py:2173
+msgid "not enough free space for new device"
+msgstr "新设备没有足够的剩余空间"
+
#: ../blivet/iscsi.py:216
msgid "Unable to change iSCSI initiator name once set"
msgstr "设定后就无法更改 iSCSI 启动程序名称"
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/python-blivet.git
git@gitee.com:src-openeuler/python-blivet.git
src-openeuler
python-blivet
python-blivet
master

Search