Versions Compared

Key

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

...

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

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 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


Adding the file applicationMetadata/firsttime/classgroups_fr_CA.ttl@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:
StepAction
Moving directory structure to appropriate linguistic context


Code Block
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 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:
Code Block
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
Adding the file VIVO-languages/fr_CA/home/src/main/resources/rdf/applicationMetadata/firsttime/propertygroups
_fr_CA.
ttl 
nt
Code Block
@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 .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



Code Block
cd ../../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" .


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

...