triage#112 'No emoji found for' text is not translated to other languages in the 'Choose Emoji' floater

master
Alexander Gavriliuk 2024-03-22 20:50:33 +01:00 committed by Guru
parent 007d92b50e
commit 6e9cccedb5
2 changed files with 8 additions and 3 deletions

View File

@ -40,6 +40,7 @@
#include "llscrolllistitem.h"
#include "llsdserialize.h"
#include "lltextbox.h"
#include "lltrans.h"
#include "llviewerchat.h"
namespace {
@ -388,9 +389,12 @@ void LLFloaterEmojiPicker::initialize()
}
else
{
const std::string prompt("No emoji found for ");
std::string title(prompt + '"' + mFilterPattern.substr(1) + '"');
mPreview->setData(EMPTY_LIST_IMAGE_INDEX, title, prompt.size() + 1, title.size() - 1);
std::size_t begin, end;
LLStringUtil::format_map_t args;
args["[FILTER]"] = mFilterPattern.substr(1);
std::string title(getString("text_no_emoji_for_filter", args));
LLEmojiDictionary::searchInShortCode(begin, end, title, mFilterPattern);
mPreview->setData(EMPTY_LIST_IMAGE_INDEX, title, begin, end);
showPreview(true);
}
return;

View File

@ -15,6 +15,7 @@
width="304">
<floater.string name="title_for_recently_used" value="Recently used"/>
<floater.string name="title_for_frequently_used" value="Frequently used"/>
<floater.string name="text_no_emoji_for_filter" value="No emoji found for '[FILTER]'"/>
<scroll_container
name="EmojiGridContainer"
layout="topleft"