Skip to content

I18n redesign

backups requested to merge i18n-redesign into main

Created by: chenejac

VIVO GitHub issue: i18n redesign project board

Vitro PR

What does this pull request do?

Moving UI labels from property files to rdfs Removing language specific template files Merging VIVO-languages and Vitro-languages repositories into VIVO and Vitro repositories Support for institution specific translations (private language subtags)

What's new?

*.property UI label files are migrated to *.ttl files i18n module is extended to support loading of UI labels from ttl files and property files ftl files from VIVO-language have been moved to VIVO repository (universal language constructions working for all languages has been used) home artifacts and UI label files from VIVO-languages have been moved to VIVO pom files have been adopted *.yml files (build) have been adopted

How should this be tested?

  • checkout Vitro i18n-redesign branch
  • Install VIVO
  • Add into runtime properties
RDFService.languageFilter = true
languages.selectableLocales = en_US, de_DE, sr_Latn_RS, ru_RU, fr_CA, en_CA, es, pt_BR, fr_CA_x_uqam
  • configure email settings
  • copy sample sample-data-i18n.ttl sample-data-i18n-de_DE.ttl sample-data-i18n-en_CA.ttl sample-data-i18n-en_US.ttl sample-data-i18n-fr_CA.ttl sample-data-i18n-fr_FR.ttl from https://github.com/vivo-project/sample-data/tree/main/i18n into $VIVO_HOME/rdf/abox/filegraph
  • copy fr_CA_x_uqam directory into $VIVO_HOME/rdf/i18n/ or unzip this file into $VIVO_HOME/rdf/i18n/
  • Run tomcat and open VIVO in a web browser
  • Login as root administrator
  • https://github.com/vivo-project/Vitro/pull/332
    • Go to siteAdmin
    • Open form to create new Person
    • Verify that the form looks Ok for all languages
  • https://github.com/vivo-project/Vitro/pull/333
  • https://github.com/vivo-project/VIVO/pull/3777
    • Open a person profile page
    • Click on qr code image, larger image will pop up, click on large image to get to Export qr code page.
    • Click on the link "What is this?"
    • You should be on about qr codes page. Try changing locales to verify it is available in multiple languages
  • https://github.com/vivo-project/VIVO/pull/3778
    • Open a researcher profile page
    • Add a journal article in the Science journal
    • Open Map of Science for a researcher (you need a researcher profile who published a paper in the journal Science) and verify it is available in multiple languages
    • Open http://locahost:8080/vivo/vis/map-of-science/about and verify it is available in multiple languages
  • https://github.com/vivo-project/VIVO/pull/3780
    • Open home page, view list of research types
  • https://github.com/vivo-project/VIVO/pull/3783
    • Verify the following steps are available in all languages
    • Create a person
    • Add role head of
    • Add role memeber of
    • Add advisees
    • Create publication
    • Add authors via Manage list of authors
    • Add editors via Manage list of editors
    • Open person profile, click add geographic location, click add new item of this type (leave Campus selected) - You should see something like Create "geographic location" entry for ...
  • https://github.com/vivo-project/VIVO/pull/3791
  • https://github.com/vivo-project/VIVO/pull/3795
    • Create person profile
    • Add website link, switch language, edit link label
    • Verify that only one label is shown on profile's page.
  • https://github.com/vivo-project/Vitro/pull/334
    • For each of installed languages execute following actions:
    • Create new user, e-mail to the user about created account should be received.
    • Use the link from the e-mail, set user password, you should receive e-mail after password is set.
    • Try reset user's password, e-mail to the user about created account should be received.
    • Try to log in as a user and change e-mail address, you should receive e-mail about that.
    • Break your page-home.ftl and open home page, you should see "There was an error in the system. This error has been reported to the site administrator. " Check email in administrator's mailbox
  • https://github.com/vivo-project/Vitro/pull/335
  • https://github.com/vivo-project/Vitro/pull/353
    • Open http://localhost:8080/vivo/events
    • Switch UI to the Spain language
    • In the list of Events there shouldn't be any in German language (only in English or Spain language).
  • https://github.com/vivo-project/VIVO/pull/3802
    • Change language to the last one in the list (France (Canada) - UQAM)
    • At the home page you should found the label "Recherche uqam"
    • If you login, you will also notice that logout option in the menu has been changed to "Déconnexion wilma uqam" when the last language has been selected
    • Also, on some pages labels with uqam suffix will appear.
  • https://github.com/vivo-project/Vitro/pull/356
    • Open a researcher profile page
    • Click on uploading the image
    • Change language to French
    • Check labels Taille maximale de l'image: 6 mégaoctets, Taille minimale de l'image: 200 par 200 pixels, before this PR it was Taille maximale de limage: {0} mégaoctets and Taille minimale de limage: {0} par {1} pixels
  • https://github.com/vivo-project/Vitro/pull/352
    • Create data property with range rdfs:Literal
    • Create faux data property (not error should appear on creation of faux data property)
    • Create data and object faux properties, add values. Test that faux properties are available even if domain of base property doesn't match individual types, but domain of faux property match individual type.
    • Faux data property creation should be available from data property page
    • Both types of faux properties listings should work.
    • Faux data properties range should always be the same as base property.
    • Faux data and object property ranges should be constrained by not disjoint properties.
    • Set faux object property and faux data property ranks
    • Verify that ranks are visible in verbose edit mode, verify that ranks are applied on property sorting

Example:

  • Does this change require documentation to be updated? Yes, this wiki page will describe adding new UI language - https://wiki.lyrasis.org/display/VIVODOC114x/Internationalization
  • Does this change add any new dependencies? No
  • Does this change require any other modifications to be made to the repository? VIVO-languages repository is not needed any more, the PR also includes changes in the workflows (build GitHub action).
  • Could this change impact execution of existing code? No
  • Large pull requests should be avoided. If this PR is large (more than 1,000 lines of codes), please provide short explanation why your contribution can't be decoupled in smaller PRs. This is the result of two sprints

Interested parties

Tag (@ mention) interested parties or, if unsure, @VIVO-project/vivo-committers

Merge request reports