From a880243f34a77549478e76c0606d69c953928e45 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Thu, 15 Jul 2010 15:26:13 +0300
Subject: [PATCH] EXT-8374 FIXED Added possibility to localize "None" action
 value for Animation and Sound Actions. Also changed hardcoded "until
 animations are done" value for Wait with label from the appropriate Floater
 checkbox.

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/762/

--HG--
branch : product-engine
---
 indra/llcharacter/llmultigesture.cpp           |  8 ++++----
 indra/newview/llpreviewgesture.cpp             | 12 +++++++++++-
 indra/newview/skins/default/xui/en/strings.xml |  1 +
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp
index ee60430d97a..70a35cba8f6 100644
--- a/indra/llcharacter/llmultigesture.cpp
+++ b/indra/llcharacter/llmultigesture.cpp
@@ -293,7 +293,7 @@ BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-// *TODO: Translate
+// *NOTE: result is translated in LLPreviewGesture::getLabel()
 std::vector<std::string> LLGestureStepAnimation::getLabel() const 
 {
 	std::vector<std::string> strings;
@@ -367,7 +367,7 @@ BOOL LLGestureStepSound::deserialize(LLDataPacker& dp)
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-// *TODO: Translate
+// *NOTE: result is translated in LLPreviewGesture::getLabel()
 std::vector<std::string> LLGestureStepSound::getLabel() const
 {
 	std::vector<std::string> strings;
@@ -425,7 +425,7 @@ BOOL LLGestureStepChat::deserialize(LLDataPacker& dp)
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-// *TODO: Translate
+// *NOTE: result is translated in LLPreviewGesture::getLabel()
 std::vector<std::string> LLGestureStepChat::getLabel() const
 {
 	std::vector<std::string> strings;
@@ -479,7 +479,7 @@ BOOL LLGestureStepWait::deserialize(LLDataPacker& dp)
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-// *TODO: Translate
+// *NOTE: result is translated in LLPreviewGesture::getLabel()
 std::vector<std::string> LLGestureStepWait::getLabel() const
 {
 	std::vector<std::string> strings;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index a7b4873fedd..6f9d8a76234 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -1625,7 +1625,17 @@ std::string LLPreviewGesture::getLabel(std::vector<std::string> labels)
 		result=LLTrans::getString("AnimFlagStart");
 	}
 
-	result.append(v_labels[1]);
+	// lets localize action value
+	std::string action = v_labels[1];
+	if ("None" == action)
+	{
+		action = LLTrans::getString("GestureActionNone");
+	}
+	else if ("until animations are done" == action)
+	{
+		action = LLFloaterReg::getInstance("preview_gesture")->getChild<LLCheckBoxCtrl>("wait_anim_check")->getLabel();
+	}
+	result.append(action);
 	return result;
 	
 }
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index a63c09e300f..e5bd5490367 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1913,6 +1913,7 @@ Clears (deletes) the media and all params from the given face.
 	<string name="AnimFlagStop"  value=" Stop Animation :    " />
 	<string name="AnimFlagStart" value=" Start Animation :   " />
 	<string name="Wave"          value=" Wave " />
+	<string name="GestureActionNone" value="None" />
 	<string name="HelloAvatar"   value=" Hello, avatar! " />
 	<string name="ViewAllGestures"  value="  View All &gt;&gt;" />
 	<string name="GetMoreGestures"  value="  Get More &gt;&gt;" />
-- 
GitLab