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();
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();
}
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
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;
}
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()
);
}
}
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; \
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));
}
}
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;
}
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();
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);
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);
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)));
}
default:
assert(0);
- throw Exception::BadType(ValueBase::type_name(get_type()));
+ throw Exception::BadType(ValueBase::type_local_name(get_type()));
}
}
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();
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();
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()));
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()));
}
}
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()));
}
}
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();
break;
default:
assert(0);
- throw Exception::BadType(ValueBase::type_name(get_type()));
+ throw Exception::BadType(ValueBase::type_local_name(get_type()));
}
}
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);
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()));
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);
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)));
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)));
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();
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();
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);
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)));
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();
{
// 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;
}
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;
}
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++)