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

Ivan Masár commented on DS-842:
-------------------------------

I'm copying in a relevant post sent to dspace-tech ( 
http://www.mail-archive.com/[email protected]/msg18550.html ):


I don't know if you are using Mirage but the Mirage part of the 
https://jira.duraspace.org/browse/DS-842 patch didn't work for me.

 For my 1.8.2 test machine, I had to rewrite the part within the 
dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/Mirage/lib/xsl/core/page-structure.xsl
 into 
dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/Mirage/lib/xsl/core/navigation.xsl
 (code not tested thoroughly yet): 

<!-- TODO: figure out why i18n tags break the go button -->
<xsl:template match="dri:options">
<div id="ds-options-wrapper">
<div id="ds-options">

+ <xsl:template match="dri:options">
+ <div id="ds-options-wrapper">
+ <div id="ds-options">

+ <!-- Selecteur de langue lorsque plus d'une langue est specifiee-->

+ <xsl:if 
test="count(/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='supportedLocale'])
 &gt; 1">
+ <h1 id="ds-language-option-head" class="ds-option-set-head">
+ <i18n:text>xmlui.EPerson.EditProfile.Language</i18n:text>
+ </h1>
+ <div id="ds-language-option" class="ds-option-set">
                                 
+ <form method="get" name="repost" action="" style="display: inline;">
+ <select name="locale-attribute" id="tlang" 
onchange="javascript:document.repost.submit();">
+ <xsl:for-each 
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='supportedLocale']">
+ <xsl:variable name="locale" select="."/>
+ <option>
+ <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
+ <xsl:if 
test=".=/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='currentLocale']">
+ <xsl:attribute name="selected">selected</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of 
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='supportedLocale'][@qualifier=$locale]"/>
 
+ </option>
+ </xsl:for-each>
+ </select>
+ </form>
+ </div>                                                        
+ </xsl:if>

I also changed a few items within the style.css file:

+ /*#ds-search-option-head{
+       margin-top: 0;
+ }
+ */
+ #ds-language-option-head{
+       margin-top: 0;
+ }

(...) 

+ #ds-search-option, #ds-language-option {
+       padding: 10px;
+ }


Also, as advised in this post 
(http://sourceforge.net/mailarchive/message.php?msg_id=28540682) I had to 
update, for the first part of the DS-842 patch, ViewArtifacts instead of 
ArtifactBrowser.

Hope it can help.


Marie-Hélène Vézina
                
> Language switch for xmlui and some basic i18n stuff
> ---------------------------------------------------
>
>                 Key: DS-842
>                 URL: https://jira.duraspace.org/browse/DS-842
>             Project: DSpace
>          Issue Type: Improvement
>          Components: XMLUI
>            Reporter: Claudia Jürgen
>            Assignee: Andrea Schweer
>              Labels: has-patch
>             Fix For: 4.0
>
>         Attachments: i18nBasicsForXmlui.patch, MirageLanguageSelection.patch
>
>
> This patch enables the active language selection and adds some basic i18n 
> support to prepare for further i18n related changes like i18n dependant input 
> forms.
> It changes 
> [dspace-src]dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceLocaleAction.java
> and stores the active locale in the session and context. 
> It adds the information about the supported locales and the current locales 
> to the page metadata via 
> [dspace-src]/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/Navigation.java
> It drops the dspace.cfg parameter xmlui.supported.locales which is used in 
> the xmlui-webapp and xmlui-api in favor of the 
> webui.supported.locales, which is used in the dspace-api, jspui-webapp and 
> jspui-api. So we got one parameter for the general api and both ui's
> Furthermore it contains an patch for the Mirage theme adding a language 
> selection to the header.

--
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