Use translated versions of the type names everywhere other than in the .sif(z) files.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 10 Jan 2008 18:57:13 +0000 (18:57 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 10 Jan 2008 18:57:13 +0000 (18:57 +0000)
git-svn-id: http://svn.voria.com/code@1315 1f10aa63-cdf2-0310-b900-c93c546f37ac

30 files changed:
synfig-core/trunk/src/modules/mod_noise/valuenode_random.cpp
synfig-core/trunk/src/synfig/loadcanvas.cpp
synfig-core/trunk/src/synfig/savecanvas.cpp
synfig-core/trunk/src/synfig/valuenode.cpp
synfig-core/trunk/src/synfig/valuenode.h
synfig-core/trunk/src/synfig/valuenode_add.cpp
synfig-core/trunk/src/synfig/valuenode_animated.cpp
synfig-core/trunk/src/synfig/valuenode_atan2.cpp
synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp
synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp
synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp
synfig-core/trunk/src/synfig/valuenode_composite.cpp
synfig-core/trunk/src/synfig/valuenode_cos.cpp
synfig-core/trunk/src/synfig/valuenode_exp.cpp
synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp
synfig-core/trunk/src/synfig/valuenode_integer.cpp
synfig-core/trunk/src/synfig/valuenode_linear.cpp
synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp
synfig-core/trunk/src/synfig/valuenode_range.cpp
synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp
synfig-core/trunk/src/synfig/valuenode_scale.cpp
synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp
synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp
synfig-core/trunk/src/synfig/valuenode_sine.cpp
synfig-core/trunk/src/synfig/valuenode_stripes.cpp
synfig-core/trunk/src/synfig/valuenode_subtract.cpp
synfig-core/trunk/src/synfig/valuenode_timedswap.cpp
synfig-core/trunk/src/synfig/valuenode_twotone.cpp
synfig-studio/trunk/src/synfigapp/actions/valuedesclink.cpp
synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp

index 24bfe23..4b7255e 100644 (file)
@@ -83,7 +83,7 @@ ValueNode_Random::ValueNode_Random(const ValueBase &value):
                set_link("link",ValueNode_Const::create(value.get(Vector())));
                break;
        default:
-               throw Exception::BadType(ValueBase::type_name(get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(get_type()));
        }
 
        DCAST_HACK_ENABLE();
index 5e5d0d3..1b4a68c 100644 (file)
@@ -889,7 +889,7 @@ CanvasParser::parse_animated(xmlpp::Element *element,Canvas::Handle canvas)
 
        if(!value_node)
        {
-               error(element,strprintf(_("Unable to create <animated> with type \"%s\""),ValueBase::type_name(type).c_str()));
+               error(element,strprintf(_("Unable to create <animated> with type \"%s\""),ValueBase::type_local_name(type).c_str()));
                return ValueNode_Animated::Handle();
        }
 
@@ -1198,8 +1198,8 @@ CanvasParser::parse_linkable_value_node(xmlpp::Element *element,Canvas::Handle c
                        else
                        if(!value_node->set_link(index,link))
                        {
-                               //error(dynamic_cast<xmlpp::Element*>(*iter),strprintf("Unable to connect value node ('%s' of type '%s') to link %d",link->get_name().c_str(),ValueBase::type_name(link->get_type()).c_str(),index));
-                               error(element,strprintf("Unable to connect value node ('%s' of type '%s') to link %d",link->get_name().c_str(),ValueBase::type_name(link->get_type()).c_str(),index));
+                               //error(dynamic_cast<xmlpp::Element*>(*iter),strprintf(_("Unable to connect value node ('%s' of type '%s') to link %d"),link->get_name().c_str(),ValueBase::type_local_name(link->get_type()).c_str(),index));
+                               error(element,strprintf(_("Unable to connect value node ('%s' of type '%s') to link %d"),link->get_name().c_str(),ValueBase::type_local_name(link->get_type()).c_str(),index));
                        }
 
                        // \todo do a search for more elements and warn if they are found
index 0b4468d..645895c 100644 (file)
@@ -248,7 +248,7 @@ xmlpp::Element* encode_value(xmlpp::Element* root,const ValueBase &data,Canvas::
                root->set_name("nil");
                return root;
        default:
-               synfig::error(strprintf("Unknown value(%s), cannot create XML representation!",ValueBase::type_name(data.get_type()).c_str()));
+               synfig::error(strprintf(_("Unknown value(%s), cannot create XML representation!"),ValueBase::type_local_name(data.get_type()).c_str()));
                root->set_name("nil");
                return root;
        }
index 2611392..dce62ab 100644 (file)
@@ -165,19 +165,19 @@ ValueNode::subsys_stop()
                for(iter=global_value_node_map.begin();iter!=global_value_node_map.end();++iter)
                {
                        if(!iter->second->is_exported())
-                               synfig::info("%s: count:%d name:%s type:%s",
+                               synfig::info(_("%s: count:%d name:%s type:%s"),
                                        iter->first.get_string().c_str(),
                                        iter->second->count(),
                                        iter->second->get_name().c_str(),
-                                       ValueBase::type_name(iter->second->get_type()).c_str()
+                                       ValueBase::type_local_name(iter->second->get_type()).c_str()
                                );
                        else
-                               synfig::info("%s: id:%s count:%d name:%s type:%s",
+                               synfig::info(_("%s: id:%s count:%d name:%s type:%s"),
                                        iter->first.get_string().c_str(),
                                        iter->second->get_id().c_str(),
                                        iter->second->count(),
                                        iter->second->get_name().c_str(),
-                                       ValueBase::type_name(iter->second->get_type()).c_str()
+                                       ValueBase::type_local_name(iter->second->get_type()).c_str()
                                );
                }
        }
index 4f91873..4d2c778 100644 (file)
        if (get_type() != ValueBase::TYPE_NIL &&                                                        \
                !(ValueBase::same_type_as(value->get_type(), type)) &&                  \
                !PlaceholderValueNode::Handle::cast_dynamic(value)) {                   \
-               error("%s:%d wrong type for %s: need %s but got %s",                    \
+               error(_("%s:%d wrong type for %s: need %s but got %s"),                 \
                          __FILE__, __LINE__,                                                                           \
                          link_local_name(i).c_str(),                                                           \
-                         ValueBase::type_name(type).c_str(),                                           \
-                         ValueBase::type_name(value->get_type()).c_str());             \
+                         ValueBase::type_local_name(type).c_str(),                                     \
+                         ValueBase::type_local_name(value->get_type()).c_str());       \
                return false;                                                                                                   \
        }                                                                                                                                       \
        variable = value;                                                                                                       \
index e11fc21..d5cc0b0 100644 (file)
@@ -90,7 +90,7 @@ synfig::ValueNode_Add::ValueNode_Add(const ValueBase &value):
                break;
        default:
                assert(0);
-               throw runtime_error("synfig::ValueNode_Add:Bad type "+ValueBase::type_name(id));
+               throw runtime_error(_("synfig::ValueNode_Add:Bad type ")+ValueBase::type_local_name(id));
        }
 }
 
index 56ac9c3..b6f9189 100644 (file)
@@ -1054,7 +1054,7 @@ synfig::ValueNode_Animated::create(ValueBase::Type type)
                default:
                        throw
                                Exception::BadType(strprintf(_("%s: You cannot use a %s in an animated ValueNode"),"synfig::ValueNode_Animated::create()",
-                                       ValueBase::type_name(type).c_str())
+                                       ValueBase::type_local_name(type).c_str())
                                );
                        break;
        }
