[PATCH rhel7-branch 4/7] Fix strings with style problems.

Chris Lumens clumens at redhat.com
Wed Jun 3 13:55:41 UTC 2015


See 1035898 for the original reasoning behind this.

Related: rhbz#1196721
---
 pyanaconda/errors.py                                   |  2 +-
 pyanaconda/kickstart.py                                | 18 +++++++++---------
 pyanaconda/storage_utils.py                            |  8 ++++----
 pyanaconda/ui/gui/spokes/custom.py                     |  2 +-
 pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py | 10 +++++-----
 pyanaconda/ui/gui/spokes/network.glade                 | 10 +++++-----
 pyanaconda/ui/gui/spokes/source.glade                  |  2 +-
 pyanaconda/ui/gui/spokes/user.glade                    |  2 +-
 pyanaconda/ui/gui/spokes/user.py                       |  2 +-
 pyanaconda/ui/tui/spokes/__init__.py                   |  4 ++--
 10 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py
index 50581dc..7cf2c66 100644
--- a/pyanaconda/errors.py
+++ b/pyanaconda/errors.py
@@ -245,7 +245,7 @@ class ErrorHandler(object):
         return ERROR_RAISE
 
     def _bootLoaderErrorHandler(self, exn):
-        message = _("The following error occurred while installing the bootloader. "
+        message = _("The following error occurred while installing the boot loader. "
                     "The system will not be bootable. "
                     "Would you like to ignore this and continue with "
                     "installation?")
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index ae783e2..8213fb0 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -445,12 +445,12 @@ class BTRFSData(commands.btrfs.F17_BTRFSData):
 
             if dev and dev.format.type != "btrfs":
                 raise KickstartValueError(formatErrorMsg(self.lineno,
-                        msg=_("BTRFS partition \"%(device)s\" has a format of \"%(format)s\", but should have a format of \"btrfs\".") %
+                        msg=_("Btrfs partition \"%(device)s\" has a format of \"%(format)s\", but should have a format of \"Btrfs\".") %
                              {"device": member, "format": dev.format.type}))
 
             if not dev:
                 raise KickstartValueError(formatErrorMsg(self.lineno,
-                        msg=_("Tried to use undefined partition \"%s\" in BTRFS volume specification.") % member))
+                        msg=_("Tried to use undefined partition \"%s\" in Btrfs volume specification.") % member))
 
             members.append(dev)
 
@@ -463,7 +463,7 @@ class BTRFSData(commands.btrfs.F17_BTRFSData):
 
         if len(members) == 0 and not self.preexist:
             raise KickstartValueError(formatErrorMsg(self.lineno,
-                    msg=_("BTRFS volume defined without any member devices.  Either specify member devices or use --useexisting.")))
+                    msg=_("Btrfs volume defined without any member devices.  Either specify member devices or use --useexisting.")))
 
         # allow creating btrfs vols/subvols without specifying mountpoint
         if self.mountpoint in ("none", "None"):
@@ -487,7 +487,7 @@ class BTRFSData(commands.btrfs.F17_BTRFSData):
             device = devicetree.resolveDevice(self.name)
             if not device:
                 raise KickstartValueError(formatErrorMsg(self.lineno,
-                        msg=_("BTRFS volume \"%s\" specified with --useexisting does not exist.") % self.name))
+                        msg=_("Btrfs volume \"%s\" specified with --useexisting does not exist.") % self.name))
 
             device.format.mountpoint = self.mountpoint
         else:
@@ -934,7 +934,7 @@ class LogVolData(commands.logvol.F21_LogVolData):
                         mountopts=self.fsopts)
         if not fmt.type and not self.thin_pool:
             raise KickstartValueError(formatErrorMsg(self.lineno,
-                    msg=_("The \"%s\" filesystem type is not supported.") % ty))
+                    msg=_("The \"%s\" file system type is not supported.") % ty))
 
         # If we were given a pre-existing LV to create a filesystem on, we need
         # to verify it and its VG exists and then schedule a new format action
@@ -1148,7 +1148,7 @@ class PartitionData(commands.partition.F18_PartData):
 
             if devicetree.getDeviceByName(kwargs["name"]):
                 raise KickstartValueError(formatErrorMsg(self.lineno,
-                        msg=_("BTRFS partition \"%s\" is defined multiple times.") % kwargs["name"]))
+                        msg=_("Btrfs partition \"%s\" is defined multiple times.") % kwargs["name"]))
 
             if self.onPart:
                 ksdata.onPart[kwargs["name"]] = self.onPart
