[Cluster-devel] [PATCH 1/3] gfs2_convert: Add i18n support

Steven Whitehouse swhiteho at redhat.com
Tue Jul 5 14:56:46 UTC 2011


Hi,

Also looks good,

Steve.

On Tue, 2011-07-05 at 11:41 -0300, Carlos Maiolino wrote:
> Add the headers and macros needed to i18n support into gfs2_convert.
> ---
>  gfs2/convert/gfs2_convert.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
> index 20cca80..b47bbb7 100644
> --- a/gfs2/convert/gfs2_convert.c
> +++ b/gfs2/convert/gfs2_convert.c
> @@ -23,6 +23,9 @@
>  #include <sys/time.h>
>  #include <errno.h>
>  #include <ctype.h>
> +#include <libintl.h>
> +#include <locale.h>
> +#define _(String) gettext(String)
>  
>  #include <linux/types.h>
>  #include <linux/gfs2_ondisk.h>
> @@ -2112,6 +2115,10 @@ int main(int argc, char **argv)
>  	struct gfs2_buffer_head *bh;
>  	struct gfs2_options opts;
>  
> +	/* Set i18n support to gfs2_convert */
> +	setlocale(LC_ALL, "");
> +	textdomain("gfs2-utils");
> +
>  	version();
>  	process_parameters(argc, argv, &opts);
>  	error = init(&sb2);





More information about the Cluster-devel mailing list