Whamcloud - gitweb
e2fsck: fully and properly gettextize two error messages
authorBenno Schulenberg <bensberg@justemail.net>
Sun, 1 Jun 2014 21:27:49 +0000 (23:27 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 2 Jun 2014 01:17:13 +0000 (21:17 -0400)
The phrases "mounted" and "in use" were filled in untranslated into
the messages.  But it is better to gettextize entire sentences, and
not synthesize them from fragments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/unix.c

index 74ef32d..3f3479c 100644 (file)
@@ -249,15 +249,19 @@ static void check_mount(e2fsck_t ctx)
             ((ctx->options & E2F_OPT_FORCE) &&
              (ctx->mount_flags & EXT2_MF_READONLY))) &&
            !(ctx->options & E2F_OPT_WRITECHECK)) {
-               log_out(ctx, _("Warning!  %s is %s.\n"),
-                       ctx->filesystem_name,
-                       ctx->mount_flags & EXT2_MF_MOUNTED ?
-                               "mounted" : "in use");
+               if (ctx->mount_flags & EXT2_MF_MOUNTED)
+                       log_out(ctx, _("Warning!  %s is mounted.\n"),
+                                       ctx->filesystem_name);
+               else
+                       log_out(ctx, _("Warning!  %s is in use.\n"),
+                                       ctx->filesystem_name);
                return;
        }
 
-       log_out(ctx, _("%s is %s.\n"), ctx->filesystem_name,
-               ctx->mount_flags & EXT2_MF_MOUNTED ? "mounted" : "in use");
+       if (ctx->mount_flags & EXT2_MF_MOUNTED)
+               log_out(ctx, _("%s is mounted.\n"), ctx->filesystem_name);
+       else
+               log_out(ctx, _("%s is in use.\n"), ctx->filesystem_name);
        if (!ctx->interactive || ctx->mount_flags & EXT2_MF_BUSY)
                fatal_error(ctx, _("Cannot continue, aborting.\n\n"));
        puts("\007\007\007\007");