Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning

This page is in DRAFT

Summary

Table of Contents
indentcercle
excludeSummary

...

To illustrate the process of integrating new languages, we will give examples of how the French Canadian linguistic context is integrated into VIVO.

Methodological overview

The method developed to integrate a new linguistic context into VIVO is an Agile one that involves a development cycle punctuated by evolutionary iterations whose purpose is the introduction of new language into VIVO. Source code control aspects are deliberately not dealt with in this methodology in order to leave each team free to deal with this subject according to the governance rules specific to the institution leading the project.

Development Cycle

la figure ci-dessous schématise la méthodologie d'intégration de nouveaux langages dans VIVO. The cyclical, incremental and evolutionary methodology allows a segmentation of the tasks to be carried out. From the cyclical point of view, the methodology is segmented in five steps. At each iteration, the five steps punctuate the development cycle. Each iteration targets a specific point to be addressed which is defined in the goal to be reached in the iteration. Si

...

  • Step 1) At the beginning of the cycle, the first step is to compile, deploy, and run the Vivo instance on the local computer.
  • Step 2) The second step is to test and identify problems related to internationalization.
  • Step 3) If everything works properly this ends the development cycle.
    • When a problem is identified it is necessary to search the code to find the problem.
    • This involves doing a lot of pattern managing search activities.
  • Step 4) In fourth place, comes the stage of correcting the problem.
    • Once the problem has been identified, the professional must edit the concerned file to make correction.
  • Step 5) In step five certain databases need to be initialized depending on the type of correction made.
    • Then back to step one of recompiling and running vivo.

Development iteration

The development of VIVO's internationalization is an iterative process that requires several iterations before full internationalization is achieved. Each iteration runs through the development cycle we discussed earlier. In the following section we will present the different iterations by demonstrating the internationalization of the French Canadian. Each iteration will contain a section describing the purpose of the iteration, a section demonstrating each stage of the development cycle, and in conclusion a summary explaining the highlights of the iteration.

...

Iteration 1: Initial Start - Preparing and initializing the development environment

Goal:

This itération consists in setting up the software elements necessary to run an VIVO instance on a local host and prepare directories to undertake the task of internationalizing VIVO's content.

At the end of this iteration all software and data components will be in place to start the process of translating the files into the target language. French Canadian will be used as the demonstration language.

Item A) VIVO's software infrastructure installation

A.1 Linux configuration

Assume the configuration of the following environment variables

...

Secondly, it is essential to install the Apache Tomcat application server. You will find the necessary instructions for its installation at the following link: Installing Tomcat 8.5 for Vivo-1.11.0-i18n

A.2 UQAM-DEV

An alternative VIVO deployment management solution is also available. You can see it here: UQAM-DEV R.3 : An Interoperable UQAM Development Environment for VIVO (UQAM-DEV)

Item B) Configuring the source code workspace and extracting the code

StepAction

1) Creating the GIT directory

Whether under Windows or on Unix it is necessary to create a space in which it is possible to work. As proposals we suggest creating a directory called under the Tomcat root directory. In the case of users and Unix we suggest to carry out the operations under the tomcat username. This precaution facilitates the management of credentials associated with development under Linux.


Code Block
languagebash
sudo -i -u tomcat # sudo in Linux - not on Windows
mkdir $TOMCAT_HOME/GIT # $TOMCAT_HOME is predefined at the installation of Tomcat
cd $TOMCAT_HOME/GIT


2) Retrieving VIVO the code

To VIVO internationalization, it is necessary to extract the four following GitHub repo:




Code Block
languagebash
git clone https://github.com/vivo-project/Vitro.git Vitro -b sprint-i18n
git clone https://github.com/vivo-project/VIVO.git VIVO -b sprint-i18n
git clone https://github.com/vivo-project/VIVO-languages VIVO-languages -b sprint-i18n
git clone https://github.com/vivo-project/Vitro-languages Vitro-languages -b sprint-i18n
git clone https://github.com/vivo-project/sample-data.git


3) Retrieving UQAM VIVO-installer

The installer makes it easy to manage the compilation and deployment of the VIVO i18n instance.


Code Block
languagebash
git clone https://github.com/UQAM-SB/VIVO-installer -b sprint-i18n


Item C) Configuring the VIVO search accelerator (SOLR)

StepAction

1) Configuring SOLR

follow the configuration steps available at this link: Configure and Start Solr


2) Check vivocore in Solr


Code Block
sudo systemctl start solr
http://localhost:8983/solr/#/vivocore_i18n/core-overview

Item D) Preparing VIVO for first start

StepAction

1) Create VIVO home


