agroportal / project-management

Repository used to consolidate documentation about the AgroPortal project and track content related issues.
http://agroportal.lirmm.fr
7 stars 0 forks source link

Multilingual support #307

Closed syphax-bouazzouni closed 10 months ago

syphax-bouazzouni commented 2 years ago

References

Goal

Make Ontoportal/Agroportal UI and API multilingual, where a user can decide on the language to display or show them all.

Our plan

Phase 1: Read one language

Most of the work is done here

Currently, we filter data fetched from the triple store by only one language, English only for Bioportal and English or French for Agroportal.

This behavior is settled by a constant (:EN) in Bioportal and an Array of languages in Agroportal.

image

This first step is to do is to add the possibility of taking a request parameter ?lang for language to show

Phase 2: Read multiple lang (JSON-LD compliant)

Currently, we don't use the lang attribute of literals, i.e in source data, we have skos:prefLabel "test"@en but we show only "test" if we want to show multiple languages the language information needs to be used and be complainant with what JSON-LD specify

The plan would is to be fully compliant JSON-LD and show the following in our API endpoints

image

Phase 3: write multiple languages

For a given metadata attribute (e.g description), how do we write in multiple languages (e.g have an English and French description)?

syphax-bouazzouni commented 1 year ago

Possible difficulties

syphax-bouazzouni commented 1 year ago

INRAE DipSO requirements (Sophie Aubin and Sonia Bravo)

Voici nos retours concernant le multilinguisme:

Question de Clément (slack) sur l’affichage d’un concept lorsqu’il n’y a pas de libellé pour la langue sélectionnée. « On a besoin de decidion en terme de quoi faire quand il y a pas de concepts dans un langauge donnée... affiché l’URI ? la fin de l’URI ? un fallback language e.g. anglais ? etc ... »

Comme sur Skosmos, faire apparaître l’autre libellé pref en mettant entre parenthèse fr/en. Si pas de label, alors afficher la fin de l’URI (mais normalement ça n’arrive pas en SKOS)

Le comportement quand on change de langue est cohérent entre concept / scheme / collection : OK Question : Est-ce que vous envisagez de traduire les noms des propriétés en français ?

La fiche concept n’affiche pas les termes dans les autres langues que celle sélectionnée

Dans SKOSMOS image

Vous pourriez ajouter un bloc « Labels » dans la seconde section, au-dessus de narrower (on veut voir ces termes dans d’autres langues assez rapidement, sans scroller trop)

On affiche toujours en 1er la langue d’affichage sélectionnée, si "EN"

image

Idéalement, il faudra le même comportement pour les définitions (et autres notes). Afficher la def dans chaque langue en précisant la langue + affichage de la définition de la langue d’affichage en 1er.

jonquet commented 1 year ago

Hello @saubin78 . Ok pour ces 3 points principaux.

saubin78 commented 1 year ago

Pour la traduction des propriétés, bon point. Nous travaillons aussi a l'internationalization du portail (en Francais d'abord).

je sais que l'INIST a travaillé sur l'internationalisation de VocBench mais je n'arrive pas à retrouver les données sur le https://bitbucket.org/art-uniroma2/vocbench3/src/master/ (je m'y prends peut-être mal)

syphax-bouazzouni commented 10 months ago

Deployed in production in https://github.com/ontoportal-lirmm/bioportal_web_ui/pull/240 From this project remains two tasks postponed for the future: