DSpace/C3/General-Settings-in-DSpace/English

From Script | Spoken-Tutorial
Revision as of 16:42, 25 June 2021 by Pankajpatil694 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Script : General Settings in DSpace


Author : Pankaj Patil


Keywords: DSpace General Settings, DSpace language setting, Localization of DSpace, DSpace Language configuration, Full Text Indexing, Bitstream Thumbnail


Visual Cue Narration
Slide: Title Welcome to this Spoken Tutorial on General Settings in DSpace.
Slide: Learning Objectives In this tutorial, we will learn to
  • Index the full text of Item files
  • Generate a thumbnail for the Item files
  • Enable User Interface language switcher and
  • Localize the User Interface of DSpace
Slide: System requirements This tutorial is recorded using
  • Ubuntu Linux OS 18.04
  • DSpace version 6.3
  • gedit text editor and
  • Firefox web browser

However, you may use any other web browser and text editor of your choice.

Slide: Pre-requisites To practice this tutorial, you should have
  • A working internet connection
  • Installed DSpace 6.3 on your system
  • Tomcat services should be running
Slide: Pre-requisites
  • Some archived Items in the Collection
  • If not then please go through the prerequisite tutorials on this website.
Slide : Code files
  • The files used in this tutorial are available in the Code Files link on this tutorial page.
  • Please download and extract the file before practising.
Slide: Search in DSpace
  • DSpace offers a Search feature for searching Items by keyword.
  • By default, DSpace indexes the metadata of the Items and uses it for Search.
  • Items are searchable if the keyword is available in the Index. i.e. the metadata
Slide:Full text Indexing for Items
  • DSpace can also index the full text from Item files using add-on Media Filters.
  • Full text indexing makes the Item searchable with any word in the Item file.
Slide: Media Filters Media Filters can extract text from the following formats.
  • Adobe PDF (only if text-based or OCRed)
  • A Document, Spreadsheet, or Presentation
  • Plain text and
  • HTML
Slide: Media Filters
  • Additionally, the Media Filters generate thumbnails for the Bitstreams/ Item Files.
Only Narration Now, let us examine the Search feature without the full-text indexing of Item.
Open HPC-Article.pdf file Earlier in this series, HPC-Article.pdf file was uploaded as an Item in the Article Collection.
Highlight Signal Processing word Now, choose any keyword from that file, which doesn’t belong to the metadata of the Article.

So, let us choose “Signal Processing” as the keyword.

Only Narration Now let us proceed to search the Item using this keyword.
Open Web Browser Open a web browser.
Go to localhost:8080 Go to the DSpace interface.
Enter Signal Processing in the Search bar Type Signal Processing as the keyword in the search bar.
Click on Search icon Click on the Search icon next to the search bar.
Point to Search page The search page opens.
Point to “Search produced no results The search produced no results because the words “Signal Processing” was not indexed.
Only narration Now, let us proceed to index the full text of the uploaded files using the media filters.
Switch to gedit text editor and open the file I have opened the commands file in the gedit text editor on my machine.

Please do so on your machine also using your preferred text editor. And I will use the same file to copy-paste the commands during the demonstration. The shortcut to paste on the terminal is Shift + Ctrl and V keys.

Press Ctrl+Alt+T keys Open the terminal by pressing Ctrl + Alt + T keys simultaneously on the keyboard.

Ensure that you have root permissions to run the commands.

Only Narration Here onwards please remember to press the Enter key after typing each command.
[Terminal] type:

sudo su - dspace

Before we begin, we will log in as user dspace.

Type sudo su - dspace If prompted, type the admin user password to login.

[Terminal] type:

sudo $HOME/dspace-install/bin/dspace filter-media Root Password: dupass

Now type the command as shown to run media filters.

If prompted, type the root user password. Media filtering has begun for all the uploaded Item files. It may take some time depending on the number of Item files.

Only Narration Media filtration is now complete.
Point to HPC-Article.pdf.jpg file Observe that the media filter has created a jpg image for each Item file.

These jpg files are used as thumbnails for the Item files.

Point to HPC-Article.pdf.txt file txt files are also created for each Item file and the contents of the txt files are indexed for search.
Only Narration Next, we’ll proceed to search an Item using the keywords “Signal Processing”.
Switch back to DSpace Switch back to DSpace.
Enter Signal Processing in the Search bar Type Signal Processing as the keywords in the search bar.
Click on Search icon Click on the Search icon next to the search bar.
Point to Search page The search page opens.
Scroll down Scroll down to locate the search results.
Point to Item hits the table The Item hits table shows the Items returned by the search operation.
Point to Single-Frame Image Super-resolution through Contourlet Learning Observe that the search results show an Item with the title-

“Single-Frame Image Super-resolution through Contourlet Learning” This is an Item associated with file HPC-Article.pdf.

Click on Item title

Single-Frame Image Super-resolution through Contourlet Learning

Click on the Item title to open it.
Point to metadata and files The Metadata and the files of this Item are now displayed.
Point to thumbnail of files Observe that the Item files are shown along with the thumbnails generated by the media filters.
Only Narration Thus, we have verified that media filters index full text and enhance search operation.

Also, the media filters generate a thumbnail for the Item files.

Narration only Next let us proceed to configure the language settings in DSpace.
Slide: Multilingual DSpace
  • The default User Interface language of DSpace is set to English.
  • DSpace can be configured to add other languages and provide a Multilingual User Interface, too.
Narration only For this demonstration, we will keep English as the default language.

Also, we will localize DSpace in Hindi as another language.

[Terminal] Type:

sudo gedit $HOME/dspace-6.3-src-release/dspace/config/dspace.cfg

Switch to the terminal.

Type the command as shown to open the dspace.cfg file in the gedit text editor. You can do so in the editor of your choice, as well.

Only Narration dspace.cfg file has DSpace configurations in the form of key-value pairs.
Point to i18n-Locales/Language Locate the section i18n-Locales/Language.

It is used to configure the language settings of DSpace.

Highlight webui.supported.locales Locate the key webui.supported.locales.
Narration Only webui.supported.locales are used to configure supported languages by DSpace.
Highlight # symbol at the beginning of line By default, this key is disabled by commenting it.
Type webui.supported.locales on the next line Type webui.supported.locales on the next line as shown.
Set value

webui.supported.locales = en, hi

To support UI in English and Hindi, set the value for webui.supported.locales as en, hi.
Show: hi is ISO 639-1 code for Hindi hi is ISO 639-1 code for Hindi.
Narration Only DSpace enables the language switcher with the languages listed in webui.supported.locales.
Save and close the file. Save and close the file.
Slide: Localization of Messages.properties
  • Messages.properties file contains the textual content of DSpace UI.
  • DSpace UI can be localized by translating Messages.properties file.
Slide: Localization of Messages.properties
  • A localized properties file is renamed as follows.

Messages_< ISO 639-1 code of language>.properties

  • For Example, Messages_hi.properties
Narration only Switch back to the terminal.
Narration only Now, to localize DSpace in Hindi, let us create Messages_hi.properties
[Terminal] : Type

cd $HOME/dspace-6.3-src-release/dspace-api/src/main/resources

Type the command as shown to change the present working directory to the resources directory.
Narration only Next, we have to make a copy of the Messages.properties file as Messages_hi.properties
[Terminal] : Type

cp Messages.properties Messages_hi.properties

To do so, type the command as shown.
[Terminal] : Type

sudo gedit Messages_hi.properties

Type the next command as shown to open the Messages_hi.properties file in gedit text editor.

You can use any editor of your choice, as well. If prompted, type the root user password.

Point to Messages_hi.properties Messages_hi.properties file opens in the text editor.
Narration only The file contains key-value pairs.
Highlight browse.page-title For example browse.page-title is the key.

Keys are referenced in the DSpace source code and not visible in the UI.

Highlight Browsing DSpace Browsing DSpace is the value.

Values are visible in the UI of DSpace.

Narration Only To localize the UI content in Hindi, it is required to translate all the values in Hindi.

For demonstration, we will translate only the menus in the navigation bar.

Open HindiTranslation.txt file HindiTranslation.txt file has been provided to you in the Code files link.

For ease of practice, we have provided the Hindi translations for the keys for the navigation bar here.

Switch back to Messages_hi.properties Switch back to the Messages_hi.properties file.
Translate values in Messages_hi.properties file

Highlight as per the narration

Translate the values in Messages_hi.properties file as shown.

I have translated the values for

  • jsp.layout.navbar-default.home
  • jsp.layout.navbar-default.browse
  • jsp.layout.navbar-default.help
  • jsp.layout.navbar-default.search
  • jsp.layout.navbar-default.sign
  • jsp.layout.navbar-default.language
Save and close the file Save and close the file.
Narration Only Next, let us encode Messages_hi.properties file to ASCII encoding.
[Terminal] : Type

native2ascii -encoding UTF-8 Messages_hi.properties Messages_hi.properties

To do so, on the terminal, type the command as shown.
[Terminal] : Type

$HOME/Rebuild-DSpace

Next we have to Rebuild DSpace with this command.

If prompted, type the root user password.

Point to Build Successful message DSpace Build is successful.

Let us proceed to verify all the changes in the UI.

Switch back to DSpace

Ctrl + R

Switch to DSpace and refresh the page.

It may take some time to reload the page.

Point to Language tab Observe that the Language option appears in the navigation bar next to the “Sign on to” option.
Click on Language tab Click on the Language tab.
Point to drop down list A list of all the supported languages is shown.
Select Hindi from drop down Select Hindi from the drop-down list.
Point to Navigation bar The menus in the navigation bar get translated to Hindi.
Narration only To obtain the entire page content in Hindi, translate all the values in Messages_hi.properties in Hindi.

Click on Language -> English

Let us now revert back to English.

Click on the Language tab and select English from the drop-down list.

Point to the menus The menus are now seen in English once again.
Only Narration This brings us to the end of this tutorial.

Let us summarize.

Slide: Summary In this tutorial we learnt to
  • Index the full text of Item files
  • Generate a thumbnail for the Item files
  • Enable User Interface language switcher and
  • Localize User Interface of DSpace
Slide: Assignment As an assignment,
  • Enable full text search for all the archived Items in DSpace.
  • Localize DSpace in any language of your choice.
Slide : About Spoken Tutorial project The video at the following link summarises the Spoken Tutorial project.

Please download and watch it.

Slide : Spoken Tutorial Workshops The Spoken Tutorial Project team conducts workshops and gives certificates.

For more details, please write to us.

Slide: Forums Please post your timed queries in this Forum.
Slide: Acknowledgement -I Spoken Tutorial project is funded by the Ministry of Education (MoE), Government of India.
Slide: Acknowledgement -II DSpace Spoken Tutorial series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.
Narration only This script and video for this tutorial was contributed by Pankaj Patil from IIT Bombay.

And this is Nancy Varkey signing off. Thanks for joining.

Contributors and Content Editors

Nancyvarkey, Pankajpatil694