index 4425539..c3e6097 100644 (file)
@@ -60,7 +60,7 @@ ValueNode_Atan2::ValueNode_Atan2(const ValueBase &value):
                set_link("y",ValueNode_Const::create(Angle::sin(value.get(Angle())).get()));
                break;
        default:
-               throw Exception::BadType(ValueBase::type_name(value.get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(value.get_type()));
        }
 
        DCAST_HACK_ENABLE();
index 36eced5..822de68 100644 (file)
@@ -59,7 +59,7 @@ ValueNode_BLineCalcTangent::ValueNode_BLineCalcTangent(const ValueBase::Type &x)
        LinkableValueNode(x)
 {
        if(x!=ValueBase::TYPE_ANGLE && x!=ValueBase::TYPE_VECTOR)
-               throw Exception::BadType(ValueBase::type_name(x));
+               throw Exception::BadType(ValueBase::type_local_name(x));
 
        ValueNode_BLine* value_node(new ValueNode_BLine());
        set_link("bline",value_node);
index 1d4ae12..83e2552 100644 (file)
@@ -58,7 +58,7 @@ ValueNode_BLineCalcVertex::ValueNode_BLineCalcVertex(const ValueBase::Type &x):
        LinkableValueNode(x)
 {
        if(x!=ValueBase::TYPE_VECTOR)
-               throw Exception::BadType(ValueBase::type_name(x));
+               throw Exception::BadType(ValueBase::type_local_name(x));
 
        ValueNode_BLine* value_node(new ValueNode_BLine());
        set_link("bline",value_node);
index 02e794d..f51e5a1 100644 (file)
@@ -64,7 +64,7 @@ ValueNode_BLineRevTangent::ValueNode_BLineRevTangent(const ValueNode::Handle &x)
        LinkableValueNode(x->get_type())
 {
        if(x->get_type()!=ValueBase::TYPE_BLINEPOINT)
-               throw Exception::BadType(ValueBase::type_name(x->get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(x->get_type()));
 
        set_link("reference",x);
        set_link("reverse",ValueNode_Const::create(bool(false)));
index 327ed9a..43c3fa0 100644 (file)
@@ -88,7 +88,7 @@ synfig::ValueNode_Composite::ValueNode_Composite(const ValueBase &value):
                }
                default:
                        assert(0);
-                       throw Exception::BadType(ValueBase::type_name(get_type()));
+                       throw Exception::BadType(ValueBase::type_local_name(get_type()));
        }
 }
 
index 6b08859..13f583d 100644 (file)
@@ -60,7 +60,7 @@ ValueNode_Cos::ValueNode_Cos(const ValueBase &value):
                set_link("amp",ValueNode_Const::create(value.get(Real())));
                break;
        default:
-               throw Exception::BadType(ValueBase::type_name(value.get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(value.get_type()));
        }
 
        DCAST_HACK_ENABLE();
index 59ccd64..3cd4719 100644 (file)
@@ -59,7 +59,7 @@ ValueNode_Exp::ValueNode_Exp(const ValueBase &value):
                set_link("scale",ValueNode_Const::create(value.get(Real())));
                break;
        default:
-               throw Exception::BadType(ValueBase::type_name(value.get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(value.get_type()));
        }
 
        DCAST_HACK_ENABLE();
index 139de98..0fbfe33 100644 (file)
@@ -73,7 +73,7 @@ ValueNode_GradientRotate::create(const ValueBase& x)
        if(id!=ValueBase::TYPE_GRADIENT)
        {
                assert(0);
-               throw runtime_error("synfig::ValueNode_GradientRotate:Bad type "+ValueBase::type_name(id));
+               throw runtime_error(_("synfig::ValueNode_GradientRotate:Bad type ")+ValueBase::type_local_name(id));
        }
 
        ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate(x.get(Gradient()));
index 1040c9a..a9becdd 100644 (file)
@@ -75,7 +75,7 @@ ValueNode_Integer::ValueNode_Integer(const ValueBase &x):
                break;
        default:
                assert(0);
-               throw runtime_error("synfig::ValueNode_Integer:Bad type "+ValueBase::type_name(x.get_type()));
+               throw runtime_error(_("synfig::ValueNode_Integer:Bad type ")+ValueBase::type_local_name(x.get_type()));
        }
 }
 
