soc.2009.transport: ee229ad4: added support for gettext
hanzz at soc.pidgin.im
hanzz at soc.pidgin.im
Tue Jun 2 04:30:58 EDT 2009
-----------------------------------------------------------------
Revision: ee229ad4b2b3ecc0538b176a754e0deefb256131
Ancestor: 473ba981f7d82ac5729ee370d11d23f90643e856
Author: hanzz at soc.pidgin.im
Date: 2009-06-01T12:40:55
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/ee229ad4b2b3ecc0538b176a754e0deefb256131
Modified files:
main.cpp main.h sql.cpp
ChangeLog:
added support for gettext
-------------- next part --------------
============================================================
--- main.cpp bc969b37b0ea611f451ec9e9aed65a21fc4b7a1e
+++ main.cpp c7de265b1082b2bf6c8d896d2267e4a082ef21c4
@@ -162,7 +162,7 @@ static void * requestInput(const char *t
else {
if (primaryString=="Authorization Request Message:") {
Log().Get("purple") << "accepting this authorization request";
- ((PurpleRequestInputCb) ok_cb)(user_data,"Please authorize me.");
+ ((PurpleRequestInputCb) ok_cb)(user_data,_("Please authorize me."));
}
else if ( primaryString == "Set your Facebook status" ) {
Log().Get("purple") << "set facebook status";
@@ -1161,9 +1161,10 @@ GlooxMessageHandler* GlooxMessageHandler
GlooxMessageHandler* GlooxMessageHandler::m_pInstance = NULL;
-int main( int argc, char* argv[] )
-{
-
- GlooxMessageHandler t;
+int main( int argc, char* argv[] ) {
+ GlooxMessageHandler t;
+ setlocale( LC_ALL, "" );
+ bindtextdomain( "jabbimtransport", "/usr/share/locale" );
+ textdomain( "jabbimtransport" );
}
============================================================
--- main.h cf903376b5aafefc4e4aa6a11bc65d7819574dc8
+++ main.h 310864c7991695d48dd28fa203dc3e44c4ebc134
@@ -57,7 +57,11 @@
#include "request.h"
#include "ft.h"
+#include <libintl.h>
+#include <locale.h>
+
#define HIICQ_UI "hiicq"
+#define _(STRING) gettext(STRING)
#include "registerhandler.h"
#include "discoinfohandler.h"
============================================================
--- sql.cpp f18d3646aeb81adf428f2e4e5c3817aca8ac4f99
+++ sql.cpp 4c53aa5cc93ea9b8c04b618d2a46cfe082ae936b
@@ -31,8 +31,8 @@ bool SQLClass::isVIP(const std::string &
}
bool SQLClass::isVIP(const std::string &jid){
-// if (!vipSQL->connected())
-// return true;
+ if (!vipSQL->connected())
+ return true;
mysqlpp::Query query = vipSQL->query();
#if MYSQLPP_HEADER_VERSION < 0x030000
mysqlpp::Result res;
More information about the Commits
mailing list