Benno Schulenberg <[EMAIL PROTECTED]> wrote:
> The help message of `partprobe` is not getting localized, because it 
> forgets to set its textdomain.  Attached patch fixes this.

Thank you!

> The "#if ! ENABLE_NLS" lines at the top of partprobe.c can probably 
> be removed, by the way.  And the copyright year in parted.c needs 
> an update.

I'll do that eventually, but for now, if you remove those lines,
the definitions from gettext.h provoke "warning: statement with no effect".

>>From 9ac9fa9771cc892767995af0567cb1535f9c18de Mon Sep 17 00:00:00 2001
> From: Benno Schulenberg <[EMAIL PROTECTED]>
> Date: Thu, 16 Aug 2007 14:46:07 +0200
> Subject: [PATCH] Set the textdomain for localization.
>
> Signed-off-by: Benno Schulenberg <[EMAIL PROTECTED]>
> ---
>  partprobe/partprobe.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/partprobe/partprobe.c b/partprobe/partprobe.c
> index d494384..0e9ac39 100644
> --- a/partprobe/partprobe.c
> +++ b/partprobe/partprobe.c
> @@ -166,6 +166,12 @@ main (int argc, char* argv[])
>       program_name = argv[0];
>       atexit (close_stdout);
>  
> +#ifdef ENABLE_NLS
> +     setlocale(LC_ALL, "");
> +     bindtextdomain(PACKAGE, LOCALEDIR);
> +     textdomain(PACKAGE);
> +#endif
> +

The whole point of those definitions above is so that
we don't need such in-function #ifdefs.  I've applied
your patch on the trunk, but without the #ifdef:

    setlocale(LC_ALL, "");
    bindtextdomain(PACKAGE, LOCALEDIR);
    textdomain(PACKAGE);


_______________________________________________
bug-parted mailing list
bug-parted@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-parted

Reply via email to