]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck: Don't print the PO header when printing problems with PROMPT_NULL
authorTheodore Ts'o <tytso@mit.edu>
Sun, 7 Sep 2008 05:35:15 +0000 (01:35 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 7 Sep 2008 05:35:15 +0000 (01:35 -0400)
A few e2fsck problem messages supply their own prompt, and set a
prompt value of PROMPT_NULL.  We have to check for this case, and not
pass the null string to _(), since that will result in the translation
header getting printed, like this:

Run journal anywayProject-Id-Version: e2fsprogs
Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>
POT-Creation-Date: 2008-02-28 21:45-0500
PO-Revision-Date: 2006-05-23 11:12+0000
Last-Translator: Somebody32 <som32@mail.ru>
Language-Team: Russian <ru@li.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 &&
n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
X-Launchpad-Export-Date: 2008-05-28 00:43+0000
X-Generator: Launchpad (build Unknown)
<y>? yes

Addresses-Launchpad-Bug: #246892

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/problem.c

index 27e2bf0fc438062ad99c06c4e9c13926596b3d12..7976a70d7de1b62dcf039d778b67b5c35d7772e8 100644 (file)
@@ -1801,7 +1801,8 @@ int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx)
                        else
                                answer = 0;
                } else
-                       answer = ask(ctx, _(prompt[(int) ptr->prompt]), def_yn);
+                       answer = ask(ctx, (ptr->prompt == PROMPT_NULL) ? "" :
+                                    _(prompt[(int) ptr->prompt]), def_yn);
                if (!answer && !(ptr->flags & PR_NO_OK))
                        ext2fs_unmark_valid(fs);