@@ -1221,7 +1221,7 @@ class PartitionData(commands.partition.F18_PartData):
            size=size)
         if not kwargs["fmt"].type:
             raise KickstartValueError(formatErrorMsg(self.lineno,
-                    msg=_("The \"%s\" filesystem type is not supported.") % ty))
+                    msg=_("The \"%s\" file system type is not supported.") % ty))
 
         # If we were given a specific disk to create the partition on, verify
         # that it exists first.  If it doesn't exist, see if it exists with
@@ -1376,7 +1376,7 @@ class RaidData(commands.raid.F18_RaidData):
 
             if devicetree.getDeviceByName(kwargs["name"]):
                 raise KickstartValueError(formatErrorMsg(self.lineno,
-                        msg=_("BTRFS partition \"%s\" is defined multiple times.") % kwargs["name"]))
+                        msg=_("Btrfs partition \"%s\" is defined multiple times.") % kwargs["name"]))
 
             self.mountpoint = ""
         else:
@@ -1441,7 +1441,7 @@ class RaidData(commands.raid.F18_RaidData):
            mountopts=self.fsopts)
         if not kwargs["fmt"].type:
             raise KickstartValueError(formatErrorMsg(self.lineno,
-                    msg=_("The \"%s\" filesystem type is not supported.") % ty))
+                    msg=_("The \"%s\" file system type is not supported.") % ty))
 
         kwargs["name"] = devicename
         kwargs["level"] = self.level
diff --git a/pyanaconda/storage_utils.py b/pyanaconda/storage_utils.py
index 410dfea..ada7692 100644
--- a/pyanaconda/storage_utils.py
+++ b/pyanaconda/storage_utils.py
@@ -51,7 +51,7 @@ DEVICE_TEXT_LVM = N_("LVM")
 DEVICE_TEXT_LVM_THINP = N_("LVM Thin Provisioning")
 DEVICE_TEXT_MD = N_("RAID")
 DEVICE_TEXT_PARTITION = N_("Standard Partition")
