summaryrefslogtreecommitdiff
path: root/indra/newview/lltranslate.h
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-12-09 17:59:29 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2011-12-09 17:59:29 +0200
commit702410cef75e0cc10258964b86b093f2205ef462 (patch)
tree97323ef69ed74674c92be91ef509ffe95284c3be /indra/newview/lltranslate.h
parent86847b753befbca31e4aadeff111acd398f9612d (diff)
EXP-1671 FIXED Enable/disable the translation checkbox in the nearby chat floater whenever translation preferences change.
The checkbox is also updated when the nearby chat floater is opened.
Diffstat (limited to 'indra/newview/lltranslate.h')
-rwxr-xr-xindra/newview/lltranslate.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index c2330daa81..424bc14587 100755
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -89,6 +89,11 @@ public:
std::string& detected_lang,
std::string& err_msg) const = 0;
+ /**
+ * @return if the handler is configured to function properly
+ */
+ virtual bool isConfigured() const = 0;
+
virtual ~LLTranslationAPIHandler() {}
protected:
@@ -115,6 +120,7 @@ public:
std::string& translation,
std::string& detected_lang,
std::string& err_msg) const;
+ /*virtual*/ bool isConfigured() const;
private:
static void parseErrorResponse(
@@ -148,6 +154,7 @@ public:
std::string& translation,
std::string& detected_lang,
std::string& err_msg) const;
+ /*virtual*/ bool isConfigured() const;
private:
static std::string getAPIKey();
};
@@ -275,8 +282,17 @@ public :
* @param key Key to verify.
*/
static void verifyKey(KeyVerificationReceiverPtr& receiver, const std::string& key);
+
+ /**
+ * @return translation target language
+ */
static std::string getTranslateLanguage();
+ /**
+ * @return true if translation is configured properly.
+ */
+ static bool isTranslationConfigured();
+
private:
static const LLTranslationAPIHandler& getPreferredHandler();
static const LLTranslationAPIHandler& getHandler(EService service);