1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 17:10:05 +02:00

Substitute, don't concatenate, if these should be translated

This commit is contained in:
Paul Licameli 2018-03-14 17:33:59 -04:00
parent 65b8520e48
commit 4f9ab08487

View File

@ -260,16 +260,17 @@ bool CommandImplementation::SetParameter(const wxString &paramName, const wxVari
ParamValueMap::iterator iter = mParams.find(paramName); ParamValueMap::iterator iter = mParams.find(paramName);
if (iter == mParams.end()) 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; return false;
} }
Validator &validator = mType.GetSignature().GetValidator(iter->first); Validator &validator = mType.GetSignature().GetValidator(iter->first);
if (!validator.Validate(paramValue)) if (!validator.Validate(paramValue))
{ {
context.Error(wxT("Invalid value for parameter '") context.Error( wxString::Format(
+ paramName + wxT("': should be ") _("Invalid value for parameter '%s': should be %s"),
+ validator.GetDescription()); paramName, validator.GetDescription() ) );
return false; return false;
} }
mParams[paramName] = validator.GetConverted(); mParams[paramName] = validator.GetConverted();