summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateranimpreview.cpp
diff options
context:
space:
mode:
authorChristian Goetze <cg@lindenlab.com>2007-10-10 00:01:43 +0000
committerChristian Goetze <cg@lindenlab.com>2007-10-10 00:01:43 +0000
commit5ec8bbbe2244ea70d8aa74b5c572351632699425 (patch)
tree12a4e92720c531105a21ef4f9f363b8572d72a3a /indra/newview/llfloateranimpreview.cpp
parentb3b62c3b9ef32c4dbcae51cd3ef582734d5717bb (diff)
svn merge -r71238:71367 svn+ssh://svn/svn/linden/branches/maint-ui-qa3
Diffstat (limited to 'indra/newview/llfloateranimpreview.cpp')
-rw-r--r--indra/newview/llfloateranimpreview.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp
index 1d89a07c43..71c221775e 100644
--- a/indra/newview/llfloateranimpreview.cpp
+++ b/indra/newview/llfloateranimpreview.cpp
@@ -294,8 +294,7 @@ BOOL LLFloaterAnimPreview::postBuild()
delete mAnimPreview;
mAnimPreview = NULL;
mMotionID.setNull();
- // XUI:translate
- childSetValue("bad_animation_text", LLSD("Failed to initialize motion."));
+ childSetValue("bad_animation_text", childGetText("failed_to_initialize"));
mEnabled = FALSE;
}
}
@@ -305,18 +304,16 @@ BOOL LLFloaterAnimPreview::postBuild()
{
if (loaderp->getDuration() > MAX_ANIM_DURATION)
{
- char output_str[256]; /*Flawfinder: ignore*/
-
- snprintf(output_str, sizeof(output_str), "Animation file is %.1f seconds in length.\n\nMaximum animation length is %.1f seconds.\n", /* Flawfinder: ignore */
- loaderp->getDuration(), MAX_ANIM_DURATION);
- childSetValue("bad_animation_text", LLSD(output_str));
+ LLUIString out_str = childGetText("anim_too_long");
+ out_str.setArg("[LENGTH]", llformat("%.1f", loaderp->getDuration()));
+ out_str.setArg("[MAX_LENGTH]", llformat("%.1f", MAX_ANIM_DURATION));
+ childSetValue("bad_animation_text", out_str.getString());
}
else
{
- char* status = loaderp->getStatus();
- LLString error_string("Unable to read animation file.\n\n");
- error_string += LLString(status);
- childSetValue("bad_animation_text", LLSD(error_string));
+ LLUIString out_str = childGetText("failed_file_read");
+ out_str.setArg("[STATUS]", loaderp->getStatus()); // *TODO:Translate
+ childSetValue("bad_animation_text", out_str.getString());
}
}
@@ -1158,3 +1155,4 @@ void LLPreviewAnimation::pan(F32 right, F32 up)
mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f);
}
+