summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-15 18:22:34 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-15 18:22:34 +0300
commitfaf262e2a97fe0d4ae63949381af62012606e9ef (patch)
treefa49cebcf8ca6fb237e6b850911514dc4d2dab93
parentee19ef5486899028b6ed6307f220daff72a27338 (diff)
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
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llviewerattachmenu.cpp2
2 files changed, 2 insertions, 2 deletions
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";