From 4efd17cccb38bf4ab6110e7756fdf24d8774e4bd Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 7 Sep 2008 01:35:15 -0400 Subject: [PATCH] e2fsck: Don't print the PO header when printing problems with PROMPT_NULL 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 POT-Creation-Date: 2008-02-28 21:45-0500 PO-Revision-Date: 2006-05-23 11:12+0000 Last-Translator: Somebody32 Language-Team: Russian 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) ? yes Addresses-Launchpad-Bug: #246892 Signed-off-by: "Theodore Ts'o" --- e2fsck/problem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2fsck/problem.c b/e2fsck/problem.c index 27e2bf0..7976a70 100644 --- a/e2fsck/problem.c +++ b/e2fsck/problem.c @@ -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); -- 1.8.3.1