Hi Yuko,
[adding Eliraz, patch [1] author to confirm the below]
Yes, from looking at the patch, it seems that the idea is to guide
the user to provide a space-separated *list* of "< key >=< value >"
strings.
BTW, pointing out that this string does not appear as a standalone
text, but as a suffix of another message.
Note the following texts in the UIMessages document:
- "This field should be in the format of: {0}"
[resource ID: customPropertiesValuesShouldBeInFormatReason]
- "This field can be empty or contain a {0}"
[resource ID: emptyOrValidKeyValueFormatMessage]
The "< key >=< value > separated with space" text can appear as
one of the options for the "{0}" placeholders in the messages above.
So the possible full strings would ultimately be:
- "This field should be in the format of: < key >=< value > separated
with space"
- "This field can be empty or contain a < key >=< value > separated with
space"
Localizing sentence "particles" is not a good practice, as grammatical
rules of different locales may not allow to translate those particles
easily.
It is always best to work with full sentences, rather than sentence
particles, even at the cost of less optimal / elegant code.
@Eliraz: I would recommend to:
- add a "list" notion in the messages; right now, since the word
"list"
is not mentioned in the messages, it seems like a valid value would be
just a single key-value pair (i.e. "a=b" seems legal, "a=b c=d" seems
illegal, although it is actually legal).
- change "< key >=< value >" to "[key]=[value]"
(the spaced "< >" are a bit confusing).
- change the code to use full sentences. I would simply work with two
separate messages, such as:
* This field should contain a space-separated list of "[key]=[value]"
strings.
* This field should be empty or contain a space-separated list of
"[key]=[value]" strings.
----
Thanks,
Einav
[1]
https://gerrit.ovirt.org/#/c/45366
----- Original Message -----
From: "Yuko Katabami" <ykatabam(a)redhat.com>
To: devel(a)ovirt.org
Sent: Tuesday, November 24, 2015 1:35:45 AM
Subject: [ovirt-devel] [oVirt 3.6 Localization Question #38] "< key >=<
value > separated with space"
Hello again,
I have another question I would like to ask for your help:
File: uicompat.UIMessages
Resource ID: keyValueFormat
String: < key >=< value > separated with space
Question : Is this asking user to provide a space-separated list of multiple
"< key >=< value >" values?
Kind regards,
Yuko
_______________________________________________
Devel mailing list
Devel(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel