From 5ec8bbbe2244ea70d8aa74b5c572351632699425 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Wed, 10 Oct 2007 00:01:43 +0000 Subject: svn merge -r71238:71367 svn+ssh://svn/svn/linden/branches/maint-ui-qa3 --- indra/newview/llfloateranimpreview.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'indra/newview/llfloateranimpreview.cpp') 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); } + -- cgit v1.2.3