Skip to content

[3760 - i18n sprint] Adopting i18n bean to read translations from triple store instead from property files

Created by: chenejac

VIVO GitHub issue 3760

What does this pull request do?

i18n object used in ftl files is filled from triple store.

What's new?

Previously UI messages were loaded from property files

How should this be tested?

At the moment, the ttl file from those branches might be used Vitro-languages - https://github.com/chenejac/Vitro-languages/tree/3760_translations_loading VIVO-languages - https://github.com/chenejac/VIVO-languages/tree/3760_translations_loading

  1. Build VIVO (including VIVO-languages and Vitro-languages from the above mentioned branches)
  2. Configure runtime.properties in the VIVO-HOME to include languages.selectableLocales = en_US, de_DE, sr_Latn_RS, ru_RU, fr_CA, en_CA, es, pt_BR
  3. Run VIVO
  4. Change language to English Canadian
  5. Check label at the home page in the blue box - Research, it should be Research ttl
  6. You can play around with commenting/uncommenting lines from ttl files (restart of tomcat is needed). 5.1. Priority order (from the highest priority): language specificity (for instance change in the runtime properties en_CA to en_CA_x_uqam, label from 6 should be Research ttl uqam) property file (uncomment this line) an individual with data properties theme = "wilma" an individual with data property application = "VIVO" an individual with data property application = "Vitro"

Additional Notes:

  • Does this change require documentation to be updated? this PR not, but after completion of i18n redesign, documentation about adding new language should be updated
  • Does this change add any new dependencies? NO
  • Does this change require any other modifications to be made to the repository? Yes, ttl (or n3) files representing messages from the property files should be added in VIVO-languages (lang/home/../resources) directory (at the moment, later it might be moved to VIVO repository)
  • Could this change impact execution of existing code? Hopefully not, but it would be nice to have a test
  • 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 not a large PR

Interested parties

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

Merge request reports