[Freeipa-devel] [PATCH] 051 Search facets show translated boolean values

Petr Vobornik pvoborni at redhat.com
Wed Dec 7 16:00:52 UTC 2011


On 12/05/2011 06:27 PM, Endi Sukma Dewata wrote:
> On 12/5/2011 9:37 AM, Petr Vobornik wrote:
>> Created format method for getting translated messages for boolean values
>> - IPA.boolean_column_format.
>>
>> Used in hosts, sudo rules, hbac rules.
>>
>> https://fedorahosted.org/freeipa/ticket/2027
>
> The patch works, so it's ACKed.

New version attached.

> There are a few suggestions but they can
> be done later:
>
> 1. It might be better to name the function IPA.boolean_format because we
> can use it for other things too, not just inside a column.

Renamed
>
> 2. The value can be normalized using toLowerCase() before comparison.

Done, but using normalized value only for comparison because of #3.
>
> 3. If the value doesn't match true/false it can return the original
> value instead of empty string

Done. Returning empty string if null or undefined.

Newly used in HBAC test page.

-- 
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0051-1-Search-facets-show-translated-boolean-values.patch
Type: text/x-patch
Size: 5158 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20111207/20edf117/attachment.bin>


More information about the Freeipa-devel mailing list