DSpace version 4.x Adding Facet, which messages.xm

2019-07-21 23:04发布

问题:

After editing Discovery.xml located in C:\dspace-4.2-release\dspace\config\spring\api to add facet, which messages.xml should be edited to add a key,

<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.type">Type</message

because I realized there are 10 messages.xml files in C:\dspace-4.2-release folder. Does anyone know which messages.xml should I add the key? This is for XMLUI Interface.

回答1:

Given the following facet

 <bean id="searchFilterCourse"
    class="org.dspace.discovery.configuration.HierarchicalSidebarFacetConfiguration">
    <property name="indexFieldName" value="course"/>

Here is the pattern that I follow for providing message text for the facet.

<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_course">Course</message>
<message key="xmlui.Discovery.AbstractSearch.type_course">Course</message>
<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.course">Course</message>


回答2:

This is the file you need to edit:

[dspace-source]/dspace-xmlui/src/main/webapp/i18n/messages.xml

This is where you should store & manage it in your src tree:

[dspace-source]/dspace/modules/xmlui/src/main/webapp/i18n/

After editing, rebuild with mvn and redeploy.

source:

https://wiki.duraspace.org/display/DSDOC4x/Localization+L10n#LocalizationL10n-XMLUIspecificlocalization