diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2023-02-07 21:42:57 +0000 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-03-20 22:39:48 +0200 |
commit | 72cec2d347e9240cd08706ff5155bc29822e2ad8 (patch) | |
tree | 7ff0a94304936b79f7a535621c455bbb84fcf62f /indra/newview/llviewermessage.cpp | |
parent | dca3c83cd9f8d1ac8165707b080a420bf9a9a132 (diff) |
SL-19161 - logging of basic translation stats in ViewerStats
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 17d4f1928c..c1a9b6be80 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2426,6 +2426,7 @@ void translateSuccess(LLChat chat, LLSD toastArgs, std::string originalMsg, std: chat.mText += " (" + LLTranslate::removeNoTranslateTags(translation) + ")"; } + LLTranslate::instance().logSuccess(1); LLNotificationsUI::LLNotificationManager::instance().onChat(chat, toastArgs); } @@ -2435,6 +2436,7 @@ void translateFailure(LLChat chat, LLSD toastArgs, int status, const std::string LLStringUtil::replaceString(msg, "\n", " "); // we want one-line error messages chat.mText += " (" + msg + ")"; + LLTranslate::instance().logFailure(1); LLNotificationsUI::LLNotificationManager::instance().onChat(chat, toastArgs); } @@ -2669,6 +2671,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLSD args; chat.mOwnerID = owner_id; + LLTranslate::instance().logCharsSeen(mesg.size()); if (gSavedSettings.getBOOL("TranslateChat") && chat.mSourceType != CHAT_SOURCE_SYSTEM) { if (chat.mChatStyle == CHAT_STYLE_IRC) @@ -2678,6 +2681,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) const std::string from_lang = ""; // leave empty to trigger autodetect const std::string to_lang = LLTranslate::getTranslateLanguage(); + LLTranslate::instance().logCharsSent(mesg.size()); LLTranslate::translateMessage(from_lang, to_lang, mesg, boost::bind(&translateSuccess, chat, args, mesg, from_lang, _1, _2), boost::bind(&translateFailure, chat, args, _1, _2)); |