[daisy] [JIRA] Commented: (DSY-274) Allow to select label of field with a static selection list in the query language.

Olivier Lange (JIRA) issues at cocoondev.org
Mon Jun 2 18:52:28 CEST 2008


    [ http://issues.cocoondev.org//browse/DSY-274?page=comments#action_13641 ] 

Olivier Lange commented on DSY-274:
-----------------------------------

I'd be very interested in that feature also. Sample use case:

A multivalued string field with a static selection list, such as a list of countries, where I entered the country ISO code as the values and the country names as labels, in 4 diffrent languages:

  <fieldType name="tbLands" valueType="string" multiValue="true" hierarchical="false" aclAllowed="false" allowFreeEntry="false" loadSelectionListAsync="false" deprecated="false" size="0">
    <staticSelectionList>
      <item value="AD.TB06">
        <label locale="de" text="Andorra"/>
        <label locale="en" text="Andorra"/>
        <label locale="fr" text="Andorre"/>
        <label locale="it" text="Andorra"/>
      </item>
      <item value="AE.TB06">
        <label locale="de" text="Vereinigte Arabische Emirate"/>
        <label locale="en" text="United Arab Emirates"/>
        <label locale="fr" text="Emirats arabes unis"/>
        <label locale="it" text="Emirati arabi uniti"/>
      </item>
      <item value="AF.TB06">
        <label locale="de" text="Afghanistan"/>
        <label locale="en" text="Afghanistan"/>
        <label locale="fr" text="Afghanistan"/>
        <label locale="it" text="Afghanistan"/>
      </item>
      [...]
    <label locale="" text="Pays"/>
    <label locale="de" text="Länder"/>
    <label locale="en" text="Country- ies"/>
    <label locale="fr" text="Pays"/>
    <label locale="it" text="Paesi"/>
    <description locale="" text="Liste de tous les pays dans lesquels le projet a réalisé des activités."/>
    <description locale="de" text="Liste aller Länder in den das Projekt Aktivitäten hatte."/>
    <description locale="en" text="List of all countries in which the project had activties."/>
    <description locale="fr" text="Liste de tous les pays dans lesquels le projet a réalisé des activités."/>
  </fieldType>
  
Within query results, I would like to display the country name in the user current locale, rather than the country codes (the raw values). Although country codes make sense, other fields I use have values which are meaningless to users.

As a temporary workaround, I created a custom query style, which outputs <i18n:text key="{d:value}" catalogue="skin"/> elements in place of the values, and I put the labels within the i18n message catalogues.

> Allow to select label of field with a static selection list in the query language.
> ----------------------------------------------------------------------------------
>
>          Key: DSY-274
>          URL: http://issues.cocoondev.org//browse/DSY-274
>      Project: Daisy
>         Type: New Feature
>   Components: Repository - querying and indexing
>     Reporter: Bruno Dumon
>     Priority: Minor

>
> Currently you can retrieve the value of a field in a query, but not its associated label if the field has a static selection list, which might be useful sometimes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the daisy mailing list