[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Move formatting out of translatable strings.
From: |
Benno Schulenberg |
Subject: |
[PATCH] Move formatting out of translatable strings. |
Date: |
Wed, 16 May 2007 16:07:12 +0200 |
And gettextize a few missed messages.
---
include/parted/vtoc.h | 1 -
libparted/labels/vtoc.c | 26 +++++++++++++-------------
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/include/parted/vtoc.h b/include/parted/vtoc.h
index 3e79478..2e09caa 100644
--- a/include/parted/vtoc.h
+++ b/include/parted/vtoc.h
@@ -43,7 +43,6 @@
#define VOLSER_LENGTH 6
#define BIG_DISK_SIZE 0x10000
-#define VTOC_ERROR "VTOC error:"
typedef struct ttr ttr_t;
typedef struct cchhb cchhb_t;
diff --git a/libparted/labels/vtoc.c b/libparted/labels/vtoc.c
index bd2c905..dbdb92e 100644
--- a/libparted/labels/vtoc.c
+++ b/libparted/labels/vtoc.c
@@ -160,23 +160,23 @@ vtoc_error (enum failure why, char *s1, char *s2)
switch (why) {
case unable_to_open:
- sprintf(error, _("%s opening device '%s'
failed.\n%s\n"),
- VTOC_ERROR, s1, s2);
+ sprintf(error, ("VTOC: %s -- %s\n%s\n"),
+ _("opening of device failed"), s1, s2);
break;
case unable_to_seek:
- sprintf(error, _("%s seeking device '%s'
failed.\n%s\n"),
- VTOC_ERROR, s1, s2);
+ sprintf(error, ("VTOC: %s -- %s\n%s\n"),
+ _("seeking on device failed"), s1, s2);
break;
case unable_to_write:
- sprintf(error, _("%s writing to device '%s'
failed,\n%s\n"),
- VTOC_ERROR, s1, s2);
+ sprintf(error, ("VTOC: %s -- %s\n%s\n"),
+ _("writing to device failed"), s1, s2);
break;
case unable_to_read:
- sprintf(error, _("%s reading from device '%s'
failed.\n%s\n"),
- VTOC_ERROR, s1, s2);
+ sprintf(error, ("VTOC: %s -- %s\n%s\n"),
+ _("reading from device failed"), s1,
s2);
break;
default:
- sprintf(error, _("Fatal error\n"));
+ sprintf(error, ("VTOC: %s\n"), _("Fatal error"));
}
ped_exception_throw(PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL, error);
@@ -278,14 +278,14 @@ vtoc_read_volume_label (int f, unsigned long vlabel_start,
if (lseek(f, vlabel_start, SEEK_SET) == -1) {
vtoc_error(unable_to_seek, "vtoc_read_volume_label",
- "Could not read volume label.");
+ _("Could not read volume label."));
return 1;
}
rc = read(f, vlabel, sizeof(volume_label_t));
if (rc != sizeof(volume_label_t)) {
vtoc_error(unable_to_read, "vtoc_read_volume_label",
- "Could not read volume label.");
+ _("Could not read volume label."));
return 1;
}
@@ -304,12 +304,12 @@ vtoc_write_volume_label (int f, unsigned long
vlabel_start,
if (lseek(f, vlabel_start, SEEK_SET) == -1)
vtoc_error(unable_to_seek, "vtoc_write_volume_label",
- "Could not write volume label.");
+ _("Could not write volume label."));
rc = write(f, vlabel, sizeof(volume_label_t));
if (rc != sizeof(volume_label_t))
vtoc_error(unable_to_write, "vtoc_write_volume_label",
- "Could not write volume label.");
+ _("Could not write volume label."));
return 0;
}
--
1.5.0.7
- [PATCH] Move formatting out of translatable strings.,
Benno Schulenberg <=
- [PATCH] Move more formatting out of translatable strings., Benno Schulenberg, 2007/05/16
- Re: [PATCH] Move formatting out of translatable strings., Benno Schulenberg, 2007/05/16
- Re: [PATCH] Move formatting out of translatable strings., Benno Schulenberg, 2007/05/27
- Re: [PATCH] Move formatting out of translatable strings., Otavio Salvador, 2007/05/28
- Re: [PATCH] Move formatting out of translatable strings., Benno Schulenberg, 2007/05/28
- Re: [PATCH] Move formatting out of translatable strings., Otavio Salvador, 2007/05/28
- Re: [PATCH] Move formatting out of translatable strings., Benno Schulenberg, 2007/05/28
- Re: [PATCH] Move formatting out of translatable strings., Otavio Salvador, 2007/05/28
- Re: [PATCH] Move formatting out of translatable strings., Leslie P. Polzer, 2007/05/29
- Re: [PATCH] Move formatting out of translatable strings., Otavio Salvador, 2007/05/29