Merged revisions 4897-4943 via svnmerge from
authorJan Kupec <jkupec@suse.cz>
Wed, 31 Jan 2007 15:26:12 +0000 (15:26 +0000)
committerJan Kupec <jkupec@suse.cz>
Wed, 31 Jan 2007 15:26:12 +0000 (15:26 +0000)
https://svn.suse.de/svn/zypp/branches/SuSE-Linux-10_2-Branch/zypper

........
  r4932 | jkupec | 2007-01-29 19:25:32 +0100 (Mon, 29 Jan 2007) | 1 line

  locale support added
........

package/zypper.changes
src/zmart.h
src/zypper.cc

index 615b5dc..ada1556 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Jan 31 16:19:38 CET 2007 - jkupec@suse.cz
+
+- locale support added (merged from 10.2/SP1 branch)
+- r4941
+
+-------------------------------------------------------------------
 Fri Jan 12 15:03:55 CET 2007 - jkupec@suse.cz
 
 - Texts corrected based on feedback from proof-reading.
index e07cc50..73163eb 100644 (file)
@@ -97,5 +97,12 @@ extern std::ostream no_stream;
 #define cerr_vv COND_STREAM(cerr,2)
 #define cout_vv COND_STREAM(cout,2)
 
+// undefine _ macro from libzypp
+#ifdef _
+#undef _
 #endif
 
+// define new _ macro
+#define _(MSG) ::gettext(MSG)
+
+#endif
index 05d1261..3a29c8e 100644 (file)
@@ -964,6 +964,11 @@ int main(int argc, char **argv)
     }
   } say_goodbye __attribute__ ((__unused__));
 
+       // set locale
+  setlocale (LC_ALL, "");
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+
   // logging
   const char *logfile = getenv("ZYPP_LOGFILE");
   if (logfile == NULL)