From e7d383be8a9734a5008690b8a7e1b179e2f2a718 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Sun, 10 Nov 2019 14:40:07 +0200 Subject: SL-6109 localization support for control table --- indra/newview/llfloaterpreference.cpp | 23 +++++++++++++--------- .../default/xui/en/control_table_contents.xml | 4 ++++ 2 files changed, 18 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 50b7f16ec7..0896493f07 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2669,21 +2669,26 @@ void LLPanelPreferenceControls::populateControlTable() return; } - std::string full_filename = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, filename); - LLSimpleXUIParser parser; + LLXMLNodePtr xmlNode; LLScrollListCtrl::Contents contents; - if (!parser.readXUI(full_filename, contents) - || !contents.validateBlock()) + if (!LLUICtrlFactory::getLayeredXMLNode(filename, xmlNode)) + { + LL_WARNS() << "Failed to load " << filename << LL_ENDL; + return; + } + LLXUIParser parser; + parser.readXUI(xmlNode, contents, filename); + + if (!contents.validateBlock()) { - LL_INFOS() << "Failed to load" << LL_ENDL; return; } - for (LLInitParam::ParamIterator::const_iterator row_it = contents.columns.begin(); - row_it != contents.columns.end(); - ++row_it) + for (LLInitParam::ParamIterator::const_iterator col_it = contents.columns.begin(); + col_it != contents.columns.end(); + ++col_it) { - pControlsTable->addColumn(*row_it); + pControlsTable->addColumn(*col_it); } LLScrollListCell::Params cell_params; diff --git a/indra/newview/skins/default/xui/en/control_table_contents.xml b/indra/newview/skins/default/xui/en/control_table_contents.xml index 288075628c..da9cceb2db 100644 --- a/indra/newview/skins/default/xui/en/control_table_contents.xml +++ b/indra/newview/skins/default/xui/en/control_table_contents.xml @@ -18,6 +18,7 @@ name="lst_ctrl3" />