Show the layer name in the history dialog when adding a new layer from the 'new layer...
[synfig.git] / synfig-studio / trunk / src / synfigapp / actions / valuedesclink.cpp
index 202e1dd..a3ec049 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -34,6 +35,8 @@
 #include <synfigapp/canvasinterface.h>
 #include <synfig/valuenode_const.h>
 
+#include <synfigapp/general.h>
+
 #endif
 
 using namespace std;
@@ -46,7 +49,7 @@ using namespace Action;
 
 ACTION_INIT(Action::ValueDescLink);
 ACTION_SET_NAME(Action::ValueDescLink,"value_desc_link");
-ACTION_SET_LOCAL_NAME(Action::ValueDescLink,"Link");
+ACTION_SET_LOCAL_NAME(Action::ValueDescLink,N_("Link"));
 ACTION_SET_TASK(Action::ValueDescLink,"connect");
 ACTION_SET_CATEGORY(Action::ValueDescLink,Action::CATEGORY_VALUEDESC);
 ACTION_SET_PRIORITY(Action::ValueDescLink,0);
@@ -203,9 +206,9 @@ Action::ValueDescLink::set_param(const synfig::String& name, const Action::Param
                {
                        // Everything must be of the same type
                        poison=true;
-                       status_message = (_("Cannot link two values of different types ('") +
-                                                         value_desc.get_value().type_name() + _("' and '") +
-                                                         value_desc_list.front().get_value().type_name() +_("')"));
+                       status_message = (strprintf(_("Cannot link two values of different types ('%s' and '%s')"),
+                                                                               ValueBase::type_local_name(value_desc.get_value_type()).c_str(),
+                                                                               ValueBase::type_local_name(value_desc_list.front().get_value_type()).c_str()));
                        return false;
                }