Translated library-defined controlled vocabularies

Description

Current situation or problem: Each FOLIO installation has lists of controlled vocabulary terms (for instance, “Formats” and “Resource types” in Inventory, “Patron Groups” and “Refund Reasons” in Users — see FOLIO-2802 for a more complete list).  In installations that use more than one language, these terms do not display translated values when the locale of the session is changed.

In scope

  • A mechanism for storing translated strings for controlled vocabulary terms.

  • A mechanism for displaying the translated strings in apps that use the controlled vocabulary tables.

  • A mechanism for translating controlled vocabulary terms in the Settings app.

Out of scope

Use case(s)

As a FOLIO Stripes app user, I want to see strings in my native locale so I can understand the user interface.

As a systems librarian, I want to enter controlled vocabulary in two or more locales so that my users can understand the user interface; some countries, regions or institutions are bilingual or multilingual.

Proposed solution/stories

KnowledgeWare has developed this capability as proposed in UX-400.  

  • You can access this in Kware's FOLIO test environment here: http://folio-testing.kwaretech.com/ 

  • Username: kware_test      Password: kware_test                                    Preferred Locale: English

Links to additional info

Questions

Priority

Fix versions

None

Development Team

None

Assignee

Solution Architect

Parent Field Value

None

Parent Status

None

Attachments

1
  • 20 Aug 2021, 08:03 PM

Checklist

hide

TestRail: Results

Activity

Show:

Marc Johnson August 23, 2021 at 12:37 PM

The required changes are not entirely dependent on the presence of (ui-translations - mod-translations). from this line, you can see that the default message for each translation key is the same as the string fetched from the backend

I understand that there is a fallback to the data from the owning module.

Ok, I'll rephrase (I'm aware that folks use the term dependency differently): In order to provide translations of property from controlled vocabularies an implementation of the translations interface must be provided, without it, the behaviour is the same as prior to any of these proposed changes

Is that a more reasonable statement?

from this line, you can see the validation about whether mod-translations exists or not.

That line seems to be a HTTP request to GET /translations. How does that validate whether the interface that endpoint is part of is provided or not?

Therefore, I see the necessity of having these units complete the workflow and achieve the desired goal.

Does that mean that you think that both mod-translations and ui-translations need to be part of the official FOLIO distribution before the changes above are made to stripes-core, stripes-smart-components and ui-inventory?

attia.alshareef August 21, 2021 at 9:21 AM

In the long term, that is probably a more stable way of identifying and translating each string...even if it means that the developers of the UI modules will need to retrofit this into their code. We will need to set up documentation for that.

 I'm already working on preparing a document that explains what is expected of everyone involved (backend - frontend - translators) to benefit from dynamic translation.

Can you verify: if a UI module doesn't have the necessary changes, the only impact is that the dynamic strings can't be translated by the Translations app...otherwise the app would function as it does now? (With no errors?)

Exactly, all applications that do not make the required changes will work without errors but will not benefit from the dynamic translation.

:

Do these changes rely on the presence of the Translations App and / or the new modules (mod-translations, ui-translations)?

The required changes are not entirely dependent on the presence of (ui-translations - mod-translations). from this line, you can see that the default message for each translation key is the same as the string fetched from the backend, and from this line, you can see the validation about whether mod-translations exists or not.

But making these changes without the presence of (ui-translations - mod-translations) we will not have a dynamic translation process, not to mention the loss of many features that have been delayed for upcoming versions such as exporting and importing translations, fetching translation from Google ... etc.
Therefore, I see the necessity of having these units complete the workflow and achieve the desired goal.

Marc Johnson August 20, 2021 at 8:20 PM
Edited

In the long term, that is probably a more stable way of identifying and translating each string...even if it means that the developers of the UI modules will need to retrofit this into their code. We will need to set up documentation for that. Can you verify: if a UI module doesn't have the necessary changes, the only impact is that the dynamic strings can't be translated by the Translations app...otherwise the app would function as it does now? (With no errors?)

The statement about these changes being needed to allow translation by the Translations App suggests that they are dependent upon the Translations App. Is that the case?

Do these changes rely on the presence of the Translations App and / or the new modules (mod-translations, ui-translations)?

This line suggests that we are expecting stripes-core to make requests to mod-translations. Have I interpreted this correctly?

Peter Murray August 20, 2021 at 8:07 PM

Thank you, . I see what you mean now about needing to change the declaration of strings in each app:

In the long term, that is probably a more stable way of identifying and translating each string...even if it means that the developers of the UI modules will need to retrofit this into their code. We will need to set up documentation for that. Can you verify: if a UI module doesn't have the necessary changes, the only impact is that the dynamic strings can't be translated by the Translations app...otherwise the app would function as it does now? (With no errors?)

: I've marked the three pull requests for review. Could you take a look at them, please?

We are getting very close to the cutoff for changes to Stripes for the Kiwi release (due by the end of the week next week) and may need to put this off until the Lotus release, but let's see what happens.

attia.alshareef August 20, 2021 at 1:26 AM
Edited

, There are 3 PRs added:
1- stripes-smart-components: Adding logic for translating the library-defined controlled vocabularies:

(https://github.com/folio-org/stripes-smart-components/pull/1114)

2- stripes-core: Adding logic for loading the translations of library-defined controlled vocabularies:
(https://github.com/folio-org/stripes-core/pull/1107

3- ui-inventory: POC for enabling translations of library-defined controlled vocabularies on stripes apps:
(https://github.com/folio-org/ui-inventory/pull/1440)

> I will update the ui-translations docs to explain the complete workflow, thinking, and decisions about the translation work.

>> Sorry for the delay, but time was really not enough for us.

Details

Reporter

Front End Estimate

Large < 10 days

Front End Estimator

Back End Estimate

XL < 15 days

Back End Estimator

Rank: FLO (MVP Sum 2020)

R5

Rank: 5Colleges (Full Jul 2021)

R5

Rank: Cornell (Full Sum 2021)

R5

Rank: Chalmers (Impl Aut 2019)

R4

Rank: GBV (MVP Sum 2020)

R2

Rank: hbz (TBD)

R2

Rank: Hungary (MVP End 2020)

R2

Rank: Mainz (Full TBD)

R2

Rank: TAMU (MVP Jan 2021)

R5

Rank: Chicago (MVP Sum 2020)

R5

Rank: Leipzig (ERM Aut 2019)

R4

Rank: U of AL (MVP Oct 2020)

R4

Rank: Leipzig (Full TBD)

R2

Rank: Lehigh (MVP Summer 2020)

R5

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created June 29, 2021 at 8:45 PM
Updated November 8, 2021 at 9:10 PM
TestRail: Cases
TestRail: Runs