cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/3] gfs2_convert: Add i18n support
@ 2011-07-05 14:41 Carlos Maiolino
  2011-07-05 14:41 ` [Cluster-devel] [PATCH 2/3] gfs2_convert: set translatable strings Carlos Maiolino
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Carlos Maiolino @ 2011-07-05 14:41 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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);
-- 
1.7.5.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-05 14:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05 14:41 [Cluster-devel] [PATCH 1/3] gfs2_convert: Add i18n support Carlos Maiolino
2011-07-05 14:41 ` [Cluster-devel] [PATCH 2/3] gfs2_convert: set translatable strings Carlos Maiolino
2011-07-05 14:56   ` Steven Whitehouse
2011-07-05 14:41 ` [Cluster-devel] [PATCH 3/3] i18n support: Add gfs2_convert to translatable list Carlos Maiolino
2011-07-05 14:56   ` Steven Whitehouse
2011-07-05 14:56 ` [Cluster-devel] [PATCH 1/3] gfs2_convert: Add i18n support Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).