bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'partprobe' forgets to set the textdomain [patch]


From: Jim Meyering
Subject: Re: 'partprobe' forgets to set the textdomain [patch]
Date: Thu, 16 Aug 2007 16:48:47 +0200

Benno Schulenberg <address@hidden> 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 <address@hidden>
> Date: Thu, 16 Aug 2007 14:46:07 +0200
> Subject: [PATCH] Set the textdomain for localization.
>
> Signed-off-by: Benno Schulenberg <address@hidden>
> ---
>  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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]