Closed chenejac closed 1 year ago
@chenejac
In substance, the RP works. However, there are some problems.
2022-12-09 13:11:13,154 INFO [FileGraphSetup] Read 5 tbox file graphs 2022-12-09 13:11:13,154 INFO [FileGraphSetup] a full recompute of the Abox will be performed because the filegraph abox(s) and/or tbox(s) have changed or are being read for the first time. 2022-12-09 13:11:14,256 ERROR [UpdateKnowledgeBase] Unable to load RDF from UiLabelsVocabulary.nt org.apache.jena.riot.RiotException: [line: 1, col: 7 ] Element or attribute do not match QName production: QName::=(NCName':')?NCName.
There are two possible solutions:
a) in the directory
rdf/tbox/firsttime/
renameUiLabelsVocabulary.nt
toUiLabelsVocabulary.n3
or b) check if theUpdateKnowledgeBase
class is able to read files with thent
extension (I recommend this solution)
en_CA_x_uqam.zip
, proposed in the PR description. the file/fr_CA_x_uqam/tbox/firsttime/initialTBoxAnnotations_en_CA_x_uqam.nt
contains an error that makes it unable to be read by VIVO.Solutions:
in the file, replace all the @fr_CA_x_uqam
with @fr-CA-x-uqam
, then the file is correctly loaded
fr_CA_x_uqam.zip
in the repo -sample- which can serve as a template for an institution that wants to particularize the language. Of course, this can be referenced in the documentation.Modification of fr CA labels while using #x-uqam results in replacement of fr CA label with new value. But that most likely out of scope for this PR.
VIVO GitHub issue: 3800
Companion PR
What does this pull request do?
Adding support for local customization of UI labels by using language tags. It means an institution can add in the directory/rdf/i18n/ its own local customization of translations. Those local, institution-specific translations should be in the directory which name is aligned with language tag specification for private tags (for instance fr_CA_x_uqam or de_DE_x_tib). The idea is similar as for property files and usage of webapps/i18n/local directory. The institution can easily update VIVO version, and continue to use previously customized labels and vocabularies.
What's new?
locale.toLanguageTag()
producesfr-CA-x-uqam
while the codelocale.toString()
producesfr_CA_#x-uqam
We have code which do replacement of _ and - in string representation of locale, therefore, the first one string is neededHow should this be tested?
languages.selectableLocales = en_US, fr_CA, fr_CA_x_uqam
Example:
Interested parties
Tag (@ mention) interested parties or, if unsure, @VIVO-project/vivo-committers