1

I'm working with Dspace 6.3. I added some customize filters in the Dspace Discovery module. They are working in the sense that they return results, but I am having some problems with the visualization of the filters in the advanced search box and in the sidebar. The message in the sidebar looks like this

xmlui.ArtifactBrowser.AdvancedSearch.type_type

And the message in the advanced search box looks like this

xmlui.ArtifactBrowser.SimpleSearch.filter.type

I understand that in order to fix this problem, I have to modify and move the messages.xml file of the src directory, and to run de mvn package and ant update. I tried to do those things and nothing happened. I´m not quite sure I am modifiying the correct file, so I searched the src diectory for all the messages.xml files that existed. This was the result

root@DspaceDTB:/home/grisel-pascual/SRC/dspace-6.3-src-release# find -iname "mes                                                                                       sages.xml"
./dspace-xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml
./dspace-xmlui/src/main/resources/aspects/XMLWorkflow/i18n/messages.xml
./dspace-xmlui/src/main/resources/aspects/SwordClient/i18n/messages.xml
./dspace-xmlui/src/main/webapp/i18n/messages.xml
./dspace/modules/xmlui/target/war/work/org.dspace/dspace-xmlui/i18n/messages.xml
./dspace/modules/xmlui/target/war/work/org.dspace/dspace-xmlui/WEB-INF/classes/a                                                                                       spects/Discovery/i18n/messages.xml
./dspace/modules/xmlui/target/war/work/org.dspace/dspace-xmlui/WEB-INF/classes/a                                                                                       spects/XMLWorkflow/i18n/messages.xml
./dspace/modules/xmlui/target/war/work/org.dspace/dspace-xmlui/WEB-INF/classes/a                                                                                       spects/SwordClient/i18n/messages.xml
./dspace/modules/xmlui/target/xmlui-6.3/i18n/messages.xml
./dspace/target/dspace-installer/webapps/xmlui/i18n/messages.xml

I consulted the wiki, and the recommendation was this:

Internationalization Discovery has its own messages.xml file, located at dspace-xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml. To add your own labels for new fields and facets in a Maven overlay, copy this file to dspace/modules/xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml and modify this file. Alternatively, you may add them to the main messages.xml file. Same goes for translations - it's encouraged to submit a single messages_XX.xml file including messages from all the separate messages.xml files in DSpace.

But in my directory, I can't find the second route (dspace/modules/xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml)

Any help with this issue would be appreciated, thanks in advance

1 Answers1

0

But in my directory, I can't find the second route (dspace/modules/xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml)

Well, it is stated in the wiki that you included:

Internationalization Discovery has its own messages.xml file, located at dspace-xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml. To add your own labels for new fields and facets in a Maven overlay, copy this file to dspace/modules/xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml and modify this file.

In other words, if you can't find it under the modules directory, you have to 'recreate' that path and copy the messages.xml.

If you modified the main messages.xml to include your custom label for Discovery and after mvn and ant update, nothing happens, did you try clearing your browser cache or maybe just a hard refresh of your browser? What you're seeing might be a cached page.

There is also an option in the XMLUI webui control panel to clear the cache immediately which can be accessed from /admin/panel?tab=Java Information&clearcache=true

euler
  • 1,401
  • 2
  • 18
  • 39
  • I been trying, but still can't fix the issue. I did the cache clear that you recommended. I think i might be doing the ant update wrong. The wiki states that I have to go to: ```cd [dspace-source]/dspace/target/dspace-[version]-build.dir/``` But in my console, when I get to ```[dspace-source]/dspace/target/```, there is no folder named ```dspace-[version]-build.dir/```, instead there are two folders named ```archive-temp``` and ```dspace-installer```. Where should I run the ant update? – Grisel Pascual Apr 07 '22 at 17:36
  • You should run it under `dspace-installer`, please see [Step 8](https://wiki.lyrasis.org/display/DSDOC6x/Installing+DSpace#InstallingDSpace-Installation) where it states: `cd [dspace-source]/dspace/target/dspace-installer` then run `ant fresh_install` or you can run `ant update`. – euler Apr 08 '22 at 00:56