summaryrefslogtreecommitdiff
path: root/indra/newview/lltranslate.h
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-03-30 00:39:12 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-03-30 00:39:12 +0300
commit7b2205d8f6cc8a42c65f36b78c6d6325e6c02ecf (patch)
tree5853f75cd500b20077b7ce37b9b03963d2c83b2a /indra/newview/lltranslate.h
parentd1b414e48b4faa8f0b6b68fc6cb16701137478fd (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
Merge branch 'main' into DRTVWR-580-maint-T
Diffstat (limited to 'indra/newview/lltranslate.h')
-rw-r--r--indra/newview/lltranslate.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index 1de5c02f74..ffbbb05e62 100644
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -30,6 +30,8 @@
#include "llbufferstream.h"
#include <boost/function.hpp>
+#include "llsingleton.h"
+
namespace Json
{
class Value;
@@ -48,8 +50,10 @@ class LLTranslationAPIHandler;
*
* API keys for translation are taken from saved settings.
*/
-class LLTranslate
+class LLTranslate: public LLSingleton<LLTranslate>
{
+ LLSINGLETON(LLTranslate);
+ ~LLTranslate();
LOG_CLASS(LLTranslate);
public :
@@ -94,9 +98,19 @@ public :
static std::string addNoTranslateTags(std::string mesg);
static std::string removeNoTranslateTags(std::string mesg);
+ void logCharsSeen(size_t count);
+ void logCharsSent(size_t count);
+ void logSuccess(S32 count);
+ void logFailure(S32 count);
+ LLSD asLLSD() const;
private:
static LLTranslationAPIHandler& getPreferredHandler();
static LLTranslationAPIHandler& getHandler(EService service);
+
+ size_t mCharsSeen;
+ size_t mCharsSent;
+ S32 mFailureCount;
+ S32 mSuccessCount;
};
#endif