[Engine-devel] Generic "name is used" message

Mike Kolesnik mkolesni at redhat.com
Sun Mar 17 08:46:37 UTC 2013


Hi, 

Lately I had to add an error message that "name is already used". 
I looked in the translations files and saw many messages for specific entity types in the system that looked much the same: 
VDS_TRY_CREATE_WITH_EXISTING_PARAMS=Cannot ${action} ${type}. Host with the same name already exists 
ACTION_TYPE_FAILED_VM_ALREADY_EXIST = Cannot $ { action } $ { type }. VM with the same name already exists . 
etc.. 

What I decided to do is not add another "X with the same name already exists" message, 
but instead add a generic message for this condition. 

You can review the patch here : 
http://gerrit.ovirt.org/#/c/12361 

I also went the extra mile to change the current messages that look like this to use this message: 
http://gerrit.ovirt.org/#/c/13063/ 

It is not a full coverage, since some commands don't fill the $action $type replacements, 
and the required change is a bit bigger than this patch scope, but it's a good start. 

FYI, and if you see other generic messages repeating themselves, don't hesitate to squash them. 


Regards, 
Mike 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20130317/16b63555/attachment-0001.html>


More information about the Devel mailing list