1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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");
}