[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] bug in --help
From: |
David Lawrence Ramsey |
Subject: |
Re: [Nano-devel] bug in --help |
Date: |
Wed, 13 Apr 2005 23:28:01 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050317) |
Jordi Mallach wrote:
>Hey there,
>
>Here's my nasty bug for this release :)
>
>(btw, was it the Silent Release, with no info-nano announcement, or did
>I totally miss the 1.3.7 mails?)
The 1.3.7 announcement was sent out, but it's still awaiting moderator
approval.
<snip>
>The problem is print1opt_full() does this at the end:
>
> printf("%s\n", _(desc));
>
>which, in the case of the "-a, -b, -e" line effectively calls
>gettext(""), which is a Bad Idea®, as the empty string is special and
>holds the gettext header in every po file. If you try to translate ""
>with gettext, you get this ugly header in your output.
Oops.
>Food for 1.3.8. :)
Not quite. I've just fixed it in CVS, and the attached patch should fix
it for 1.3.7.
diff -ur nano/src/nano.c nano-fixed/src/nano.c
--- nano/src/nano.c 2005-03-30 13:11:59.000000000 -0500
+++ nano-fixed/src/nano.c 2005-04-13 23:11:10.000000000 -0400
@@ -997,7 +997,9 @@
printf("\t");
#endif
- printf("%s\n", _(desc));
+ if (desc != NULL)
+ printf("%s", _(desc));
+ printf("\n");
}
void usage(void)
@@ -1074,7 +1076,7 @@
print1opt("-z", "--suspend", N_("Enable suspend"));
/* This is a special case. */
- print1opt("-a, -b, -e,", "", "");
+ print1opt("-a, -b, -e,", "", NULL);
print1opt("-f, -g, -j", "", _("(ignored, for Pico compatibility)"));
exit(0);