[Freeipa-devel] Entity labels

Endi Sukma Dewata edewata at redhat.com
Wed Jun 15 19:55:07 UTC 2011


Hi All,

We need I18n labels for the entities to be used inside help messages and 
UI. Please take a look at the following tickets:

https://fedorahosted.org/freeipa/ticket/1217
https://fedorahosted.org/freeipa/ticket/1249

Depending on the usage, we might need 4 different labels for each entity:

Label #1: Lower-case singular label: e.g. user, DNS zone
Label #2: Lower-case plural label: e.g. users, DNS zones
Label #3: Upper-case singular label: e.g. User, DNS Zone
Label #4: Upper-case plural label: e.g. Users, DNS Zones

In the current code the lower-case labels are needed for server messages 
and the upper-case labels are needed for UI page titles. Due to the 
nature of untyped language, it's difficult to confirm whether upper-case 
labels are actually needed by the server, but there's a possibility.

The server plugins currently define the following attributes:

- object_name: It can be used as Label #1 (after fixing ticket #1217).
- object_name_plural: It can be used as Label #2.
- label: It can be used as Label #4.

Here are the issues:

Issue #1: There is no attribute that can be used as Label #3.
Issue #2: The lower-case label is identical to the corresponding 
upper-case label (e.g. Label #1 & #3) except for the capitalization.
Issue #3: Acronyms such as DNS need to remain upper-case in all labels.

Some solutions have been proposed:

Option #1: Define 4 different attributes, one for each label. By default 
translators only need to supply lower-case Label #1 and #2. The 
upper-case Label #3 and #4 will be generated automatically using a 
server-side method that will convert the first letters in each word in 
the label to upper case. Translators can also supply the upper-case 
labels if the method doesn't generate the correct conversion.

Option #2: Define only the 2 lower-case attributes. Since it's unclear 
if the server needs the upper-case labels, we will just implement a 
client-side conversion method to generate upper-case labels for the UI. 
But if the server needs it too, we would have to add a similar method on 
the server-side. Also there will be no way to override the conversion.

My personal preference is option #1. Any suggestions? Thanks.

-- 
Endi S. Dewata




More information about the Freeipa-devel mailing list