Difference between revisions of "DSpace/C3/General-Settings-in-DSpace/English"
(Created page with "'''Script : General Settings in DSpace''' '''Author : Pankaj Patil''' '''Keywords: DSpace General Settings, DSpace language setting, Localization of DSpace, DSpace Languag...") |
Nancyvarkey (Talk | contribs) |
||
Line 105: | Line 105: | ||
|| Switch to '''gedit''' text editor and open the file | || Switch to '''gedit''' text editor and open the file | ||
|| I have opened the '''commands '''file in the '''gedit text editor''' on my machine. | || 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'''. | 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. | 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 | + | |
+ | The shortcut to paste on the '''terminal''' is '''Shift + Ctrl '''and '''V '''keys. | ||
|- | |- | ||
|| Press '''Ctrl+Alt+T '''keys | || Press '''Ctrl+Alt+T '''keys | ||
|| Open the '''terminal''' by pressing '''Ctrl + Alt + T''' keys simultaneously on the keyboard. | || Open the '''terminal''' by pressing '''Ctrl + Alt + T''' keys simultaneously on the keyboard. | ||
+ | |||
Ensure that you have '''root permissions''' to run the '''commands'''. | Ensure that you have '''root permissions''' to run the '''commands'''. | ||
|- | |- | ||
Line 119: | Line 123: | ||
'''sudo su - dspace''' | '''sudo su - dspace''' | ||
|| Before we begin, we will '''log in''' as '''user dspace'''. | || Before we begin, we will '''log in''' as '''user dspace'''. | ||
+ | |||
Type '''sudo su - dspace''' | Type '''sudo su - dspace''' | ||
+ | |||
If prompted, type the '''admin user password '''to '''login'''. | If prompted, type the '''admin user password '''to '''login'''. | ||
|- | |- | ||
Line 126: | Line 132: | ||
Root Password: '''dupass''' | Root Password: '''dupass''' | ||
|| Now type the '''command''' as shown to '''run media filters.''' | || Now type the '''command''' as shown to '''run media filters.''' | ||
+ | |||
If prompted, type the '''root user password.''' | If prompted, type the '''root user password.''' | ||
+ | |||
'''Media filtering''' has begun for all the uploaded '''Item''' files. | '''Media filtering''' has begun for all the uploaded '''Item''' files. | ||
+ | |||
It may take some time depending on the number of '''Item''' files. | It may take some time depending on the number of '''Item''' files. | ||
|- | |- | ||
Line 135: | Line 144: | ||
|| Point to '''HPC-Article.pdf.jpg''' file | || Point to '''HPC-Article.pdf.jpg''' file | ||
|| Observe that the '''media filter''' has created a '''jpg '''image for each '''Item''' 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. | These '''jpg '''files are used as '''thumbnails''' for the '''Item''' files. | ||
|- | |- | ||
Line 196: | Line 206: | ||
|| Switch to the '''terminal'''. | || Switch to the '''terminal'''. | ||
Type the '''command''' as shown to open the '''dspace.cfg''' file in the '''gedit text editor'''. | 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. | You can do so in the '''editor''' of your choice, as well. | ||
|- | |- | ||
Line 203: | Line 214: | ||
|| Point to '''i18n-Locales/Language''' | || Point to '''i18n-Locales/Language''' | ||
|| Locate the section '''i18n-Locales/Language.''' | || Locate the section '''i18n-Locales/Language.''' | ||
+ | |||
It is used to '''configure''' the '''language settings''' of '''DSpace.''' | It is used to '''configure''' the '''language settings''' of '''DSpace.''' | ||
|- | |- | ||
Line 261: | Line 273: | ||
'''sudo gedit Messages_hi.properties''' | '''sudo gedit Messages_hi.properties''' | ||
|| Type the next '''command''' as shown to open the '''Messages_hi.properties '''file in '''gedit text editor'''. | || 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. | You can use any '''editor''' of your choice, as well. | ||
+ | |||
If prompted, type the '''root user password'''. | If prompted, type the '''root user password'''. | ||
|- | |- |
Latest revision as of 15:41, 1 July 2021
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
|
Slide: System requirements | This tutorial is recorded using
However, you may use any other web browser and text editor of your choice. |
Slide: Pre-requisites | To practice this tutorial, you should have
|
Slide: Pre-requisites |
|
Slide : Code files |
|
Slide: Search in DSpace |
|
Slide:Full text Indexing for Items |
|
Slide: Media Filters | Media Filters can extract text from the following formats.
|
Slide: Media Filters |
|
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 |
|
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 |
|
Slide: Localization of Messages.properties |
Messages_< ISO 639-1 code of language>.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
|
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
|
Slide: Assignment | As an assignment,
|
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. |