SL-14303 Wearable type label should contain translated intead of default string

Startup has two initStrings calls, only after second one LLtrans will return properly translated calls, but we don't want 'translated' for logging, so modified logging to not use getTypeLabel.
meow-7.2.2
Andrey Kleshchev 2020-11-13 14:58:14 +02:00
parent 92af5af736
commit 6397badddd
4 changed files with 9 additions and 10 deletions

View File

@ -99,7 +99,7 @@ private:
}
const LLAssetType::EType mAssetType;
const std::string mLabel;
const std::string mDefaultNewName; //keep mLabel for backward compatibility
const std::string mDefaultNewName;
LLInventoryType::EIconName mIconName;
BOOL mDisableCameraSwitch;
BOOL mAllowMultiwear;

View File

@ -957,7 +957,7 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L
// runway skip here?
}
LL_INFOS() << "HP " << holder->index() << " recovered item link for type " << type << LL_ENDL;
LL_INFOS("Avatar") << "HP " << holder->index() << " recovered item link for type " << type << LL_ENDL;
holder->eraseTypeToLink(type);
// Add wearable to FoundData for actual wearing
LLViewerInventoryItem *item = gInventory.getItem(item_id);
@ -1021,8 +1021,8 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type
// Try to recover by replacing missing wearable with a new one.
LLNotificationsUtil::add("ReplacedMissingWearable");
LL_DEBUGS() << "Wearable " << LLWearableType::getInstance()->getTypeLabel(type)
<< " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
LL_DEBUGS("Avatar") << "Wearable of type '" << LLWearableType::getInstance()->getTypeName(type)
<< "' could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
// Add a new one in the lost and found folder.

View File

@ -802,10 +802,6 @@ bool LLAppViewer::init()
if (!initConfiguration())
return false;
// initialize LLWearableType translation bridge.
// Will immediately use LLTranslationBridge to init LLWearableDictionary
LLWearableType::initParamSingleton(trans);
LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ;
//set the max heap size.
@ -869,6 +865,10 @@ bool LLAppViewer::init()
// Setup LLTrans after LLUI::initClass has been called.
initStrings();
// initialize LLWearableType translation bridge.
// Will immediately use LLTranslationBridge to init LLWearableDictionary
LLWearableType::initParamSingleton(trans);
// Setup notifications after LLUI::initClass() has been called.
LLNotifications::instance();
LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;

View File

@ -241,8 +241,7 @@ LLViewerWearable* LLWearableList::createNewWearable( LLWearableType::EType type,
LLViewerWearable *wearable = generateNewWearable();
wearable->setType( type, avatarp );
// LLWearableType has pre-translated getTypeLabel(), but it uses default translation
std::string name = LLTrans::getString( LLWearableType::getInstance()->getTypeDefaultNewName(wearable->getType()) );
std::string name = LLWearableType::getInstance()->getTypeLabel(wearable->getType());
wearable->setName( name );
LLPermissions perm;