[blivet master 5/5] Mark all format names as translatable

David Shea dshea at redhat.com
Thu Nov 21 20:33:02 UTC 2013


---
 blivet/formats/biosboot.py  | 3 ++-
 blivet/formats/disklabel.py | 4 ++--
 blivet/formats/dmraid.py    | 3 ++-
 blivet/formats/fs.py        | 6 +++---
 blivet/formats/luks.py      | 2 +-
 blivet/formats/lvmpv.py     | 3 ++-
 blivet/formats/mdraid.py    | 3 ++-
 blivet/formats/multipath.py | 3 ++-
 blivet/formats/prepboot.py  | 3 ++-
 9 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/blivet/formats/biosboot.py b/blivet/formats/biosboot.py
index c3aef8d..73b980e 100644
--- a/blivet/formats/biosboot.py
+++ b/blivet/formats/biosboot.py
@@ -24,12 +24,13 @@ from parted import PARTITION_BIOS_GRUB
 
 from ..errors import *
 from .. import platform
+from ..i18n import N_
 from . import DeviceFormat, register_device_format
 
 class BIOSBoot(DeviceFormat):
     """ BIOS boot partition for GPT disklabels. """
     _type = "biosboot"
-    _name = "BIOS Boot"
+    _name = N_("BIOS Boot")
     _udevTypes = []
     partedFlag = PARTITION_BIOS_GRUB
     _formattable = True                 # can be formatted
diff --git a/blivet/formats/disklabel.py b/blivet/formats/disklabel.py
index a79f0a0..642f950 100644
--- a/blivet/formats/disklabel.py
+++ b/blivet/formats/disklabel.py
@@ -30,7 +30,7 @@ from ..errors import *
 from .. import arch
 from ..flags import flags
 from ..udev import udev_settle
-from ..i18n import _
+from ..i18n import _, N_
 from . import DeviceFormat, register_device_format
 
 import logging
@@ -40,7 +40,7 @@ log = logging.getLogger("blivet")
 class DiskLabel(DeviceFormat):
     """ Disklabel """
     _type = "disklabel"
-    _name = "partition table"
+    _name = N_("partition table")
     _formattable = True                # can be formatted
     _supported = False                 # is supported
 
diff --git a/blivet/formats/dmraid.py b/blivet/formats/dmraid.py
index 35bc1b7..b42c90a 100644
--- a/blivet/formats/dmraid.py
+++ b/blivet/formats/dmraid.py
@@ -23,6 +23,7 @@
 from ..storage_log import log_method_call
 from ..flags import flags
 from ..errors import *
+from ..i18n import N_
 from . import DeviceFormat, register_device_format
 
 import logging
@@ -32,7 +33,7 @@ log = logging.getLogger("blivet")
 class DMRaidMember(DeviceFormat):
     """ A dmraid member disk. """
     _type = "dmraidmember"
-    _name = "dm-raid member device"
+    _name = N_("dm-raid member device")
     # XXX This looks like trouble.
     #
     #     Maybe a better approach is a RaidMember format with subclass
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 43f9d44..7ad0abc 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1010,7 +1010,7 @@ class EFIFS(FATFS):
     _type = "efi"
     _mountType = "vfat"
     _modules = ["vfat"]
-    _name = "EFI System Partition"
+    _name = N_("EFI System Partition")
     _minSize = 50
 
     @property
@@ -1241,7 +1241,7 @@ register_device_format(HFS)
 class AppleBootstrapFS(HFS):
     _type = "appleboot"
     _mountType = "hfs"
-    _name = "Apple Bootstrap"
+    _name = N_("Apple Bootstrap")
     _minSize = 800.00 / 1024.00
     _maxSize = 1
 
@@ -1272,7 +1272,7 @@ register_device_format(HFSPlus)
 
 class MacEFIFS(HFSPlus):
     _type = "macefi"
-    _name = "Linux HFS+ ESP"
+    _name = N_("Linux HFS+ ESP")
     _udevTypes = []
     _minSize = 50
 