@@ -171,7 +171,7 @@ ValueNode_Integer::operator()(Time t)const
                return Time(integer);
        default:
                assert(0);
-               throw runtime_error("synfig::ValueNode_Integer:Bad type "+ValueBase::type_name(get_type()));
+               throw runtime_error(_("synfig::ValueNode_Integer:Bad type ")+ValueBase::type_local_name(get_type()));
        }
 }
 
index a0484a0..d487b7b 100644 (file)
@@ -82,7 +82,7 @@ ValueNode_Linear::ValueNode_Linear(const ValueBase &value):
                set_link("offset",ValueNode_Const::create(value.get(Vector())));
                break;
        default:
-               throw Exception::BadType(ValueBase::type_name(get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(get_type()));
        }
 
        DCAST_HACK_ENABLE();
index 6ab24e4..4dee768 100644 (file)
@@ -71,7 +71,7 @@ synfig::ValueNode_RadialComposite::ValueNode_RadialComposite(const ValueBase &va
                        break;
                default:
                        assert(0);
-                       throw Exception::BadType(ValueBase::type_name(get_type()));
+                       throw Exception::BadType(ValueBase::type_local_name(get_type()));
        }
 }
 
index 86fea4b..1333f3d 100644 (file)
@@ -83,7 +83,7 @@ synfig::ValueNode_Range::ValueNode_Range(const ValueBase &value):
                break;
        default:
                assert(0);
-               throw runtime_error("synfig::ValueNode_Range:Bad type "+ValueBase::type_name(id));
+               throw runtime_error(_("synfig::ValueNode_Range:Bad type ")+ValueBase::type_local_name(id));
        }
 
        assert(min_->get_type()==id);
index 181815f..3bfb804 100644 (file)
@@ -78,7 +78,7 @@ ValueNode_Repeat_Gradient::create(const ValueBase& x)
        if(id!=ValueBase::TYPE_GRADIENT)
        {
                assert(0);
-               throw runtime_error("synfig::ValueNode_Repeat_Gradient:Bad type "+ValueBase::type_name(id));
+               throw runtime_error(_("synfig::ValueNode_Repeat_Gradient:Bad type ")+ValueBase::type_local_name(id));
        }
 
        ValueNode_Repeat_Gradient* value_node=new ValueNode_Repeat_Gradient(x.get(Gradient()));
index 9c2924a..dbe3b85 100644 (file)
@@ -84,7 +84,7 @@ ValueNode_Scale::ValueNode_Scale(const ValueBase &value):
                break;
        default:
                assert(0);
