if (!m_defaultlocale) {
m_defaultlocale = attribute.value;
NormalizeString(m_defaultlocale);
- if( I18n::DB::I18nDAOReadOnly::IsValidSubTag
- (attribute.value, RECORD_TYPE_LANGUAGE)) {
- _D("Default Locale Found %ls", (*m_defaultlocale).c_str());
+ std::string dl = DPL::ToUTF8String(*m_defaultlocale);
+
+ if (!LanguageSubtagRstTreeSingleton::Instance().
+ ValidateLanguageTag(dl)) {
+ _W("Language tag: %s is not valid", dl.c_str());
+ m_defaultlocale = DPL::OptionalString::Null;
} else {
- _W("Default Locate Is Invalid");
+ _D("Default locale found %s", dl.c_str());
}
} else {
_W("Ignoring subsequent default locale");
}
-
//Any other value consider as a namespace definition
} else if (attribute.name == L"xmlns" || attribute.prefix == L"xmlns") {
_D("Namespace domain: %ls", attribute.name.c_str());
${PROJECT_SOURCE_DIR}/src/configuration_parser/ignoring_parser.cpp
${PROJECT_SOURCE_DIR}/src/configuration_parser/deny_all_parser.cpp
${PROJECT_SOURCE_DIR}/src/configuration_parser/libiriwrapper.cpp
+ ${PROJECT_SOURCE_DIR}/src/wrt-installer/language_subtag_rst_tree.cpp
)
PKG_CHECK_MODULES(WRT_BACKLIB_PKGS
pkgmgr
dlog
libpcrecpp
+ wrt-commons-i18n-dao-ro
REQUIRED)
INCLUDE_DIRECTORIES(
${WRT_INSTALLER_DIR}/wrt_installer_api.cpp
${WRT_INSTALLER_DIR}/installer_callbacks_translate.cpp
${WRT_INSTALLER_DIR}/plugin_utils.cpp
-# ${WRT_INSTALLER_DIR}/language_subtag_rst_tree.cpp
+ ${WRT_INSTALLER_DIR}/language_subtag_rst_tree.cpp
${WRT_INSTALLER_DIR}/installer_main_thread.cpp
${WRT_INSTALLER_DIR}/option_parser.cpp
${PKG_MANAGER_DIR}/pkgmgr_signal.cpp
std::string(GlobalConfig::GetVCoreDatabaseFilePath()));
InstallerMainThreadSingleton::Instance().AttachDatabases();
- I18n::DB::Interface::attachDatabaseRO();
_D("Prepare libxml2 to work in multithreaded program.");
xmlInitParser();
-// // Initialize Language Subtag registry
-// LanguageSubtagRstTreeSingleton::Instance().Initialize();
+ // Initialize Language Subtag registry
+ LanguageSubtagRstTreeSingleton::Instance().Initialize();
// Installer init
CONTROLLER_POST_SYNC_EVENT(
TerminateEvent());
InstallerMainThreadSingleton::Instance().DetachDatabases();
- I18n::DB::Interface::detachDatabase();
// This must be done after DetachDatabase
ValidationCore::VCoreDeinit();