[PATCH] Reorganize the right side of the Custom spoke (#1094856)

Chris Lumens clumens at redhat.com
Thu Sep 18 14:43:36 UTC 2014


> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
> @@ -1844,6 +1846,18 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>  
>          return device_type
>  
> +    def _set_devices_label(self):
> +        device_disks = self._device_disks
> +        if not device_disks:
> +            devices_desc = _("No disks assigned")
> +        else:
> +            devices_desc = "%s (%s)" % (device_disks[0].description, device_disks[0].name)
> +            num_disks = len(device_disks)
> +            if num_disks > 1:
> +                devices_desc += P_(" and %d other" % (num_disks - 1), " and %d others" % (num_disks -1 ),
> +                                   num_disks - 1)

I believe P_() works the same way as the other translation functions in
that you should do the substitution outside of the call.

Aside from that, assuming all the same keyboard functionality and
everything works, ACK.  We've already talked about the design of the
screen itself in irc so there's no point rehashing that.

- Chris


More information about the anaconda-patches mailing list