diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-07-15 12:14:34 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-07-15 12:14:34 -0600 |
commit | d9512674678bbb80b8d0d9c5105f56dbd1b2252b (patch) | |
tree | c3c8d64c683cd46d9d1e5d953dc6caca22213db4 /indra/newview/lltranslate.cpp | |
parent | d31e6735370711088f01cff448aa22f71c4c10c4 (diff) | |
parent | 44c7c6feaa824f4049d326965cb066e76ebefee3 (diff) |
Merge from viewer-development
Diffstat (limited to 'indra/newview/lltranslate.cpp')
-rw-r--r-- | indra/newview/lltranslate.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 011aa47e31..2f60b6b90b 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -28,12 +28,14 @@ #include "lltranslate.h" +#include <curl/curl.h> + #include "llbufferstream.h" #include "llui.h" #include "llversioninfo.h" #include "llviewercontrol.h" -#include "jsoncpp/reader.h" +#include "reader.h" // These two are concatenated with the language specifiers to form a complete Google Translate URL const char* LLTranslate::m_GoogleURL = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q="; @@ -76,7 +78,9 @@ void LLTranslate::translateMessage(LLHTTPClient::ResponderPtr &result, const std //static void LLTranslate::getTranslateUrl(std::string &translate_url, const std::string &from_lang, const std::string &to_lang, const std::string &mesg) { - std::string escaped_mesg = curl_escape(mesg.c_str(), mesg.size()); + char * curl_str = curl_escape(mesg.c_str(), mesg.size()); + std::string const escaped_mesg(curl_str); + curl_free(curl_str); translate_url = m_GoogleURL + escaped_mesg + m_GoogleLangSpec |