-DEVICE_TEXT_BTRFS = N_("BTRFS")
+DEVICE_TEXT_BTRFS = N_("Btrfs")
 DEVICE_TEXT_DISK = N_("Disk")
 
 DEVICE_TEXT_MAP = {DEVICE_TYPE_LVM: DEVICE_TEXT_LVM,
@@ -74,11 +74,11 @@ MOUNTPOINT_DESCRIPTIONS = {"Swap": N_("The 'swap' area on your computer is used
                            "BIOS Boot": N_("The BIOS boot partition is required to enable booting\n"
                                            "from GPT-partitioned disks on BIOS hardware."),
                            "PReP Boot": N_("The PReP boot partition is required as part of the\n"
-                                           "bootloader configuration on some PPC platforms.")
+                                           "boot loader configuration on some PPC platforms.")
                             }
 
 AUTOPART_CHOICES = ((N_("Standard Partition"), AUTOPART_TYPE_PLAIN),
-                    (N_("BTRFS"), AUTOPART_TYPE_BTRFS),
+                    (N_("Btrfs"), AUTOPART_TYPE_BTRFS),
                     (N_("LVM"), AUTOPART_TYPE_LVM),
                     (N_("LVM Thin Provisioning"), AUTOPART_TYPE_LVM_THINP))
 
@@ -231,7 +231,7 @@ def sanity_check(storage, min_ram=isys.MIN_RAM):
         stage1 = storage.bootloader.stage1_device
         if not stage1:
             exns.append(
-               SanityError(_("No valid bootloader target device found. "
+               SanityError(_("No valid boot loader target device found. "
                             "See below for details.")))
             pe = _platform.stage1MissingError
             if pe:
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 2053739..8e86204 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -636,7 +636,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         elif encrypted and new_fs_type in PARTITION_ONLY_FORMAT_TYPES:
             error = _("%s cannot be encrypted") % new_fs_type
         elif mountpoint == "/" and device.format.exists and not reformat:
-            error = _("You must create a new filesystem on the root device.")
+            error = _("You must create a new file system on the root device.")
 
         if not error and \
            (raid_level is not None or requiresRaidSelection(device_type)) and \
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
index 86bf85e..e1e2d73 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
@@ -110,14 +110,14 @@ def validate_label(label, fmt):
 
     """
     if fmt.exists:
-        return _("Can not relabel already existing filesystem.")
+        return _("Cannot relabel already existing file system.")
     if not fmt.labeling():
         if label == "":
             return ""
         else:
-            return _("Can not set label on filesystem.")
+            return _("Cannot set label on file system.")
     if not fmt.labelFormatOK(label):
-        return _("Unacceptable label format for filesystem.")
+        return _("Unacceptable label format for file system.")
     return ""
 
 def validate_mountpoint(mountpoint, used_mountpoints, strict=True):
@@ -129,7 +129,7 @@ def validate_mountpoint(mountpoint, used_mountpoints, strict=True):
     if mountpoint in used_mountpoints:
         return _("That mount point is already in use. Try something else?")
     elif not mountpoint:
-        return _("Please enter a valid mountpoint.")
+        return _("Please enter a valid mount point.")
     elif mountpoint in system_mountpoints:
         return _("That mount point is invalid. Try something else?")
     elif (lowerASCII(mountpoint) not in fake_mountpoints and
@@ -356,7 +356,7 @@ class ConfirmDeleteDialog(GUIObject):
             rootName = rootName.replace("_", "__")
         self._removeAll.set_label(
                 C_("GUI|Custom Partitioning|Confirm Delete Dialog",
-                    "Delete _all other filesystems in the %s root as well.")
+                    "Delete _all other file systems in the %s root as well.")
                 % rootName)
         self._removeAll.set_sensitive(rootName is not None)
 
diff --git a/pyanaconda/ui/gui/spokes/network.glade b/pyanaconda/ui/gui/spokes/network.glade
index 2a9e029..75a65c2 100644
--- a/pyanaconda/ui/gui/spokes/network.glade
+++ b/pyanaconda/ui/gui/spokes/network.glade
@@ -13,19 +13,19 @@
     <data>
       <row>
         <col id="0" translatable="yes">Bond</col>
-        <col id="1" translatable="yes">bond</col>
+        <col id="1">bond</col>
       </row>
       <row>
         <col id="0" translatable="yes">Bridge</col>
-        <col id="1" translatable="yes">bridge</col>
+        <col id="1">bridge</col>
       </row>
       <row>
         <col id="0" translatable="yes">Team</col>
-        <col id="1" translatable="yes">team</col>
+        <col id="1">team</col>
       </row>
       <row>
         <col id="0" translatable="yes">VLAN</col>
-        <col id="1" translatable="yes">vlan</col>
+        <col id="1">vlan</col>
       </row>
     </data>
   </object>
@@ -2274,7 +2274,7 @@
     </child>
     <child internal-child="accessible">
       <object class="AtkObject" id="networkWindow-atkobject">
-        <property name="AtkObject::accessible-name" translatable="yes">NETWORK &amp; HOSTNAME</property>
+        <property name="AtkObject::accessible-name" translatable="yes">NETWORK &amp; HOST NAME</property>
       </object>
     </child>
   </object>
diff --git a/pyanaconda/ui/gui/spokes/source.glade b/pyanaconda/ui/gui/spokes/source.glade
index 9419b09..be6c715 100644
--- a/pyanaconda/ui/gui/spokes/source.glade
+++ b/pyanaconda/ui/gui/spokes/source.glade
@@ -236,7 +236,7 @@
             </child>
             <child>
               <object class="GtkButton" id="proxyOkButton">
-                <property name="label" translatable="yes" context="GUI|Software Source|Proxy Dialog">_Ok</property>
+                <property name="label" translatable="yes" context="GUI|Software Source|Proxy Dialog">_OK</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
diff --git a/pyanaconda/ui/gui/spokes/user.glade b/pyanaconda/ui/gui/spokes/user.glade
index 64dc2e2..8a1a4ca 100644
--- a/pyanaconda/ui/gui/spokes/user.glade
+++ b/pyanaconda/ui/gui/spokes/user.glade
@@ -115,7 +115,7 @@
                         <signal name="changed" handler="username_changed" swapped="no"/>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="t_username-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes">Username</property>
+                            <property name="AtkObject::accessible-name" translatable="yes">User name</property>
                           </object>
                         </child>
                       </object>
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index bc276d4..3031804 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -311,7 +311,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
 
         # Allow empty usernames so the spoke can be exited without creating a user
         self.add_re_check(self.username, re.compile(USERNAME_VALID.pattern + r'|^$'),
-                _("Invalid username"))
+                _("Invalid user name"))
 
         self.add_re_check(self.fullname, GECOS_VALID, _("Full name cannot contain colon characters"))
 
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 4f72600..ff5c88c 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -168,8 +168,8 @@ class EditTUIDialog(NormalTUISpoke):
             self.close()
             return True
         else:
-            print(_("You have provided an invalid username: %s\n"
-                    "Tip: Keep your username shorter than 32 characters and do not use spaces.\n") % key)
+            print(_("You have provided an invalid user name: %s\n"
+                    "Tip: Keep your user name shorter than 32 characters and do not use spaces.\n") % key)
             return NormalTUISpoke.input(self, entry, key)
 
 class OneShotEditTUIDialog(EditTUIDialog):
-- 
2.2.2



More information about the anaconda-patches mailing list