Test module translation of commands

This commit is contained in:
Alexey Sokolov
2022-07-05 00:24:38 +01:00
parent e0c05ddb63
commit 9c855b5c01
4 changed files with 57 additions and 2 deletions
+2
View File
@@ -16,6 +16,7 @@
#include <znc/Translation.h>
#include <znc/FileUtils.h>
#include <znc/znc.h>
#ifdef HAVE_I18N
#include <boost/locale.hpp>
@@ -88,6 +89,7 @@ const std::locale& CTranslation::LoadTranslation(const CString& sDomain) {
if (lang_it == domain.end()) {
boost::locale::generator gen;
gen.add_messages_path(LOCALE_DIR);
gen.add_messages_path(CZNC::Get().GetModPath() + "/locale");
gen.add_messages_domain(sDomain);
std::tie(lang_it, std::ignore) =
domain.emplace(sLanguage, gen(sLanguage + ".UTF-8"));