Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Support multilingual - Add read multiple language #32

Merged
merged 10 commits into from
May 10, 2023

Conversation

haddadzineddine
Copy link

@haddadzineddine haddadzineddine commented Apr 23, 2023

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 agroportal/project-management#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: agroportal/project-management#307

Reviewers

@syphax-bouazzouni

@haddadzineddine haddadzineddine changed the title if requested_lang = 'all' return all Feature/language return all Apr 23, 2023
@haddadzineddine haddadzineddine changed the title Feature/language return all Feature | Language return all Apr 23, 2023
@haddadzineddine haddadzineddine self-assigned this Apr 23, 2023
syphax-bouazzouni

This comment was marked as duplicate.

@syphax-bouazzouni syphax-bouazzouni changed the title Feature | Language return all Feature: Support multilingual - Add read multiple language Apr 28, 2023
@syphax-bouazzouni
Copy link

Change the language key to lowercase

@syphax-bouazzouni
Copy link

Added:

  • Fix the issue of undefined 'id' of the language filter module (3967feb)
  • Show literal attributes in the properties section (unmapped ones) if we requested all the languages (78e6420)
  • Use portal language by default in the language filter module (7e1410c)
    Using the portal language by default fixed all the tests, because before by default it will show all the languages and it was not backward compatible so breaking all the tests.

@syphax-bouazzouni syphax-bouazzouni merged commit 2d5e161 into development May 10, 2023
@syphax-bouazzouni
Copy link

Final screenshot
image

syphax-bouazzouni added a commit that referenced this pull request Dec 4, 2023
* Merge pull request #24 from ontoportal-lirmm/feature/support-multilingual-read-one-language-from-request-parameter

Feature : Support multilingual - Phase 1 - Read one language

* Merge branch pull request #32 from feature/language-return-all

* group unmapped properties by lang

* Feature: group unmapped properties by language  (#38)

* group unmapped properties by lang

* downcase language keys of unmapped properties

---------

Co-authored-by: Syphax bouazzouni <gs_bouazzouni@esi.dz>

* Feature: Support multi lingual -  add show_language argument to the attributes getters (#39)

* update define_method

* update solution mapper

* update get_preload_value

* Merge pull request #40 from ontoportal-lirmm/support-muli-lang-part-02

Fix: save_model_values if unmmaped condition

* Merge pull request #41 from ontoportal-lirmm/support-muli-lang-part-02

Feature: Refactor and fix the Language filter method

* Merge pull request #42 from ontoportal-lirmm/feature/support-multi-langual-search

Feature: Make map_attribute support showing all languages - Support multi language search

---------

Co-authored-by: HADDAD Zineddine <hz_haddad@esi.dz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants