From d99e4df232b4383fd06870665764d7d1d428829f Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Tue, 31 Dec 2024 16:11:43 -0500 Subject: [PATCH] Search for wxLocale correctly Object needs to be created to initialize this. --- src/cpp_i18n_review.cpp | 2 +- src/i18n_review.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp_i18n_review.cpp b/src/cpp_i18n_review.cpp index a3b8067..bdd3fb4 100644 --- a/src/cpp_i18n_review.cpp +++ b/src/cpp_i18n_review.cpp @@ -52,7 +52,7 @@ namespace i18n_check { m_wx_info.m_wxuilocale_initialized = true; } - if (cppBuffer.find(L"wxLocale::Init()") != std::wstring::npos) + if (cppBuffer.find(L"wxLocale") != std::wstring::npos) { m_wx_info.m_wxlocale_initialized = true; } diff --git a/src/i18n_review.cpp b/src/i18n_review.cpp index f67150f..fac069f 100644 --- a/src/i18n_review.cpp +++ b/src/i18n_review.cpp @@ -1255,7 +1255,7 @@ namespace i18n_check if (is_verbose() && !m_wx_info.m_wxlocale_initialized) { m_wx_info.m_app_init_info.m_usage.m_value = - _WXTRANS_WSTR(L"wxLocale::Init() should be called from your OnInit() " + _WXTRANS_WSTR(L"A wxLocale object should be constructed from your OnInit() " "function if you rely on C runtime functions to be localized."); m_suspect_i18n_usage.push_back(m_wx_info.m_app_init_info); }