[PATCH 1/2] Translate storage errors (#877658)
Brian C. Lane
bcl at redhat.com
Fri Dec 21 19:20:43 UTC 2012
On Fri, Dec 21, 2012 at 02:47:48PM +0100, Vratislav Podzimek wrote:
>
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
> pyanaconda/storage/partitioning.py | 44 +++++++++++++++++++-------------------
> 1 file changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
> if storage.config.exclusiveDisks:
> @@ -736,7 +736,7 @@ def doPartitioning(storage):
> disk.setup()
> except DeviceError as (msg, name):
> log.error("failed to set up disk %s: %s" % (name, msg))
> - raise PartitioningError("disk %s inaccessible" % disk.name)
> + raise PartitioningError(_("disk %s inaccessible" % disk.name))
The % disk.name should be outside the translation.
>
> partitions = storage.partitions[:]
> for part in storage.partitions:
> @@ -790,14 +790,14 @@ def doPartitioning(storage):
> for part in [p for p in storage.partitions if not p.exists]:
> problem = part.checkSize()
> if problem < 0:
> - raise PartitioningError("partition is too small for %s formatting "
> - "(allowable size is %d MB to %d MB)"
> + raise PartitioningError(_("partition is too small for %s formatting "
> + "(allowable size is %d MB to %d MB)")
> % (part.format.name,
> part.format.minSize,
> part.format.maxSize))
multiple argument translations need to use dict-style input, otherwise
languages that change the order don't know what to do.
> elif problem > 0:
> - raise PartitioningError("partition is too large for %s formatting "
> - "(allowable size is %d MB to %d MB)"
> + raise PartitioningError(_("partition is too large for %s formatting "
> + "(allowable size is %d MB to %d MB)")
> % (part.format.name,
> part.format.minSize,
> part.format.maxSize))
same as above.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20121221/d24a2bbc/attachment.sig>
More information about the anaconda-patches
mailing list