SUNScholar/XMLUI Theme/M1/Language

From Libopedia
Jump to navigation Jump to search
Back to Mirage 1 Modification

Introduction

The language files normally exist in one the following folders, if using the XMLUI;

$HOME/source/dspace-xmlui/src/main/webapp/i18n/ (default files)
$HOME/source/dspace/modules/xmlui/src/main/webapp/i18n/ (custom files)

Step 1 - Create custom "messages.xml" file

A custom "messages.xml" is created using the modules overlay method with the XMLUI web user interface.

mkdir $HOME/source/dspace/modules/xmlui/src/main/webapp/i18n
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/i18n
cp $HOME/source/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/i18n/messages.xml .
nano $HOME/source/dspace/modules/xmlui/src/main/webapp/i18n/messages.xml

Modify the "messages.xml" file as desired using "nano".


NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for %%string%%
CTL+\ = Search for %%string%% and replace with $$string$$
CTL+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)


Step 2 - Apply own breadcrumb trail title

Find the following section at the top of the file and modify using "nano".

	<!-- General keys -->
	<message key="xmlui.general.dspace_home">Home</message>
	<message key="xmlui.general.search">Search</message>
	<message key="xmlui.general.go">Go</message>
	<message key="xmlui.general.go_home">Go to home page</message>

Step 3 - Apply own "DSpace" replacement

Using "nano", replace all mention of "DSpace" with the name of your repository. See above, for help using the "nano" editor to do search and replace of content.

Step 4 - Apply custom indexes modification

Review the custom indexes procedures at:

In order to transform custom messages created by the custom indexes, I applied the following to the bottom of the file.

<!-- Added by H Gibson -->

       <!-- Title Messages -->
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.column_heading">Title</message>
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.title">Browsing by Title</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.title">Browsing by Title</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.title">title</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.title">title</message>

       <!-- Author Messages -->
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.author.column_heading">Author</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.author">Author</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.author">Browsing by Author</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.author">author</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.author">author</message>

       <!-- Advisor Messages -->
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.advisor.column_heading">Advisor</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.advisor">Advisor</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.advisor">Browsing by Advisor</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.advisor">advisor</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.advisor">advisor</message>
        <message key="xmlui.ArtifactBrowser.Navigation.browse_advisor">By Advisor</message>
        <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.dc.contributor.advisor">Advisor</message>
        <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.advisor">Advisor</message>

       <!-- Issue Date Messages -->
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.dateissued.column_heading">Issue Date</message>
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.dateissued">Browsing by Issue Date</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.dateissued">Browsing by Issue Date</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.issuedate">issuedate</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.issuedate">issuedate</message>
	<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_date">Date</message>
	<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_issuedate">Issue Date</message>

       <!-- Subject Messages -->
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.subject">Subject</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.subject">Browsing by Subject</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.subject">subject</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.subject">subject</message>

       <!-- Type Messages -->
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.type.column_heading">Type</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.type">Type</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.type">Browsing by Type</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.type">type</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.type">type</message>
        <message key="xmlui.ArtifactBrowser.Navigation.browse_type">By Type</message>
	<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_type">Type</message>	
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.dc.type">Type</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.type">Type</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.type_filter">Type</message>

       <!-- Provenance Messages -->
	<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_provenance">Provenance</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.dc.description.provenance">Provenance</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.provenance">Provenance</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.provenance_filter">Provenance</message>

Step 5 - Input forms modification

Step 6 - Rebuild DSpace

Click on the heading above.

Further References

http://wiki.lib.sun.ac.za/index.php/SUNScholar/Language

Xmlui-messages.png