Icon tip (mouse over) translation
When the interface is in French, in a list (like in a Workspace or Folder), if I hover over an item icon, I see the English version of the tip.
If I look at the produced html, the img tag contain the alt=“Folder” and title=“Folder” attributes.
For the document-type we created, we see a translated version.
Shouldn't we also see a translated version for the Main document-types? I checked and the values are present in the messages_fr.properties file.
Any ideas?
Affected types :
- File : Fichier
- Picture : Image
- Folder : Dossier
- Picturebook : Livre d'image
- Workspace : Espace de travail
- Ordered folder : Dossier ordonné
Waiting the correction You can create your own Content View with studio and create a template type widget that will displays the icon. This template will reuse the default template used for displaying the icon but for the alt value will use the #{messages[document.type]} and add keys into the message property into studio (Resources > I18n Files).
If I'm right here is the xhtml fragment used to display icon:
<f:subview id="#{widget.id}"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:nxu="http://nuxeo.org/nxweb/util"
xmlns:nxd="http://nuxeo.org/nxweb/document"
xmlns:nxl="http://nuxeo.org/nxforms/layout"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:nxp="http://nuxeo.org/nxweb/pdf">
<c:if test="#{nxl:isLikePlainMode(widget.mode)}">#{field_2}</c:if>
<c:if test="#{nxl:isLikeViewMode(widget.mode)}">
<div id="docRefTarget:#{field_1}"
class="#{nxu:test(field_3, 'nxDropTarget', '')}">
<div id="docRef:#{field_1}"
class="cell popupTarget dropout nxDraggable"
docRef="#{field_1}">
<nxu:graphicImage
value="#{nxd:iconPath(field_0)}" alt="#{field_2}" title="#{field_2}"
rendered="#{!empty nxd:iconPath(field_0)}"
styleClass="smallIcon" />
</div>
</div>
</c:if>
<c:if test="#{widget.mode == 'pdf'}">
<nxp:html>
<nxu:graphicImage
value="#{nxd:iconPath(field_0)}" alt="#{field_2}" title="#{field_2}"
rendered="#{!empty nxd:iconPath(field_0)}"
styleClass="smallIcon" />
</nxp:html>
</c:if>
</f:subview>
So replace alt=“#{field_2}” by alt=“#{messages[field_2]}“.
About widget configuration you have to bind the fields like in this order:
<field>data</field>
<field>data.ref</field>
<field>data.type</field>
<field>data.folder</field>
Or you wait for the fix :D
Yes, this would be better. What's your question (this site is for questions)?
If you have a bug report (which this seems to be), please do it in http://jira.nuxeo.com/
I guess the question was "Any ideas on how to fix it or diagnose the source of the problem?"