1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Add fwgettext util function

This commit is contained in:
rubenwardy
2021-08-19 19:13:25 +01:00
committed by GitHub
parent 3b842a7e02
commit 24b66dede0
5 changed files with 35 additions and 38 deletions

View File

@@ -299,12 +299,9 @@ void GameUI::toggleProfiler()
updateProfiler();
if (m_profiler_current_page != 0) {
wchar_t buf[255];
const wchar_t* str = wgettext("Profiler shown (page %d of %d)");
swprintf(buf, sizeof(buf) / sizeof(wchar_t), str,
m_profiler_current_page, m_profiler_max_page);
delete[] str;
showStatusText(buf);
std::wstring msg = fwgettext("Profiler shown (page %d of %d)",
m_profiler_current_page, m_profiler_max_page);
showStatusText(msg);
} else {
showTranslatedStatusText("Profiler hidden");
}