DSpace version 4.x Adding Facet, which messages.xml file should I edit?

和自甴很熟 提交于 2019-12-11 00:46:01

问题


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



来源:https://stackoverflow.com/questions/27556499/dspace-version-4-x-adding-facet-which-messages-xml-file-should-i-edit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!