From mkolesni at redhat.com Sun Mar 17 04:46:38 2013 Content-Type: multipart/mixed; boundary="===============0761681502487928016==" MIME-Version: 1.0 From: Mike Kolesnik To: devel at ovirt.org Subject: [Engine-devel] Generic "name is used" message Date: Sun, 17 Mar 2013 04:46:37 -0400 Message-ID: <1898563294.1894360.1363509997820.JavaMail.root@redhat.com> --===============0761681502487928016== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ------=3D_Part_1894359_617512914.1363509997819 Content-Type: text/plain; charset=3Dutf-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 entit= y types in the system that looked much the same: = VDS_TRY_CREATE_WITH_EXISTING_PARAMS=3DCannot ${action} ${type}. Host with t= he same name already exists = ACTION_TYPE_FAILED_VM_ALREADY_EXIST =3D 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 exist= s" 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 th= is 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 g= ood start. = FYI, and if you see other generic messages repeating themselves, don't hesi= tate to squash them. = Regards, = Mike = ------=3D_Part_1894359_617512914.1363509997819 Content-Type: text/html; charset=3Dutf-8 Content-Transfer-Encoding: quoted-printable <=3D div style=3D3D'font-family: times new roman,new york,times,serif; font-size= : =3D 12pt; color: #000000'>Hi,

Lately I had to add an error message that = =3D "name is already used".
I looked in the translations files and saw many = =3D messages for specific entity types in the system that looked much the same:= =3D
VDS_TRY_CREATE_WITH_EXISTING_PARAMS=3D3DCannot ${= acti=3D on} ${type}. Host with the same name already exists
ACTION_TYPE_FAILED_VM_ALREADY_EXIST= =3D3D<=3D /span>Cannot ${action}=3D ${type}.= VM with the same name = alre=3D ady exists.
etc..

What I deci= de=3D d 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 revi= =3D ew the patch here:
http://gerrit.ovirt.org/#/c/12361

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

It is not a full c= =3D overage, since some commands don't fill the $action $type replacements,
= =3D and the required change is a bit bigger than this patch scope, but it's a g= =3D ood start.

FYI, and if you see other generic messages repeating them= =3D selves, don't hesitate to squash them.

=3D Regards,
Mike

------=3D_Part_1894359_617512914.1363509997819-- --===============0761681502487928016== Content-Type: multipart/alternative MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="attachment.bin" LS0tLS0tPV9QYXJ0XzE4OTQzNTlfNjE3NTEyOTE0LjEzNjM1MDk5OTc4MTkKQ29udGVudC1UeXBl OiB0ZXh0L3BsYWluOyBjaGFyc2V0PXV0Zi04CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdi aXQKCkhpLCAKCkxhdGVseSBJIGhhZCB0byBhZGQgYW4gZXJyb3IgbWVzc2FnZSB0aGF0ICJuYW1l IGlzIGFscmVhZHkgdXNlZCIuIApJIGxvb2tlZCBpbiB0aGUgdHJhbnNsYXRpb25zIGZpbGVzIGFu ZCBzYXcgbWFueSBtZXNzYWdlcyBmb3Igc3BlY2lmaWMgZW50aXR5IHR5cGVzIGluIHRoZSBzeXN0 ZW0gdGhhdCBsb29rZWQgbXVjaCB0aGUgc2FtZTogClZEU19UUllfQ1JFQVRFX1dJVEhfRVhJU1RJ TkdfUEFSQU1TPUNhbm5vdCAke2FjdGlvbn0gJHt0eXBlfS4gSG9zdCB3aXRoIHRoZSBzYW1lIG5h bWUgYWxyZWFkeSBleGlzdHMgCkFDVElPTl9UWVBFX0ZBSUxFRF9WTV9BTFJFQURZX0VYSVNUID0g Q2Fubm90ICQgeyBhY3Rpb24gfSAkIHsgdHlwZSB9LiBWTSB3aXRoIHRoZSBzYW1lIG5hbWUgYWxy ZWFkeSBleGlzdHMgLiA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