diff --git a/blivet/formats/luks.py b/blivet/formats/luks.py
index 0f1889e..924c4b2 100644
--- a/blivet/formats/luks.py
+++ b/blivet/formats/luks.py
@@ -43,7 +43,7 @@ log = logging.getLogger("blivet")
 class LUKS(DeviceFormat):
     """ A LUKS device. """
     _type = "luks"
-    _name = "LUKS"
+    _name = N_("LUKS")
     _lockedName = N_("Encrypted")
     _udevTypes = ["crypto_LUKS"]
     _formattable = True                 # can be formatted
diff --git a/blivet/formats/lvmpv.py b/blivet/formats/lvmpv.py
index ccf2c12..554f238 100644
--- a/blivet/formats/lvmpv.py
+++ b/blivet/formats/lvmpv.py
@@ -26,6 +26,7 @@ from ..storage_log import log_method_call
 from parted import PARTITION_LVM
 from ..errors import *
 from ..devicelibs import lvm
+from ..i18n import N_
 from . import DeviceFormat, register_device_format
 
 import logging
@@ -35,7 +36,7 @@ log = logging.getLogger("blivet")
 class LVMPhysicalVolume(DeviceFormat):
     """ An LVM physical volume. """
     _type = "lvmpv"
-    _name = "physical volume (LVM)"
+    _name = N_("physical volume (LVM)")
     _udevTypes = ["LVM2_member"]
     partedFlag = PARTITION_LVM
     _formattable = True                 # can be formatted
diff --git a/blivet/formats/mdraid.py b/blivet/formats/mdraid.py
index 9112ed0..7fbf6bb 100644
--- a/blivet/formats/mdraid.py
+++ b/blivet/formats/mdraid.py
@@ -28,6 +28,7 @@ from ..errors import *
 from ..devicelibs import mdraid
 from . import DeviceFormat, register_device_format
 from ..flags import flags
+from ..i18n import N_
 
 import logging
 log = logging.getLogger("blivet")
@@ -36,7 +37,7 @@ log = logging.getLogger("blivet")
 class MDRaidMember(DeviceFormat):
     """ An mdraid member disk. """
     _type = "mdmember"
-    _name = "software RAID"
+    _name = N_("software RAID")
     _udevTypes = ["linux_raid_member"]
     partedFlag = PARTITION_RAID
     _formattable = True                 # can be formatted
diff --git a/blivet/formats/multipath.py b/blivet/formats/multipath.py
index 2d6a5f3..67c32e4 100644
--- a/blivet/formats/multipath.py
+++ b/blivet/formats/multipath.py
@@ -26,6 +26,7 @@
 
 from ..storage_log import log_method_call
 from ..errors import *
+from ..i18n import N_
 from . import DeviceFormat, register_device_format
 
 import logging
@@ -34,7 +35,7 @@ log = logging.getLogger("blivet")
 class MultipathMember(DeviceFormat):
     """ A multipath member disk. """
     _type = "multipath_member"
-    _name = "multipath member device"
+    _name = N_("multipath member device")
     _udev_types = ["multipath_member"]
     _formattable = False                # can be formatted
     _supported = True                   # is supported
diff --git a/blivet/formats/prepboot.py b/blivet/formats/prepboot.py
index c7ed111..4d20f0f 100644
--- a/blivet/formats/prepboot.py
+++ b/blivet/formats/prepboot.py
@@ -22,6 +22,7 @@
 
 from ..errors import *
 from .. import platform
+from ..i18n import N_
 from . import DeviceFormat, register_device_format
 from parted import PARTITION_PREP
 import os
@@ -31,7 +32,7 @@ log = logging.getLogger("blivet")
 class PPCPRePBoot(DeviceFormat):
     """ Generic device format. """
     _type = "prepboot"
-    _name = "PPC PReP Boot"
+    _name = N_("PPC PReP Boot")
     _udevTypes = []
     partedFlag = PARTITION_PREP
     _formattable = True                 # can be formatted
-- 
1.8.4.2



More information about the anaconda-patches mailing list