From faf262e2a97fe0d4ae63949381af62012606e9ef Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 15 Jul 2010 18:22:34 +0300 Subject: EXT-8373 FIXED Fixed translation of attachment points in "Attach..." / "Attach To..." menus (AE and inventory). There is an on_enable callback set for the menu items. It tries adding a suffix like "(obj_name)" if there is already an attachment on the attachment point. No matter whether the suffix has been actually added, the callback resets the menu item label to its parameter (cbparams["label"]). The problem was that we passed the original English attachment point name to the callback, that set it as the menu item name, thus screwing up translation. The fix is to pass translated attachment point name to the on_enable callback. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/768/ --HG-- branch : product-engine --- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llviewerattachmenu.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7ec6440dc3..578c68410b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4134,7 +4134,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } LLSD cbparams; cbparams["index"] = curiter->first; - cbparams["label"] = attachment->getName(); + cbparams["label"] = p.name; p.on_click.function_name = "Inventory.AttachObject"; p.on_click.parameter = LLSD(attachment->getName()); p.on_enable.function_name = "Attachment.Label"; diff --git a/indra/newview/llviewerattachmenu.cpp b/indra/newview/llviewerattachmenu.cpp index f7f5ec72fd..f683bd8674 100644 --- a/indra/newview/llviewerattachmenu.cpp +++ b/indra/newview/llviewerattachmenu.cpp @@ -84,7 +84,7 @@ void LLViewerAttachMenu::populateMenus(const std::string& attach_to_menu_name, c LLSD cbparams; cbparams["index"] = curiter->first; - cbparams["label"] = attachment->getName(); + cbparams["label"] = p.name; p.on_click.function_name = "Object.Attach"; p.on_click.parameter = LLSD(attachment->getName()); p.on_enable.function_name = "Attachment.Label"; -- cgit v1.2.3