From 7c6c9bc865caa5e585805199f7c2e5f595b1c030 Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 10 Jan 2008 22:17:55 +0000 Subject: [PATCH] Break the ValueNode 'bad type' error messages up so less translation needs doing. git-svn-id: http://svn.voria.com/code@1317 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode_add.cpp | 2 +- synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp | 2 +- synfig-core/trunk/src/synfig/valuenode_integer.cpp | 4 ++-- synfig-core/trunk/src/synfig/valuenode_range.cpp | 2 +- synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp | 2 +- synfig-core/trunk/src/synfig/valuenode_scale.cpp | 2 +- synfig-core/trunk/src/synfig/valuenode_stripes.cpp | 2 +- synfig-core/trunk/src/synfig/valuenode_subtract.cpp | 2 +- synfig-core/trunk/src/synfig/valuenode_twotone.cpp | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/synfig-core/trunk/src/synfig/valuenode_add.cpp b/synfig-core/trunk/src/synfig/valuenode_add.cpp index d5cc0b0..93dd3c3 100644 --- a/synfig-core/trunk/src/synfig/valuenode_add.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_add.cpp @@ -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_local_name(id)); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); } } diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp index 0fbfe33..8de8007 100644 --- a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp @@ -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_local_name(id)); + throw runtime_error(String(_("Gradient Rotate"))+_(":Bad type ")+ValueBase::type_local_name(id)); } ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate(x.get(Gradient())); diff --git a/synfig-core/trunk/src/synfig/valuenode_integer.cpp b/synfig-core/trunk/src/synfig/valuenode_integer.cpp index a9becdd..136986e 100644 --- a/synfig-core/trunk/src/synfig/valuenode_integer.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_integer.cpp @@ -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_local_name(x.get_type())); + throw runtime_error(get_local_name()+_(":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_local_name(get_type())); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(get_type())); } } diff --git a/synfig-core/trunk/src/synfig/valuenode_range.cpp b/synfig-core/trunk/src/synfig/valuenode_range.cpp index 1333f3d..e59cb63 100644 --- a/synfig-core/trunk/src/synfig/valuenode_range.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_range.cpp @@ -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_local_name(id)); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); } assert(min_->get_type()==id); diff --git a/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp b/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp index 3bfb804..0ea3f12 100644 --- a/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp @@ -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_local_name(id)); + throw runtime_error(String(_("Repeat Gradient"))+_(":Bad type ")+ValueBase::type_local_name(id)); } ValueNode_Repeat_Gradient* value_node=new ValueNode_Repeat_Gradient(x.get(Gradient())); diff --git a/synfig-core/trunk/src/synfig/valuenode_scale.cpp b/synfig-core/trunk/src/synfig/valuenode_scale.cpp index dbe3b85..ae32f97 100644 --- a/synfig-core/trunk/src/synfig/valuenode_scale.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_scale.cpp @@ -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_local_name(value.get_type())); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); } assert(value_node); diff --git a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp index 44399b4..ad67ee7 100644 --- a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp @@ -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_local_name(id)); + throw runtime_error(String(_("Stripes"))+_(":Bad type ")+ValueBase::type_local_name(id)); } ValueNode_Stripes* value_node=new ValueNode_Stripes(); diff --git a/synfig-core/trunk/src/synfig/valuenode_subtract.cpp b/synfig-core/trunk/src/synfig/valuenode_subtract.cpp index 7867023..c018d43 100644 --- a/synfig-core/trunk/src/synfig/valuenode_subtract.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_subtract.cpp @@ -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_local_name(id)); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); } assert(get_lhs()->get_type()==id); diff --git a/synfig-core/trunk/src/synfig/valuenode_twotone.cpp b/synfig-core/trunk/src/synfig/valuenode_twotone.cpp index 407615c..7ef62a3 100644 --- a/synfig-core/trunk/src/synfig/valuenode_twotone.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_twotone.cpp @@ -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_local_name(id)); + throw runtime_error(String(_("Two-Tone"))+_(":Bad type ")+ValueBase::type_local_name(id)); } ValueNode_TwoTone* value_node=new ValueNode_TwoTone(); -- 2.7.4