From 4e20a18f5c43d18f923e1c7e8f44cc293337f87d Mon Sep 17 00:00:00 2001 From: minerjr Date: Wed, 24 Jun 2026 03:30:06 -0300 Subject: [PATCH] Omnifilter - Added translation support for Default rule set Added new entry into strings.xml named OmnifilterDefaultName that now contains Default name for the rule set drop down 0 index value. Added translocation lookup when index = 0 on the reloadrules() methods. --- indra/newview/omnifilter.cpp | 7 +++++-- indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/omnifilter.cpp b/indra/newview/omnifilter.cpp index 88e649d9ba..9abd33c912 100644 --- a/indra/newview/omnifilter.cpp +++ b/indra/newview/omnifilter.cpp @@ -32,6 +32,7 @@ #include "llviewercontrol.h" // Needed for gSavedSettings #include "llnotificationsutil.h" // Needed for Notifications #include "llfloaterreg.h" // Needed for LLFloaterReg::showInstance +#include "lltrans.h" // Needed for LLTrans::getString #include "fsscrolllistctrl.h" @@ -489,7 +490,8 @@ void Omnifilter::reloadRules() const std::string needle_rule_set_name(instance->getOrderedRuleSetName(index)); LLSD value(index); // And add to the UI element. The value is the value that is passed along with the commit callback method. - mRuleSetsCmb->add(needle_rule_set_name, value); + // If index is 0, use the translated Default text + mRuleSetsCmb->add(index == 0 ? LLTrans::getString("OmnifilterDefaultName") : needle_rule_set_name, value); } // Finally, select the stored rule set mRuleSetsCmb->selectByValue(LLSD(current_rule_set_id)); @@ -851,7 +853,8 @@ void OmnifilterMenuPanel::reloadRules() const std::string needle_rule_set_name(instance->getOrderedRuleSetName(index)); LLSD value(index); // And add to the UI element. The value is the value that is passed along with the commit callback method. - mRuleSetsCmb->add(needle_rule_set_name, value); + // If index is 0, use the translated Default text + mRuleSetsCmb->add(index == 0 ? LLTrans::getString("OmnifilterDefaultName") : needle_rule_set_name, value); } // Finally, select the stored rule set mRuleSetsCmb->selectByValue(LLSD(current_rule_set_id)); diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 924533d748..41794eecf8 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3374,6 +3374,7 @@ Your current position: [AVATAR_POS] Maximum Omnifilter Replacement: [REPLACEMENT] + Default Mini Full