-               throw runtime_error("synfig::ValueNode_Scale:Bad type "+ValueBase::type_name(value.get_type()));
+               throw runtime_error(_("synfig::ValueNode_Scale:Bad type ")+ValueBase::type_local_name(value.get_type()));
        }
 
        assert(value_node);
index b875c62..9e05001 100644 (file)
@@ -59,7 +59,7 @@ ValueNode_SegCalcTangent::ValueNode_SegCalcTangent(const ValueBase::Type &x):
        LinkableValueNode(x)
 {
        if(x!=ValueBase::TYPE_VECTOR)
-               throw Exception::BadType(ValueBase::type_name(x));
+               throw Exception::BadType(ValueBase::type_local_name(x));
 
        set_link("segment",ValueNode_Const::create(ValueBase::TYPE_SEGMENT));
        set_link("amount",ValueNode_Const::create(Real(0.5)));
index db77757..91c55e0 100644 (file)
@@ -58,7 +58,7 @@ ValueNode_SegCalcVertex::ValueNode_SegCalcVertex(const ValueBase::Type &x):
        LinkableValueNode(x)
 {
        if(x!=ValueBase::TYPE_VECTOR)
-               throw Exception::BadType(ValueBase::type_name(x));
+               throw Exception::BadType(ValueBase::type_local_name(x));
 
        set_link("segment",ValueNode_Const::create(ValueBase::TYPE_SEGMENT));
        set_link("amount",ValueNode_Const::create(Real(0.5)));
index 4fc56cd..df01850 100644 (file)
@@ -60,7 +60,7 @@ ValueNode_Sine::ValueNode_Sine(const ValueBase &value):
                set_link("amp",ValueNode_Const::create(value.get(Real())));
                break;
        default:
-               throw Exception::BadType(ValueBase::type_name(value.get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(value.get_type()));
        }
 
        DCAST_HACK_ENABLE();
index 9609345..44399b4 100644 (file)
@@ -74,7 +74,7 @@ ValueNode_Stripes::create(const ValueBase& x)
        if(id!=ValueBase::TYPE_GRADIENT)
        {
                assert(0);
-               throw runtime_error("synfig::ValueNode_Stripes:Bad type "+ValueBase::type_name(id));
+               throw runtime_error(_("synfig::ValueNode_Stripes:Bad type ")+ValueBase::type_local_name(id));
        }
 
        ValueNode_Stripes* value_node=new ValueNode_Stripes();
index f9293bb..7867023 100644 (file)
@@ -90,7 +90,7 @@ synfig::ValueNode_Subtract::ValueNode_Subtract(const ValueBase &value):
                break;
        default:
                assert(0);
-               throw runtime_error("synfig::ValueNode_Subtract:Bad type "+ValueBase::type_name(id));
+               throw runtime_error(_("synfig::ValueNode_Subtract:Bad type ")+ValueBase::type_local_name(id));
        }
 
        assert(get_lhs()->get_type()==id);
index bb564c6..c444fda 100644 (file)
@@ -83,7 +83,7 @@ ValueNode_TimedSwap::ValueNode_TimedSwap(const ValueBase &value):
                set_link("after",ValueNode_Const::create(value.get(Vector())));
                break;
        default:
-               throw Exception::BadType(ValueBase::type_name(get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(get_type()));
        }
 
        set_link("time",ValueNode_Const::create(Time(2)));
index 497af2e..407615c 100644 (file)
@@ -72,7 +72,7 @@ ValueNode_TwoTone::create(const ValueBase& x)
        if(id!=ValueBase::TYPE_GRADIENT)
        {
                assert(0);
-               throw runtime_error("synfig::ValueNode_TwoTone:Bad type "+ValueBase::type_name(id));
+               throw runtime_error(_("synfig::ValueNode_TwoTone:Bad type ")+ValueBase::type_local_name(id));
        }
 
        ValueNode_TwoTone* value_node=new ValueNode_TwoTone();
index 6ba086e..a3ec049 100644 (file)
@@ -206,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;
                }
 
index ccbd1ae..0c5a1b4 100644 (file)
@@ -294,7 +294,7 @@ Action::ValueDescSet::prepare()
                        break;
                }
                default:
-                       throw Error("Bad type for composite (%s)",ValueBase::type_name(value.get_type()).c_str());
+                       throw Error(_("Bad type for composite (%s)"),ValueBase::type_local_name(value.get_type()).c_str());
                        break;
                }
 
@@ -353,7 +353,7 @@ Action::ValueDescSet::prepare()
                        n_components=4;
                        break;
                default:
-                       throw Error(_("Bad type for radial composite (%s)"),ValueBase::type_name(value.get_type()).c_str());
+                       throw Error(_("Bad type for radial composite (%s)"),ValueBase::type_local_name(value.get_type()).c_str());
                        break;
                }
                for(int i=0;i<n_components;i++)