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

------=_Part_1894359_617512914.1363509997819 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 ------=_Part_1894359_617512914.1363509997819 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><style type=3D'text/css'>p { margin: 0; }</style></head><body><= div style=3D'font-family: times new roman,new york,times,serif; font-size: = 12pt; color: #000000'>Hi,<br><br>Lately I had to add an error message that = "name is already used".<br>I looked in the translations files and saw many = messages for specific entity types in the system that looked much the same:= <br><span class=3D"str">VDS_TRY_CREATE_WITH_EXISTING_PARAMS=3DCannot ${acti= on} ${type}. Host with the same name already exists<br></span><span class= =3D"pln">ACTION_TYPE_FAILED_VM_ALREADY_EXIST</span><span class=3D"pun">=3D<= /span><span class=3D"typ">Cannot</span><span class=3D"pln"> $</span><span c= lass=3D"pun">{</span><span class=3D"pln">action</span><span class=3D"pun">}= </span><span class=3D"pln"> $</span><span class=3D"pun">{</span><span class= =3D"pln">type</span><span class=3D"pun">}.</span><span class=3D"pln"> VM </= span><span class=3D"kwd">with</span><span class=3D"pln"> the same name alre= ady exists</span><span class=3D"pun">.</span><br>etc..<br><br>What I decide= d to do is not add another "X with the same name already exists" message,<b= r>but instead add a generic message for this condition.<br><br>You can revi= ew the patch here:<br>http://gerrit.ovirt.org/#/c/12361<br><br>I also went = the extra mile to change the current messages that look like this to use th= is message:<br>http://gerrit.ovirt.org/#/c/13063/<br><br>It is not a full c= overage, since some commands don't fill the $action $type replacements,<br>= and the required change is a bit bigger than this patch scope, but it's a g= ood start.<br><br>FYI, and if you see other generic messages repeating them= selves, don't hesitate to squash them.<br><br><div><span name=3D"x"></span>= Regards,<br>Mike<span name=3D"x"></span><br></div><br></div></body></html> ------=_Part_1894359_617512914.1363509997819--
participants (1)
-
Mike Kolesnik