On 2014年08月27日 01:52, Crístian Viana wrote:
On 21-08-2014 15:55, Aline Manera wrote:
>> diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
>> index 2eae7e8..26b916b 100644
>> --- a/src/kimchi/i18n.py
>> +++ b/src/kimchi/i18n.py
>> @@ -185,6 +185,7 @@ messages = {
>> "KCHVOL0015E": _("Storage volume format not supported"),
>> "KCHVOL0016E": _("Storage volume requires a volume name"),
>> "KCHVOL0017E": _("Unable to update database with storage volume
>> information due error: %(err)s"),
>> + "KCHVOL0018E": _("Only one of %(param)s can be
specified"),
>
> From the code above, %(param)s will be always "file, url, capacity"
> so we can include them to the string and avoid the placeholder
The dict "vol_source" is also used somewhere else in the code other
than filling this placeholder (i.e. to validate the parameters) so I
think it's worth to have its values outside the error string.
Yeah, aggregating
them in "vol_source" is for future extension. If we
support another type of volume creation method (let's say creating a
volume base on another volume), we don't need to change this error
message and elsewhere using it, we just add another value in
"vol_source" list and everything can work as what it is now.
Does that make sense?
_______________________________________________
Kimchi-devel mailing list
Kimchi-devel(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel