mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-18 09:00:07 +02:00
Substitute, don't concatenate, if these should be translated
This commit is contained in:
parent
65b8520e48
commit
4f9ab08487
@ -260,16 +260,17 @@ bool CommandImplementation::SetParameter(const wxString ¶mName, const wxVari
|
||||
ParamValueMap::iterator iter = mParams.find(paramName);
|
||||
if (iter == mParams.end())
|
||||
{
|
||||
context.Error(paramName + wxT(" is not a parameter accepted by ") + GetName());
|
||||
context.Error( wxString::Format(
|
||||
_("%s is not a parameter accepted by %s"), paramName, GetName() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
Validator &validator = mType.GetSignature().GetValidator(iter->first);
|
||||
if (!validator.Validate(paramValue))
|
||||
{
|
||||
context.Error(wxT("Invalid value for parameter '")
|
||||
+ paramName + wxT("': should be ")
|
||||
+ validator.GetDescription());
|
||||
context.Error( wxString::Format(
|
||||
_("Invalid value for parameter '%s': should be %s"),
|
||||
paramName, validator.GetDescription() ) );
|
||||
return false;
|
||||
}
|
||||
mParams[paramName] = validator.GetConverted();
|
||||
|
Loading…
x
Reference in New Issue
Block a user