diff --git a/data/en.mse-locale/locale b/data/en.mse-locale/locale index e9f42fa5..e98ccb86 100644 --- a/data/en.mse-locale/locale +++ b/data/en.mse-locale/locale @@ -810,6 +810,10 @@ error: can't write image to set: Failed to write image to set: '%s' can't import image: Failed to import image: '%s' + # Card creation + no field with name: Card doesn't have a field named '%s' + can't set value: Can not set card value '%s', it is not of the right type + # Script stuff has no member: %s has no member '%s' can't convert: Can't convert from %s to %s diff --git a/src/script/functions/construction.cpp b/src/script/functions/construction.cpp index ac71dd23..e96cd034 100644 --- a/src/script/functions/construction.cpp +++ b/src/script/functions/construction.cpp @@ -34,7 +34,7 @@ SCRIPT_FUNCTION(new_card) { // find value to update IndexMap::const_iterator value_it = new_card->data.find(name); if (value_it == new_card->data.end()) { - throw ScriptError(format_string(_("Card doesn't have a field named '%s'"),name)); + throw ScriptError(_ERROR_1_("no field with name", name)); } Value* value = value_it->get(); // set the value @@ -50,7 +50,7 @@ SCRIPT_FUNCTION(new_card) { wxFileName fname( static_cast(v.get())->toString() ); ivalue->filename = LocalFileName::fromReadString( fname.GetName(), ""); } else { - throw ScriptError(format_string(_("Can not set value '%s', it is not of the right type"),name)); + throw ScriptError(_ERROR_1_("can't set value", name)); } } SCRIPT_RETURN(new_card);