ontoportal-lirmm / goo

Graph Oriented Objects (GOO) for Ruby. A RDF/SPARQL based ORM.
http://ncbo.github.io/goo/
Other
0 stars 4 forks source link

Feature: Support multilingual - Add read multiple language #32

Closed haddadzineddine closed 1 year ago

haddadzineddine commented 1 year ago

Description

This pull request adds a new branch called language_return_all that returns all existing result when the requested language value is set to "all". This feature was implemented based on the request described in issue https://github.com/agroportal/project-management/issues/307

Changes Made / Todos

Screenshots

use case : localhost:9393/ontologies/INRAETHES/classes

  1. requested_lang = all image
  2. requested_lang = fr image
  3. requested_lang = en image
  4. requested_lang = fr,en image

Resources & Informations

For the requested_lang = all, we need to show the values in all languages but also their corresponding language, like this image

For the case none languages :

image

So for your use case of synonyms, it needs to be like this:

# if attribute of type list
"synonym": {
"en": ["syn_en_1", "syn_en_2"],
"fr": ["syn_fr_1"]
}
# if attribute of type no-list
"prefLabel": {
"en": "label_en_1",
"fr": "label_fr_1"
}

The global issue that describes this is here: https://github.com/agroportal/project-management/issues/307

Reviewers

@syphax-bouazzouni

syphax-bouazzouni commented 1 year ago

Change the language key to lowercase

syphax-bouazzouni commented 1 year ago

Added:

syphax-bouazzouni commented 1 year ago

Final screenshot image