[ 
https://jira.duraspace.org/browse/DS-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26142#comment-26142
 ] 

Andrea Bollini commented on DS-1225:
------------------------------------

The current pull request doesn't compile, there is a misprint here:
https://github.com/DSpace/DSpace/pull/54/files#L0R1111
I have also found a sysout misprint
https://github.com/DSpace/DSpace/pull/54/files#L0R1257

IMHO the support for multilingual is not consistent with the patch approach. 
When it is configured the "display" style (please rename to inputform) the 
label is taken from the input-form.xml file when the style is 
displayMultilanguage the label is taken from the messages.properties files. 
Please note that you can load a different input-form.xml (_it, _fr, etc.) using 
the user locale
 Locale sessionLocale = null;
        sessionLocale = UIUtil.getSessionLocale(request);
        String formFileName = I18nUtil.getInputFormsFileName(sessionLocale);
DCInputReader inputReader = new DCInputReader(formFileName);

I will remove the displayMultilanguage style and use always an "inputform" 
style that read the display-value from the right (user locale) input-form
                
> Show display values for controlled vocabularies in Item Page
> ------------------------------------------------------------
>
>                 Key: DS-1225
>                 URL: https://jira.duraspace.org/browse/DS-1225
>             Project: DSpace
>          Issue Type: Improvement
>          Components: JSPUI
>    Affects Versions: 1.8.2
>            Reporter: Rania Stathopoulou
>              Labels: has-patch, has-pull-request
>         Attachments: 
> 0001-Show-display-values-input-forms-for-controlled-vocab.patch, README.txt, 
> show_displayValues_itemTag.diff
>
>
> In submission process, when the "input-type" of an element is set to 
> "dropdown" (/dspace/config/input-forms.xml),
> by default DSpace stores  the "stored-value" and shows the "displayed-value" 
> in submission form.
> Nevertheless, in item page (ItemTag) the "stored-value" is displayed which 
> usually is not user friendly.
> The proposed improvement is applied in order to show the displayed values in 
> item page and has been implemented by National Documentation Centre (EKT - 
> http://www.ekt.gr).
> Specifically, the user can set if he wants to show the displayed-value in Web 
> Interface Settings > webui.itemdisplay.default in dspace.cfg.
> There are two options:
> a) put (display) next to the respected metadata field in webui.itemdisplay, 
> in order to show the displayed-value(s) based on the respective(s) 
> stored-value(s) from the value-pairs-name in input forms
> b) put (displayMultilanguage) next to the respected metadata field in 
> webui.itemdisplay, in order to show the localized displayed-value(s) based on 
> the respective(s) stored-value(s) from the value-pairs-name in input forms. 
> In this case, the displayed-value(s) are set as message keys and the message 
> values must be set in message.properties for each language supported by the 
> repository.
> -------------------------------------------------
> EXAMPLES
> -------------------------------------------------
> a) When in input forms we have:
>  <field>
>       <dc-schema>dc</dc-schema>
>         <dc-element>language</dc-element>
>         <dc-qualifier></dc-qualifier>
>         <repeatable>true</repeatable>
>         <label>Type</label>
>         <input-type value-pairs-name="common_languages">dropdown</input-type>
>         <hint> Select the language(s) of content of the item. To select more 
> than one value in the list, you may have to hold down the "CTRL" or "Shift" 
> key.</hint>
>         <required></required>
> </field>
> where:
> <value-pairs value-pairs-name="common_languages" dc-term="language_iso">
>       <pair>
>       <displayed-value>Greek</displayed-value>
>       <stored-value>gre</stored-value>
>       </pair>
>       <pair>
>       <displayed-value>English</displayed-value>
>       <stored-value>eng</stored-value>
>       </pair>
>       <pair>
>       <displayed-value>French</displayed-value>
>       <stored-value>fre</stored-value>
>       </pair>
>       <pair>
>       <displayed-value>German</displayed-value>
>       <stored-value>ger</stored-value>
>       </pair>
>       <pair>
>       <displayed-value>Spanish</displayed-value>
>       <stored-value>spa</stored-value>
>       </pair>
>     ...
>  </value-pairs>
> Then, we should put dc.language(display) in dspace.cfg.
> In this case, in item page the word 'Spanish' will be shown instead of 'spa'.
> a) When in input forms we have:
>  <field>
>       <dc-schema>dc</dc-schema>
>         <dc-element>language</dc-element>
>         <dc-qualifier></dc-qualifier>
>         <repeatable>true</repeatable>
>         <label>Type</label>
>         <input-type 
> value-pairs-name="common_languages_Multilingual">dropdown</input-type>
>         <hint> Select the language(s) of content of the item. To select more 
> than one value in the list, you   may have to hold down the "CTRL" or "Shift" 
> key.</hint>
>         <required></required>
> </field>
> where:
> <value-pairs value-pairs-name="common_languages_Multilingual" 
> dc-term="language_iso">
>       <pair>
>       <displayed-value>jsp.self-archive.dc.language.gre</displayed-value>
>       <stored-value>gre</stored-value>
>       </pair>
>       <pair>
>       <displayed-value>jsp.self-archive.dc.language.eng</displayed-value>
>       <stored-value>eng</stored-value>
>       </pair>
>       <pair>
>       <displayed-value>jsp.self-archive.dc.language.fre</displayed-value>
>       <stored-value>fre</stored-value>
>       </pair>
>       <pair>
>       <displayed-value>jsp.self-archive.dc.language.ger</displayed-value>
>       <stored-value>ger</stored-value>
>       </pair>
>       <pair>
>       <displayed-value>jsp.self-archive.dc.language.spa</displayed-value>
>       <stored-value>spa</stored-value>
>       </pair>
>       ...
> </value-pairs>
> Then, we should  put dc.language(displayMultilingual) in dspace.cfg.
> In this case, in item page the word 'Spanish' will be shown instead of 'spa' 
> if the user is in English interface and 
> 'Ισπανικά' if the user is in Greek interface.
> e.g. (see Language field)
> http://repository.edulll.gr/edulll/handle/10795/334?locale=en
> http://repository.edulll.gr/edulll/handle/10795/334?locale=el
> Important Note: The support of multilingual displayed values by the 
> submission form, is an on-going work from National Documention Centre, which 
> will be included in another patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to