Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vivo 1954 #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion i18n/Readme.txt
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
This directory contains various knowledge graphs needed to run regression tests
These ontologies are an extraction and adaptation for internationalization of
https://github.com/vivo-project/sample-data/blob/main/sample-data.n3.

Although they are of general use, the knowledge graphs and ontologies contained
in this directory are specifically designed to be used with the regression tests
of https://github.com/vivo-community/vivo-regression-tests.

The files are divided into two series: *-orig.ttl and *-i18n*.ttl and they
correspond respectively to a use in a first instance of VIVO 1.11 not
including internationalization and the VIVO 1.12 version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VIVO 1.12+ version?

including internationalization (i18n)

Data sheet of the files:
- Semantics
The semantics of the two file categories are the same. For example the
identification to the resource 'sample-data:n2022' refers to the concept of
"Keynote Speaker" in both ontology categories.

- Base URI, sample-data prefix, individual base uri
Each ontology category has its own URI sets

- ORIG Category
- base URI: http://localhost:8080/vivo_orig/sample-data-orig#
- prefix sample-data http://localhost:8080/vivo_orig/individual/
- Definition of the individual to be declared in the runtime.properties
file of the VIVO instance:
Vitro.defaultNamespace = http://localhost:8080/vivo_orig/individual/
- Internationalization
Only the en_US is available in this category

- I18N Category
- base URI: http://localhost:8080/vivo_i18n/sample-data-i18n#
- prefix sample-data http://localhost:8080/vivo_i18n/individual/
- Definition of the individual to be declared in the runtime.properties
file of the VIVO instance:
Vitro.defaultNamespace = http://localhost:8080/vivo_i18n/individual/
- for each language a graph containing the linguistic context of each
language in extension of the filename is available . For example,
for fr_CA, the graph sample-data-i18n-fr_CA.ttl contains the
Canadian-French translation of sample-data

Sample Data Language Enhancement
To introduce a new linguistic context to the sample-data, perform the
following steps:

1- Choose the graph of an original language (e.g. en_US) and rename
it to the target language context (e.g. fr-BE). This gives for
example sample-data-i18n-fr_BE.ttl
2- in the graph, replace the linguistic tag of the source language
(ex.: "@en-US") by the linguistic tag of the target
language (ex.: "@fr-BE")
3- Translate the rdfs:label content of each resource to the new
liguistic context (e.g.:
sample-data:n1467 rdfs:label "Professor"@en-US .
by
sample-data:n1467 rdfs:label " Professeur"@en-BE ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a typo, fr-BE instead of en-BE

)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add here the forth points and invite people to contribute, i.e. create a pull request in the case they believe their localization of sample data might be useful for the community?

-- End of text --
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this annotation for the end of the file is necessary.

24 changes: 13 additions & 11 deletions i18n/sample-data-orig.ttl
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
@prefix geo: <http://aims.fao.org/aos/geopolitical.owl#> .
@prefix : <http://localhost:8080/vivo_i18n/sample-data-i18n#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
# baseURI: http://localhost:8080/vivo_orig/sample-data-orig

@prefix : <http://localhost:8080/vivo_orig/sample-data-orig#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@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 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 sample-data: <http://localhost:8080/vivo_orig/individual/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vivo: <http://vivoweb.org/ontology/core#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix obo: <http://purl.obolibrary.org/obo/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix vivo: <http://vivoweb.org/ontology/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

sample-data:n2022 a vivo:PresenterRole ;
rdfs:label "Keynote Speaker"@en-US ;
Expand Down