Code Block
languagebash
sudo -i -u tomcat # for Linux user
mkdir -p $VIVO_HOME
cp -r $TOMCAT_HOME/GIT/vivo-uqam-i18n/vivo-project-i18n-config/vivo_i18n/home/* $VIVO_HOME/home/


2) Edit runtime.properties file

Make sure that attribute properties fit with current installation




Code Block
languagebash
sudo -u tomcat vi $VIVO_HOME/config/runtime.properties


Code Block
languagebash
titleruntime.properties
Vitro.defaultNamespace = http://<your-server-ip-address>:8080/vivo_i18n/individual/
...

rootUser.emailAddress = YOUR_ADRESS
rootUser.passwordChangeRequired = false
rootUser.password = YOUR-PASSWORD
...

vitro.local.solr.url = http://<server-ip-address>:8983/solr/vivocore_i18n
...
RDFService.languageFilter = true
languages.selectableLocales = en_US, de_DE


3) Edit applicationSetup.n3 for TDB data persistence


Code Block
languagetext
titleapplicationSetup.n3
# UNCOMMENT
:tdbContentTripleSource
    a   vitroWebapp:triplesource.impl.tdb.ContentTripleSourceTDB ,
        vitroWebapp:modules.tripleSource.ContentTripleSource ;
    # May be an absolute path, or relative to the Vitro home directory.
    :hasTdbDirectory "tdbContentModels" .

:sparqlContentTripleSource
    a   vitroWebapp:triplesource.impl.sparql.ContentTripleSourceSPARQL ,
        vitroWebapp:modules.tripleSource.ContentTripleSource ;
    # The URI of the SPARQL endpoint for your triple-store.
    :hasEndpointURI "http://localhost:3030/vivo/query" ;
    # The URI to use for SPARQL UPDATE calls against your triple-store. 
    :hasUpdateEndpointURI "http://localhost:3030/vivo/update" .

COMMENT
#:sdbContentTripleSource
#    a   vitroWebapp:triplesource.impl.sdb.ContentTripleSourceSDB ,
#        vitroWebapp:modules.tripleSource.ContentTripleSource .

#REPLACE
:application
    a   vitroWebapp:application.ApplicationImpl ,
        vitroWebapp:modules.Application ;
    :hasSearchEngine              :instrumentedSearchEngineWrapper ;
    :hasSearchIndexer             :basicSearchIndexer ;
    :hasImageProcessor            :iioImageProcessor ;
    :hasFileStorage               :ptiFileStorage ;
    :hasContentTripleSource       :tdbContentTripleSource ;
#    :hasContentTripleSource       :sdbContentTripleSource ;
#    :hasConfigurationTripleSource :tdbConfigurationTripleSource ;
    :hasConfigurationTripleSource :tdbConfigurationTripleSource ;
    :hasTBoxReasonerModule        :jfactTBoxReasonerModule .


4) Edit and configure VIVO installation setting file 


Check that the file contains the following code:


Code Block
languagebash
cd $GIT_REPO/Vivo-installer
sudo -u tomcat cp example_settings_i18n_linux.xml settings.xml
sudo -u tomcat vi settings.xml


Code Block
languagexml
titlesettings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
        <profiles>
                <profile>
                        <id>defaults</id>
                        <properties>
                                <app-name>vivo_i18n</app-name>
                                <vivo-dir>/opt/tomcat/vivo_i18n/home</vivo-dir>
                                <tomcat-dir>/opt/tomcat</tomcat-dir>
                                <default-theme>wilma</default-theme>
                        </properties>
                </profile>
        </profiles>
        <activeProfiles>
                <activeProfile>defaults</activeProfile>
        </activeProfiles>
</settings>


Item E) Compiling VIVO

This activity consists in making a first compilation of VIVO i18n.

StepAction

1) check the state of the Git directory before starting the compilation

make sure that all directories are present and are all at the same hierarchical level in Git directories


Code Block
languagebash
titleCommand
cd $GIT_REPO
ls -al


Code Block
languagebash
titleResult
drwxrwxr-x ... Vitro
drwxrwxr-x  ... Vitro-languages
drwxrwxr-x  ... VIVO
drwxrwxr-x  ... VIVO-installer
drwxrwxr-x  ... VIVO-languages


2) start compiling

Before starting the compilation make sure you have correctly configured the settings_i18n_linux.xml file as described above. The -DskipTests option is optional.


Info

Make sure that the war file is installed in the appropriate tomcat directory.



Code Block
languagebash
titleCommand
cd VIVO-installer
mvn -s settings.xml -DskipTests=true install 

At the end you should see a compilation end looking like this:

Code Block
languagebash
titleResult
[INFO] 
[INFO] --- maven-dependency-plugin:2.10:unpack (install) @ vivo-installer-vivo ---
[INFO] Configured Artifact: org.vivoweb:vivo-installer-vivo:1.11.2-SNAPSHOT:war
[INFO] Unpacking /opt/tomcat/GIT/Vivo-installer-i18n/webapp/target/vivo.war to /opt/tomcat/webapps/vivo_i18n with includes "" and excludes ""
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for VIVO Installer for i18n 1.11.2-SNAPSHOT:
[INFO] 
[INFO] Vitro Home ......................................... SUCCESS [ 2.409 s]
[INFO] VIVO Home .......................................... SUCCESS [ 1.453 s]
[INFO] VIVO Languages for Home en_US ...................... SUCCESS [ 0.340 s]
[INFO] VIVO Languages for Home de_DE ...................... SUCCESS [ 0.036 s]
[INFO] VIVO Languages for Home es ......................... SUCCESS [ 0.034 s]
[INFO] VIVO Languages for Home pt_BR ...................... SUCCESS [ 0.027 s]
[INFO] VIVO Languages for Home en_CA ...................... SUCCESS [ 0.024 s]
[INFO] VIVO Languages for Home CORE ....................... SUCCESS [ 0.105 s]
[INFO] VIVO Installer for i18n ............................ SUCCESS [ 0.151 s]
[INFO] Vitro Install Home for i18n ........................ SUCCESS [ 1.382 s]
[INFO] Vitro Dependencies ................................. SUCCESS [ 0.447 s]
[INFO] Vitro API .......................................... SUCCESS [ 1.295 s]
[INFO] Vitro Web App ...................................... SUCCESS [ 0.882 s]
[INFO] Vitro Languages for Web App en_US .................. SUCCESS [ 0.313 s]
[INFO] Vitro Languages for Web App de_DE .................. SUCCESS [ 0.064 s]
[INFO] Vitro Languages for Web App es ..................... SUCCESS [ 0.042 s]
[INFO] Vitro Languages for Web App pt_BR .................. SUCCESS [ 0.051 s]
[INFO] Vitro Languages for Web App en_CA .................. SUCCESS [ 0.099 s]
[INFO] Vitro Languages for Web App CORE ................... SUCCESS [ 0.212 s]
[INFO] VIVO API ........................................... SUCCESS [ 0.379 s]
[INFO] VIVO Web App ....................................... SUCCESS [ 1.146 s]
[INFO] VIVO Languages for Web App en_US ................... SUCCESS [ 0.027 s]
[INFO] VIVO Languages for Web App de_DE ................... SUCCESS [ 0.104 s]
[INFO] VIVO Languages for Web App es ...................... SUCCESS [ 0.039 s]
[INFO] VIVO Languages for Web App pt_BR ................... SUCCESS [ 0.034 s]
[INFO] VIVO Languages for Web App en_CA ................... SUCCESS [ 0.026 s]
[INFO] VIVO Languages for Web App CORE .................... SUCCESS [ 0.085 s]
[INFO] VIVO WebApp Install dependencies for i18n .......... SUCCESS [ 0.002 s]
[INFO] VIVO Install Web App for i18n ...................... SUCCESS [ 4.094 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.851 s
[INFO] Finished at: 2020-09-23T14:50:52-07:00
[INFO] ------------------------------------------------------------------------


Item F) Preparing sample data

This activity is the first step in internationalization. It involves creating an internationalized test data file in the target language that will be used to assess the quality of the internationalization of the different VIVO modules.

StepAction

1) access the sample file

Extract the sample file from GitHub


Code Block
languagebash
git clone https://github.com/vivo-project/sample-data.git   


2) build a translated file in the target language

This step consists of copying language files from the directory is in the target language and translating the content into the new language and associating the appropriate linguistic tag to it.


Warning

Notes: Make sure that your file is in UTF-8 format.


Info

This procedure is for explanatory purposes, it is not to be carried out for fr_CA since the file sample-data-fr_CA.ttl already exists in the repo.



Code Block
languagebash
cd $GIT_REPO/sample-data/i18n
cp sample-data-en_US.ttl sample-data-fr_CA.ttl
edit sample-data-fr_CA.ttl

#- sample change

Code Block
languagetext
titleChange from
sample-data:n1246
rdfs:label "ENC 1114 -- Introduction to Rhetoric"@en-US ;
.


Code Block
languagetext
titleChange to
sample-data:n1246
rdfs:label "ENC 1114 -- Intruction à la Rhétorique"@fr-CA ;
.


3) Install the files so that they are processed each time VIVO is started.


Code Block
languagetext
titleChange to
cp sample-data.ttl sample-data-en_US.ttl sample-data-fr_CA.ttl $VIVO_HOME/rdf/abox/filegraph


Item G) Starting VIVO

StepAction

1) Start TOMCAT

After making the appropriate configurations move to the TOMCAT executables directory and launch the application.


Code Block
languagebash
cd $TOMCAT_HOME/bin
./start.sh


2) Monitoring the execution

after running the "taill -f" command you can do ^C to stop the Monitoring 


Code Block
languagebash
cd $TOMCAT_HOME/log
tail - f 

.createCacheHeaders=true, languages.selectableLocales=en_US, de_DE, orcid.api=sandbox, orcid.apiVersion=2.0, orcid.clientId=APP-MWPTQ7Z850AY2GCH, orcid.clientPassword=5eeb8f1e-05fd-4aa3-af3f-3bf12911f683, orcid.externalIdCommonName=Universit� du Qu�bec � Montr�al, orcid.webappBaseUrl=http://locahost:8080/vivo/, proxy.eligibleTypeList=http://xmlns.com/foaf/0.1/Person, http://xmlns.com/foaf/0.1/Organization, rootUser.emailAddress=vivo@uqam.ca, rootUser.password=Vivo2435...., rootUser.passwordChangeRequired=false, rp.multiple=config, selfEditing.idMatchingProperty=http://localhost:8080/ns#networkId, , vitro.local.solr.url=http://localhost:8983/solr/vivocore_i18n}]
2020-09-23 15:32:27,278 INFO [RevisionInfoBean] Revision info [build date: 20-09-23 22 h 18, level info: [[VIVO, 1.11.2-SNAPSHOT, d3e9606]]]
2020-09-23 15:32:27,321 WARN [StartupStatus] From FreemarkerEmailFactory$Setup: Invalid SMTP host: 'smtp.mydomain.edu': host name is not recognized - Email functions are disabled.
2020-09-23 15:32:27,383 INFO [RDFFilesLoader] Loading rdf/display/everytime/dataGetterLabels.n3
2020-09-23 15:32:27,384 INFO [RDFFilesLoader] Loading rdf/display/everytime/displayModelListViews.rdf
2020-09-23 15:32:27,386 INFO [RDFFilesLoader] Loading rdf/display/everytime/homePageDataGetters.n3
2020-09-23 15:32:27,388 INFO [RDFFilesLoader] Loading rdf/display/everytime/localeSelectionGUI.n3
2020-09-23 15:32:27,389 INFO [RDFFilesLoader] Loading rdf/display/everytime/n3ModelChangePreprocessors.n3
2020-09-23 15:32:27,390 INFO [RDFFilesLoader] Loading rdf/display/everytime/orcidInterfaceDataGetters.n3
2020-09-23 15:32:27,392 INFO [RDFFilesLoader] Loading rdf/display/everytime/pageList.n3
2020-09-23 15:32:27,393 INFO [RDFFilesLoader] Loading rdf/display/everytime/permissions.n3
2020-09-23 15:32:27,399 INFO [RDFFilesLoader] Loading rdf/display/everytime/searchIndexerConfigurationVitro.n3
2020-09-23 15:32:27,404 INFO [RDFFilesLoader] Loading rdf/display/everytime/searchIndexerConfigurationVivo.n3
2020-09-23 15:32:27,410 INFO [RDFFilesLoader] Loading rdf/display/everytime/vitroSearchProhibited.n3
2020-09-23 15:32:27,411 INFO [RDFFilesLoader] Loading rdf/display/everytime/vivoConceptDataGetters.n3
2020-09-23 15:32:27,414 INFO [RDFFilesLoader] Loading rdf/display/everytime/vivoListViewConfig.rdf
2020-09-23 15:32:27,426 INFO [RDFFilesLoader] Loading rdf/display/everytime/vivoOrganizationDataGetters.n3
2020-09-23 15:32:27,431 INFO [RDFFilesLoader] Loading rdf/display/everytime/vivoQrCodeDataGetter.n3
2020-09-23 15:32:27,434 INFO [RDFFilesLoader] Loading rdf/display/everytime/vivoSearchProhibited.n3
2020-09-23 15:32:27,440 INFO [RDFFilesLoader] Loading rdf/displayTbox/everytime/displayTBOX.n3
2020-09-23 15:32:27,450 INFO [RDFFilesLoader] Loading rdf/displayDisplay/everytime/displayDisplay.n3
2020-09-23 15:32:27,453 INFO [RDFFilesLoader] Loading rdf/auth/everytime/permission_config.n3
2020-09-23 15:32:27,464 INFO [RDFFilesLoader] Loading rdf/tbox/everytime/initialTBoxAnnotations_de_DE.nt
2020-09-23 15:32:27,490 INFO [RDFFilesLoader] Loading rdf/tbox/everytime/initialTBoxAnnotations_en_US.nt
2020-09-23 15:32:28,738 INFO [FileGraphSetup] Read 12 abox file graphs
2020-09-23 15:32:29,173 INFO [FileGraphSetup] Read 6 tbox file graphs


3) Observing the execution

After logging in to VIVO and passing the smocktest you should see a presentation similar to this one. If you don't observe people in the faculties make sure that the example files are copied to the right place as indicated above or that Solr has been started

.

Iteration summary

The objective of this iteration was to set up the software environment necessary for the integration of the new language. At this point an instance of TOMCAT, Solr, as well as the deployment of the en_US version of VIVO and an example file are fully operational and executable.

...

Iteration 2: Creating the directory structure of the target language context

Goal

The goal of this iteration is to add the French Canadian linguistic context to the VIVO language selector. This goal includes the sub goal of initiating the implementation of the directory structure necessary to integrate the files needed to manage French Canadian in VIVO.

The methodological entry point of this iteration is step three

Step 3) Searching for the problematic file in the VIVO source code

The first functionality addressed in the internationalization and language management assumed by VIVO's language selector. As shown in the image below, the selector in its current state does not manage French Canadian. This iteration therefore consists in introducing French Canadian into the VIVO language selector.

Step 4) Editing the problematics files

4-1 Property, theme and other generic files

Several directory structures and files need to be set up to initialize the implementation of the linguistic context in VIVO. 

...

StepAction

1) Create directory structures in Vitro-languages and VIVO-languages

The demonstration is for the integration of the French Canadian fr_CA in Vitro-languages and VIVO-Languages


Code Block
languagebash
titlePreparing Vitro-languages
cd $GIT_REPO/Vitro-languages
cp -r en_US fr_CA
mv en_US/webapp/src/main/webapp/i18n/all_en_US.properties fr_CA/webapp/src/main/webapp/i18n/all_fr_CA.properties


Code Block
languagebash
titlePreparing VIVO-languages
cd $GIT_REPO/VIVO-languages
cp -r en_US fr_CA
mv en_US/webapp/src/main/webapp/i18n/vivo_all_en_US.properties fr_CA/webapp/src/main/webapp/i18n/vivo_all_fr_CA.properties 
mv fr_CA/webapp/src/main/webapp/themes/wilma/i18n/all_en_US.properties fr_CA/webapp/src/main/webapp/themes/wilma/i18n/all_fr_CA.properties
mv fr_CA/webapp/src/main/webapp/themes/tenderfoot/i18n/all_en_US.properties fr_CA/webapp/src/main/webapp/themes/tenderfoot/i18n/all_fr_CA.properties


2) Translate the content of each properties file into the target language (here, the en_CA)


Code Block
titleCanadian French Translation example
save_changes=Sauvegarder
save_entry=Sauvegarder
select_existing=Choisir l'enregistrement existant
select_an_existing=Choisir un enregistrement existant
add_an_entry_to=Ajouter un enregistrement de type 
change_entry_for=Modifier l'enregistrement pour: 
add_new_entry_for=Ajouter un enregistrement pour: 
change_text_for=Changement du texte pour: 
cancel_link = Annuler
cancel_title = annuler
required_fields = champs requis


3) Creating themes

Copy and adapt the themes from en_US to en_CA for  VIVO-Languages

Translate each file of type en_US in the fr_CA/.../themes directory

  • translate the content into the target language
  • rename the file extension xxx_en_US.xxx with the extension of the target language (e.g. xxx_en_CA.xxx)



Code Block
mkdir -p VIVO-languages/fr_CA/webapp/src/main/webapp/themes/
cp -r VIVO-languages/en_US/webapp/src/main/webapp/themes/* VIVO-languages/fr_CA/webapp/src/main/webapp/themes/


4) Creating resources directory and assembly file

  • the 'home.xml' file is necessary to ensure a viable compilation of the language files.
  • Only VIVO-languages contains home.xml file
  • Although is empty, it is necessary to create the directory resources 


Code Block
mkdir -p /VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA
mkdir -p VIVO-languages/fr_CA/home/src/main/assembly/
cp VIVO-languages/en_US/home/src/main/assembly/home.xml VIVO-languages/fr_CA/home/src/main/assembly/


Step 5) If necessary reset the various VIVO's indexes and databases

No action to do at this step for this iteration

Step 1) Compile and deploye a new/corrected instance of VIVO and start it

This step consists of integrating the new language into the VIVO installation process. To do this, a set of POM files need to be created or modified.

1-1 POM files for compilation

1-1-1 Steps to carry out from the Vitro-languages directory 

StepAction

Edit and modify  ./core/pom.xml

Add lines 6 to 11 in the <depedencies> section in the POM file


Code Block
languagexml
themeConfluence
linenumberstrue
...
    <artifactId>vitro-languages-webapp-es</artifactId>
    <version>${project.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vitro-languages-webapp-fr_CA</artifactId>
    <version>${project.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>org...


Edit and modify

./fr_CA/web_app/pom.xml

Pay particular attention to the version number which must correspond to the version currently under development.

...

  <modelVersion>4.0.0</modelVersion>

    <artifactId>vitro-languages-fr_CA</artifactId>
    <packaging>pom</packaging>

    <name>Vitro Languages fr_CA</name>
    <description>Vitro Languages</description>
    <url>http://vivoweb.org/</url>

...

Edit and modify 

./fr_CA/web_app/src/pom.xml

Pay particular attention to the version number which must correspond to the version currently under development.

...
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.vivoweb</groupId>
    <artifactId>vitro-languages-webapp-fr_CA</artifactId>
    <version>1.11.2-SNAPSHOT</version>
    <packaging>war</packaging>

    <parent>
        <groupId>org.vivoweb</groupId>
        <artifactId>vitro-languages-fr_CA</artifactId>
        <version>1.11.2-SNAPSHOT</version>
        <relativePath>..</relativePath>
    </parent>

    <name>Vitro Languages for Web App fr_CA</name>

...

Edit and modify  ./pom.xml

Add the following line which is in bold

...

</distributionManagement>
<modules>
    <module>core</module>
    <module>en_CA</module>
    <module>en_US</module>
    <module>es</module>
    <module>fr_CA</module>
    <module>pt_BR</module>
    <module>de_DE</module>
</modules>
</project>

1-1-2 Steps to carry out from the VIVO-languages directory 

StepAction

Edit and modify ./core/home/pom.xml

Add the dependency (in bold) in the POM file

. . .
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-home-es</artifactId>
    <version>${project.version}</version>
    <type>tar.gz</type>
</dependency>
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-home-fr_CA</artifactId>
    <version>${project.version}</version>
    <type>tar.gz</type>
</dependency>
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-home-pt_BR</artifactId>

Edit and modify ./core/webapp/pom.xml

Add the dependency (in bold) in the POM file

. . .
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-webapp-es</artifactId>
    <version>${project.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-webapp-fr_CA</artifactId>
    <version>${project.version}</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-webapp-pt_BR</artifactId>

Edit and modify ./fr_CA/home/pom.xml

Pay particular attention to the version number which must correspond to the version currently under development.

...
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-home-fr_CA</artifactId>
    <version>1.11.2-SNAPSHOT</version>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.vivoweb</groupId>
        <artifactId>vivo-languages-fr_CA</artifactId>
        <version>1.11.2-SNAPSHOT</version>
        <relativePath>..</relativePath>
    </parent>

    <name>VIVO Languages for Home fr_CA</name>

...

Edit and modify ./fr_CA/webapp/pom.xml

Pay particular attention to the version number which must correspond to the version currently under development.

...

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-webapp-fr_CA</artifactId>
    <version>1.11.2-SNAPSHOT</version>
    <packaging>war</packaging>

    <parent>
        <groupId>org.vivoweb</groupId>
        <artifactId>vivo-languages-fr_CA</artifactId>
        <version>1.11.2-SNAPSHOT</version>
        <relativePath>..</relativePath>
    </parent>

    <name>VIVO Languages for Web App fr_CA</name>
...


Edit and modify ./fr_CA/pom.xml

Pay particular attention to the version number which must correspond to the version currently under development.

...

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-fr_CA</artifactId>
    <version>1.11.2-SNAPSHOT</version>
    <packaging>pom</packaging>
    <parent>
        <groupId>org.vivoweb</groupId>
        <artifactId>vivo-languages</artifactId>
        <version>1.11.2-SNAPSHOT</version>
        <relativePath>..</relativePath>
    </parent>
    <name>VIVO Languages fr_CA</name>
    <description>VIVO Languages for fr_CA</description>
    <url>http://vivoweb.org/</url>
...


Editing ./pom.xml

Add the following line which is in bold

. . .
<modules>
    <module>core</module>
    <module>en_CA</module>
    <module>en_US</module>
    <module>es</module>
    <module>fr_CA</module>
    <module>de_DE</module>
    <module>pt_BR</module>
</modules>
. . .

1-1-3 Steps to carry out from the VIVO-installer directory

StepAction

Editing ./home/pom.xml

Add the dependency (in bold) in the POM file

. . .
<modules>
    <module>../../Vitro/home</module>
    <module>../../VIVO/home</module>
    <module>../../VIVO-languages/core/home</module>
    <module>../../VIVO-languages/en_US/home</module>
    <module>../../VIVO-languages/en_CA/home</module>
    <module>../../VIVO-languages/de_DE/home</module>
    <module>../../VIVO-languages/es/home</module>
    <module>../../VIVO-languages/pt_BR/home</module>
    <module>../../VIVO-languages/fr_CA/home</module>
</modules>
. . .

Editing ./webapp/pom.xml

Add the dependency (in bold) in the POM file

. . .

<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-webapp-en_CA</artifactId>
    <version>1.11.2-SNAPSHOT</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vitro-languages-webapp-fr_CA</artifactId>
    <version>1.11.2-SNAPSHOT</version>
    <type>war</type>
</dependency>
<dependency>
    <groupId>org.vivoweb</groupId>
    <artifactId>vivo-languages-webapp-fr_CA</artifactId>
    <version>1.11.2-SNAPSHOT</version>
    <type>war</type>
</dependency>
<dependency>
. . .

Editing ./webapp_dep/pom.xml

Add the dependency (in bold) in the POM file

. . .
<modules>
    <module>../../Vitro/api</module>
    <module>../../Vitro/dependencies</module>
    <module>../../Vitro/webapp</module>
    <module>../../Vitro-languages/core/webapp</module>
    <module>../../Vitro-languages/fr_CA/webapp</module>
    <module>../../Vitro-languages/en_US/webapp</module>
    <module>../../Vitro-languages/en_CA/webapp</module>
    <module>../../Vitro-languages/de_DE/webapp</module>
    <module>../../Vitro-languages/es/webapp</module>
    <module>../../Vitro-languages/pt_BR/webapp</module>
    <module>../../VIVO/api</module>
    <module>../../VIVO/webapp</module>
    <module>../../VIVO-languages/core/webapp</module>
    <module>../../VIVO-languages/fr_CA/webapp</module>
    <module>../../VIVO-languages/en_US/webapp</module>
    <module>../../VIVO-languages/en_CA/webapp</module>
    <module>../../VIVO-languages/de_DE/webapp</module>
    <module>../../VIVO-languages/es/webapp</module>
    <module>../../VIVO-languages/pt_BR/webapp</module>
</modules>
. . .

1-2 Compiling VIVO


Action

Start compiling

Before starting the compilation make sure you have correctly configured the settings_i18n_linux.xml file as described above. The -DskipTests option is optional.


Info

Make sure that the war file is installed in the appropriate tomcat directory.


Observe lines 9, 21 and 30 which indicate that the new language is included in the installation process.


Code Block
languagebash
titleCommand
cd $GIT_REPO/VIVO-installer
mvn -s settings.xml -DskipTests=true clean install 

At the end you should see a compilation end looking like this:


Code Block
languagebash
titleResult
linenumberstrue
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for VIVO Installer for i18n 1.11.2-SNAPSHOT:
[INFO] 
[INFO] Vitro Home ......................................... SUCCESS [ 3.782 s]
[INFO] VIVO Home .......................................... SUCCESS [ 1.523 s]
[INFO] VIVO Languages for Home en_US ...................... SUCCESS [ 0.345 s]
[INFO] VIVO Languages for Home de_DE ...................... SUCCESS [ 0.042 s]
[INFO] VIVO Languages for Home es ......................... SUCCESS [ 0.025 s]
[INFO] VIVO Languages for Home fr_CA ...................... SUCCESS [ 0.020 s]
[INFO] VIVO Languages for Home pt_BR ...................... SUCCESS [ 0.025 s]
[INFO] VIVO Languages for Home en_CA ...................... SUCCESS [ 0.023 s]
[INFO] VIVO Languages for Home CORE ....................... SUCCESS [ 0.116 s]
[INFO] VIVO Installer for i18n ............................ SUCCESS [ 0.185 s]
[INFO] Vitro Install Home for i18n ........................ SUCCESS [ 1.921 s]
[INFO] Vitro Dependencies ................................. SUCCESS [ 0.553 s]
[INFO] Vitro API .......................................... SUCCESS [ 47.060 s]
[INFO] Vitro Web App ...................................... SUCCESS [ 1.268 s]
[INFO] Vitro Languages for Web App en_US .................. SUCCESS [ 0.369 s]
[INFO] Vitro Languages for Web App de_DE .................. SUCCESS [ 0.055 s]
[INFO] Vitro Languages for Web App es ..................... SUCCESS [ 0.055 s]
[INFO] Vitro Languages for Web App fr_CA .................. SUCCESS [ 0.040 s]
[INFO] Vitro Languages for Web App pt_BR .................. SUCCESS [ 0.048 s]
[INFO] Vitro Languages for Web App en_CA .................. SUCCESS [ 0.053 s]
[INFO] Vitro Languages for Web App CORE ................... SUCCESS [ 0.136 s]
[INFO] VIVO API ........................................... SUCCESS [ 16.578 s]
[INFO] VIVO Web App ....................................... SUCCESS [ 1.399 s]
[INFO] VIVO Languages for Web App en_US ................... SUCCESS [ 0.034 s]
[INFO] VIVO Languages for Web App de_DE ................... SUCCESS [ 0.058 s]
[INFO] VIVO Languages for Web App es ...................... SUCCESS [ 0.046 s]
[INFO] VIVO Languages for Web App fr_CA ................... SUCCESS [ 0.034 s]
[INFO] VIVO Languages for Web App pt_BR ................... SUCCESS [ 0.043 s]
[INFO] VIVO Languages for Web App en_CA ................... SUCCESS [ 0.038 s]
[INFO] VIVO Languages for Web App CORE .................... SUCCESS [ 0.096 s]
[INFO] VIVO WebApp Install dependencies for i18n .......... SUCCESS [ 0.004 s]
[INFO] VIVO Install Web App for i18n ...................... SUCCESS [ 4.458 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:21 min
[INFO] Finished at: 2020-10-30T06:44:16-07:00
[INFO] ------------------------------------------------------------------------


Step 2) Running VIVO for testing and/or finding an i18n problem

Running VIVO verifies that the linguistic context " Français (Canada) " fr_CA is functional.

Iteration summary

This iteration will have served to integrate the structure of the new language into VIVO. A first series of actions will have allowed to add and configure the necessary files to display the contextual linguistic menue including fr_CA. A second series of actions has been used to configure and add the necessary files for the compilation of VIVO by the i18n_installer program, including fr_CA.


...

Iteration 3: Configuring menus

Goal

The purpose of this iteration is to configure the necessary files to ensure that the menus are presented in the proper linguistic context.

Step 3) Searching for the problematic file in the VIVO source code

The screenshot below indicates (circled in red) menu items that are not in the French Canadian context and need to be corrected.

Step 4) Editing the problematic files

4-1 Editing applicationMetadata files

The value of the fields displayed in the different menus is stored in the file classgroups_LINGUISTIC_CONTEXT.ttl and propertygroups_LINGUISTIC_CONTEXT.ttl  contained in the directory: VIVO-languages/LINGUISTIC_CONTEXT/home/src/main/resources/rdf/i18n/LINGUISTIC_CONTEXT/applicationMetadata/firsttime

...

StepAction
Moving directory structure to appropriate linguistic context


Code Block
cd ${GIT_REPO}
mv VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/en_US VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA


Renaming ontologies

From

VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/applicationMetadata/firsttime/

Renaming classgroups_en_US.nt to classgroups_fr_CA.nt

and

Renaming propertygroups_labels_en_US.nt to propertygroups_labels_fr_CA.nt


Code Block
cd ${GIT_REPO}
cd VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/applicationMetadata/firsttime/
mv classgroups_labels_en_US.nt classgroups_labels_fr_CA.nt
mv propertygroups_labels_en_US.nt propertygroups_labels_fr_CA.nt 




Change the content to approrpiate language. Both text and linguistic tag


Code Block
title classgroups_fr_CA.nt
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
@prefix vivo: <http://vivoweb.org/ontology#> .
vivo:vitroClassGroupactivities rdfs:label "Activités"@fr-CA .
vivo:vitroClassGroupcourses rdfs:label "Cours"@fr-CA .
vivo:vitroClassGroupequipment rdfs:label "Équipement"@fr-CA .
vivo:vitroClassGroupevents rdfs:label "Événements"@fr-CA .
vivo:vitroClassGrouplocations rdfs:label "Lieux"@fr-CA .
vivo:vitroClassGrouporganizations rdfs:label "Organisations"@fr-CA .
vivo:vitroClassGrouppeople rdfs:label "Personnes"@fr-CA .
vivo:vitroClassGrouppublications rdfs:label "Recherche"@fr-CA .


Code Block
titlepropertygroups_labels_fr_CA.nt
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vivo: <http://vivoweb.org/ontology#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
vivo:vitroPropertyGroupaddress rdfs:label "Coordonnées"@fr-CA .
vivo:vitroPropertyGroupaffiliation rdfs:label "Affiliations"@fr-CA .
vivo:vitroPropertyGroupbibliographic rdfs:label "Publications"@fr-CA .
vivo:vitroPropertyGroupbibliographiconline rdfs:label "Documents associés"@fr-CA .
vivo:vitroPropertyGroupbibmapping rdfs:label "Mappage bibliographique"@fr-CA .
vivo:vitroPropertyGroupbibobscure rdfs:label "Infos supplémentaires sur le document"@fr-CA .
vivo:vitroPropertyGroupbiography rdfs:label "Expérience"@fr-CA .
vivo:vitroPropertyGroupidentifiers rdfs:label "Identifiants"@fr-CA .
vivo:vitroPropertyGrouplinks rdfs:label "Liens"@fr-CA .
vivo:vitroPropertyGrouplocation rdfs:label "Lieu"@fr-CA .
vivo:vitroPropertyGroupmapping rdfs:label "Mappage"@fr-CA .
vivo:vitroPropertyGroupoutreach rdfs:label "Services"@fr-CA .
vivo:vitroPropertyGroupoverview rdfs:label "Aperçu"@fr-CA .
vivo:vitroPropertyGroupresearch rdfs:label "Recherche"@fr-CA .
vivo:vitroPropertyGroupteaching rdfs:label "Enseignement"@fr-CA .
vivo:vitroPropertyGrouptime rdfs:label "Temps"@fr-CA .


4-2 Editing DISPLAY files

StepAction

Move to display and renaming ontologies:

Menu, PropertyConif and aboutPage




Code Block
${GIT_REPO}
cd VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/display/firstime
mv menu_en_US.nt menu_fr_CA.nt
mv PropertyConfig_en_US.nt PropertyConfig_fr_CA.nt
mv aboutPage.nt aboutPage_fr_CA.nt


Change the content to approrpiate language.

Both text and linguistic tag


Code Block
titlemenu_fr_CA.nt
linenumberstrue
collapsetrue
@prefix : <http://vivoweb.org/ontology/menu_fr_CA#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix core: <http://vivoweb.org/ontology/core#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix geo: <http://aims.fao.org/aos/geopolitical.owl#> .
@prefix ns: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix skos2: <http://www.w3.org/2008/05/skos#> .
@prefix statistics: <http://purl.org/net/OCRe/statistics.owl#> .
@prefix study_protocol: <http://purl.org/net/OCRe/study_protocol.owl#> .
@prefix terms: <http://purl.org/dc/terms/> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
@prefix vivo-display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
@prefix vivo-rech: <http://vivoweb.org/ontology/scientific-research#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

vivo-display:CapabilityMap vivo-display:title "Expertises"@fr-CA .
vivo-display:CapabilityMapMenuItem vivo-display:linkText "Expertises"@fr-CA .
vivo-display:DefaultMenu rdfs:label "Menu par défaut"@fr-CA .
vivo-display:Events vivo-display:title "Événements"@fr-CA .
vivo-display:EventsMenuItem vivo-display:linkText "Événements"@fr-CA .
vivo-display:Home vivo-display:title "Accueil"@fr-CA .
vivo-display:HomeMenuItem vivo-display:linkText "Accueil"@fr-CA .
vivo-display:Organizations vivo-display:title "Organisations"@fr-CA .
vivo-display:OrganizationsMenuItem vivo-display:linkText "Organisations"@fr-CA .
vivo-display:People vivo-display:title "Personnes"@fr-CA .
vivo-display:PeopleMenuItem vivo-display:linkText "Personnes"@fr-CA .
vivo-display:Research vivo-display:title "Recherche"@fr-CA .
vivo-display:ResearchMenuItem vivo-display:linkText "Recherche"@fr-CA .
vivo-display:capabilityMapDataGetter vivo-display:htmlValue "Expertises"@fr-CA .
<http://vivoweb.org/ontology/menu_fr_CA> a owl:Ontology ;
owl:versionInfo "Adapted by Michel Héon, 2020, for Université du Québec à Montréal, http://uqam.ca" ;
owl:versionInfo "Translated by Pierre Roberge, 2020, for Université du Québec à Montréal, http://uqam.ca" .


Code Block
titlePropertyConfig_fr_CA.nt
linenumberstrue
collapsetrue
@prefix : <http://vivoweb.org/ontology/vitroAnnotation_fr_CA#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix c4o: <http://purl.org/spar/c4o/> .
@prefix cito: <http://purl.org/spar/cito/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix event: <http://purl.org/NET/c4dm/event.owl#> .
@prefix fabio: <http://purl.org/spar/fabio/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix geo: <http://aims.fao.org/aos/geopolitical.owl#> .
@prefix obo: <http://purl.obolibrary.org/obo/> .
@prefix ocrer: <http://purl.org/net/OCRe/research.owl#> .
@prefix ocresd: <http://purl.org/net/OCRe/study_design.owl#> .
@prefix ocresp: <http://purl.org/net/OCRe/study_protocol.owl#> .
@prefix ocrest: <http://purl.org/net/OCRe/statistics.owl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ro: <http://purl.obolibrary.org/obo/ro.owl#> .
@prefix scires: <http://vivoweb.org/ontology/scientific-research#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix swo: <http://www.ebi.ac.uk/efo/swo/> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
@prefix vitro-appconf: <http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationConfiguration#> .
@prefix vitro-config: <http://vitro.mannlib.cornell.edu/ns/vitro/siteConfig/> .
@prefix vitro-public: <http://vitro.mannlib.cornell.edu/ns/vitro/public#> .
@prefix vivo: <http://vivoweb.org/ontology/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

vitro-config:additionalEmailConfig vitro-appconf:displayName "courriels additionnels"@fr-CA .
vitro-config:addressLocationConfig vitro-appconf:displayName "lieu"@fr-CA .
vitro-config:adviseeRoleConfig vitro-appconf:displayName "mentoré(e) par"@fr-CA .
vitro-config:advisorRoleConfig vitro-appconf:displayName "Direction et mentorat"@fr-CA .
vitro-config:agentInFacilityConfig vitro-appconf:displayName "situé dans l'établissement"@fr-CA .
vitro-config:agentInGeoLocationConfig vitro-appconf:displayName "lieu"@fr-CA .
vitro-config:authorInAuthorshipConfig vitro-appconf:displayName "publications choisies"@fr-CA .
vitro-config:awardConferredByConfig vitro-appconf:displayName "prix conféré par"@fr-CA .
vitro-config:awardOrHonorConfig vitro-appconf:displayName "prix et distinctions"@fr-CA .
. . . etc.


Code Block
titleaboutPage_fr_CA.nt
linenumberstrue
collapsetrue
# $This file is distributed under the terms of the license in LICENSE$

@prefix about: <http://vitro.mannlib.cornell.edu/ns/default/about#> .

about:ABOUTDG
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter> ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#htmlValue>
"""<h2>À propos de VIVO</h2>
<div class=\"pageGroupBody\" id=\"aboutText\"><p>VIVO est une application qui permet de découvrir des chercheurs et chercheuses appartenant à différentes institutions qui opèrent leurs propres instances de VIVO ou de répertoires compatibles avec les technologies du Web sémantique. L’information globalement accessible grâce à VIVO est donc hébergée et gérée localement, au sein des différentes instances de VIVO ou de ces autres répertoires.</p>

<p>VIVO est un logiciel libre originalement développé et implanté à l’Université de Cornell. Lorsqu’installé et peuplé avec les données d’une institution, VIVO rend possible la découverte d’activités de recherche parmi les différentes disciplines de cette institution. VIVO permet d’interroger et d’explorer les données, et propose des résultats de recherche facettés qui facilitent le repérage des informations souhaitées. Le contenu d’une instance VIVO peut être édité manuellement ou intégré automatiquement depuis diverses bases de données: ressources humaines, bourses, subventions, cours et activités facultaires.</p>

<p>Pour plus d’informations, veuillez consulter la <a href=\"http://vivoweb.org\">page du projet VIVO</a>.</p></div>
"""@fr-CA ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#saveToVar>
"aboutPage" .
about:ABOUTPAGE
a <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#Page> ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#hasDataGetter>
about:ABOUTDG ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#title>
"About Page" ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#urlMapping>
"/about" .


4-3 Editing TBOX files

StepAction

Move to display and renaming ontologies:

InitialTboxAnnotation, Vivo and VitroAnnotation


Code Block
cd ${GIT_REPO}
mv VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/tbox/everytime/initialTBoxAnnotations_en_US.nt VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/tbox/everytime/initialTBoxAnnotations_fr_CA.nt 

mv VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/tbox/filegraph/vivo_fr_CA.nt VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/tbox/filegraph/vivo_fr_CA.nt

mv VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/tbox/firsttime/vitroAnnotations_en_US.n3 VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA/tbox/firsttime/vitroAnnotations_fr_CA.n3


Editing initialTBoxAnnotations_fr_CA.nt vitroAnnotations_fr_CA.n3 for content translation


Code Block
titleinititialTBoxAnnotations_fr_CA.ttl
linenumberstrue
collapsetrue
<http://vivoweb.org/ontology/core#pmcid> <http://www.w3.org/2000/01/rdf-schema#label> "ID PubMed Central"@fr-CA .
<http://purl.obolibrary.org/obo/ERO_0000071> <http://www.w3.org/2000/01/rdf-schema#label> "Software"@fr-CA .
<http://purl.org/ontology/bibo/Note> <http://www.w3.org/2000/01/rdf-schema#label> "Note"@fr-CA .
<http://www.w3.org/2006/vcard/ns#language> <http://www.w3.org/2000/01/rdf-schema#label> "a une langue"@fr-CA .
<http://vivoweb.org/ontology/core#offeredBy> <http://www.w3.org/2000/01/rdf-schema#label> "offert par"@fr-CA .
<http://vivoweb.org/ontology/core#dateTimeValue> <http://www.w3.org/2000/01/rdf-schema#label> "Date/heure"@fr-CA .
<http://vivoweb.org/ontology/core#isCorrespondingAuthor> <http://www.w3.org/2000/01/rdf-schema#label> "Est-ce que cet personne est l'auteur recherché?"@fr-CA .
<http://vivoweb.org/ontology/core#SeminarSeries> <http://www.w3.org/2000/01/rdf-schema#label> "Collections de séminaires"@fr-CA .
<http://purl.obolibrary.org/obo/ARG_0000172> <http://www.w3.org/2000/01/rdf-schema#label> "ID de patient"@fr-CA .
<http://vivoweb.org/ontology/core#supplementalInformation> <http://www.w3.org/2000/01/rdf-schema#label> "information supplémentaire"@fr-CA .
<http://www.w3.org/2006/vcard/ns#Geo> <http://www.w3.org/2000/01/rdf-schema#label> "Géo"@fr-CA .
. . . etc.


Code Block
titlevivo_fr_CA.ttl
linenumberstrue
collapsetrue
@prefix : <http://vivoweb.org/ontology/core_fr_CA#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix core: <http://vivoweb.org/ontology/core#> .
@prefix core_fr_CA: <http://vivoweb.org/ontology/core_fr_CA#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix geo: <http://aims.fao.org/aos/geopolitical.owl#> .
@prefix ns: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
@prefix obo: <http://purl.obolibrary.org/obo/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix skos2: <http://www.w3.org/2008/05/skos#> .
@prefix statistics: <http://purl.org/net/OCRe/statistics.owl#> .
@prefix study_protocol: <http://purl.org/net/OCRe/study_protocol.owl#> .
@prefix terms: <http://purl.org/dc/terms/> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
@prefix vivo-rech: <http://vivoweb.org/ontology/scientific-research#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://aims.fao.org/aos/geopolitical.owl> rdfs:label "Ontologie géopolitique"@fr-CA .
geo:GDP rdfs:label "PIB"@fr-CA .
geo:GDPNotes rdfs:label "Notes PIB"@fr-CA .
geo:GDPTotalInCurrentPrices rdfs:label "Total du PIB en prix courants"@fr-CA .
geo:GDPUnit rdfs:label "Unité de PIB"@fr-CA .
geo:GDPYear rdfs:label "GDPYear"@fr-CA .
geo:agriculturalArea rdfs:label "secteur agricole"@fr-CA .
. . . etc.


Code Block
titlevitroAnnotations.ttl
linenumberstrue
collapsetrue
@prefix : <http://vivoweb.org/ontology/vitroAnnotfr_CA#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix c4o: <http://purl.org/spar/c4o/> .
@prefix cito: <http://purl.org/spar/cito/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix event: <http://purl.org/NET/c4dm/event.owl#> .
@prefix fabio: <http://purl.org/spar/fabio/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix geo: <http://aims.fao.org/aos/geopolitical.owl#> .
@prefix obo: <http://purl.obolibrary.org/obo/> .
@prefix ocrer: <http://purl.org/net/OCRe/research.owl#> .
@prefix ocresd: <http://purl.org/net/OCRe/study_design.owl#> .
@prefix ocresp: <http://purl.org/net/OCRe/study_protocol.owl#> .
@prefix ocrest: <http://purl.org/net/OCRe/statistics.owl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ro: <http://purl.obolibrary.org/obo/ro.owl#> .
@prefix scires: <http://vivoweb.org/ontology/scientific-research#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix swo: <http://www.ebi.ac.uk/efo/swo/> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
@prefix vitro-public: <http://vitro.mannlib.cornell.edu/ns/vitro/public#> .
@prefix vivo: <http://vivoweb.org/ontology/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

dcterms:contributor
vitro:fullPropertyNameAnnot "contributor" ;
vitro:hiddenFromDisplayBelowRoleLevelAnnot <http://vitro.mannlib.cornell.edu/ns/vitro/role#nobody> ;
vitro:hiddenFromPublishBelowRoleLevelAnnot <http://vitro.mannlib.cornell.edu/ns/vitro/role#public> ;
vitro:inPropertyGroupAnnot <http://vivoweb.org/ontology#vitroPropertyGroupmapping> ;
vitro:offerCreateNewOptionAnnot true ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot <http://vitro.mannlib.cornell.edu/ns/vitro/role#nobody> ;
vitro:publicDescriptionAnnot "Entité chargée de verser des contributions à la ressource. Les exemples de contributeurs comprennent une personne, un organisme ou un service. Habituellement, le nom d'un contributeur devrait être utilisé pour indiquer l'entité."@fr-CA ;
vitro:selectFromExistingAnnot true ;
.
dcterms:relation
vitro:fullPropertyNameAnnot "relation" ;
vitro:hiddenFromDisplayBelowRoleLevelAnnot <http://vitro.mannlib.cornell.edu/ns/vitro/role#public> ;
vitro:hiddenFromPublishBelowRoleLevelAnnot <http://vitro.mannlib.cornell.edu/ns/vitro/role#public> ;
vitro:inPropertyGroupAnnot <http://vivoweb.org/ontology#vitroPropertyGroupmapping> ;
vitro:offerCreateNewOptionAnnot true ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot <http://vitro.mannlib.cornell.edu/ns/vitro/role#nobody> ;
vitro:publicDescriptionAnnot "Une ressource connexe. La pratique recommandée consiste à identifier la ressource connexe au moyen d'une chaîne de caractères conforme à un système d'identification formel. "@fr-CA ;
vitro:selectFromExistingAnnot true ;
.
. . . etc.


Step 5) If necessary reset the various VIVO's indexes and databases

The addition of ontologies for managing menus and menus brings major changes to the core content of VIVO data. For the success of this iteration, it is necessary to reinitialize the content of the VIVO triplestore. To do this it is necessary to delete the directories rdf, tdbContentModels, tdbModels contained in vivo/home and resettings de vivo web app in the tomcat directory

StepAction

Stoping tomcat and delete vivo webapp



Code Block
${TOMCAT_HOME}/bin/cmd.sh stop
cd ${TOMCAT_HOME)/webapps
rm -rf vivo


Removing directories from vivo/home


Code Block
cd $VIVO_HOME
rm -r rdf
rm -r tdbContentModels
rm -r tdbModels


Step 1) Compile and deploye a new/corrected instance of VIVO and start it

StepAction
Compiling VIVO


Code Block
languagebash
titleCommand
cd $GIT_HOME/VVO-installer
mvn -s settings.xml -DskipTests=true clean install 


Populating VIVO with Sample-Data and restart Tomcat


Code Block
cp $GIT_HOME/sample-data/i18n/sample-data* $VIVO_HOME/rdf/abox/filegraph/
${CATALINA_HOME}/bin/cmd.sh start


Step 2) Running VIVO for testing and/or finding an i18n problem

The screenshot below shows an example of the various linguistic updates made from the addition of the various ontologies. 

Iteration summary

This iteration made it possible to apply the necessary linguistic corrections to the main menus. Linguistic fixes were applied to the property files and ontologies by first adding the linguistic extension to the file name (e.g. vivo_fr_CA.nt), then translating the content in tags to the target language and finally adding the appropriate linguistic tag to each translation. 


...

Iteration 4:

Goal

Step 3) Searching for the problematic file in the VIVO source code

Step 4) Editing the problematic file

Step 5) If necessary reset the various VIVO's indexes and databases

Step 1) Compile and deploye a new/corrected instance of VIVO and start it

Step 2) Running VIVO for testing and/or finding an i18n problem

Iteration summary


...

Iteration 5:

Goal

Step 3) Searching for the problematic file in the VIVO source code

Step 4) Editing the problematic file

Step 5) If necessary reset the various VIVO's indexes and databases

Step 1) Compile and deploye a new/corrected instance of VIVO and start it

Step 2) Running VIVO for testing and/or finding an i18n problem

Iteration summary