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

pkp/pkp-lib#7272 Simultaneously Displaying Multilingual Metadata on the Article Landing Page #4050

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jyhein
Copy link
Contributor

@jyhein jyhein commented Oct 2, 2023

Issue: pkp/pkp-lib#9373

  • Show multilingual metadata on the article landing page
  • In Website Settings > Theme, select title, keywords, and abstract metadata to show on the article landing page in other languages

@jyhein
Copy link
Contributor Author

jyhein commented Oct 2, 2023

Hey @asmecher,

I have PRs ready for review of the code...

OJS: #4050
OMP: pkp/omp#1466

@asmecher
Copy link
Member

asmecher commented Oct 3, 2023

Thanks, @jyhein! I'd like to start by passing this by @Devika008; can you add a couple of screenshots that show the changes?

@asmecher asmecher changed the title Simultaneously Displaying Multilingual Metadata on the Article Landing Page pkp/pkp-lib#9373 Simultaneously Displaying Multilingual Metadata on the Article Landing Page Oct 3, 2023
@asmecher asmecher changed the title pkp/pkp-lib#9373 Simultaneously Displaying Multilingual Metadata on the Article Landing Page pkp/pkp-lib#7272 Simultaneously Displaying Multilingual Metadata on the Article Landing Page Oct 3, 2023
@jyhein
Copy link
Contributor Author

jyhein commented Oct 4, 2023

Hey @Devika008 and @asmecher,

Here are some screenshots:

metadata_opts
landing_page

@Devika008
Copy link

Devika008 commented Nov 21, 2023

@jyhein @asmecher

I'm sorry for getting onto this late. I might have missed it. However, I believe that when users read through the data, they wont read data in a way that article title in french in Spanish in Portuguese and then move onto the next one. They will go through the metadata together in a language. Sometimes its easier to scout for metadata when you know the language you're looking for. Hence I propose the following reorder of data with respect to clubbing the metadata in one language togehter. Its easier to process and find

image

@jyhein jyhein force-pushed the f7272 branch 3 times, most recently from 5d41251 to a7ddb59 Compare November 27, 2023 20:21
->concat(['keywords', 'abstract'])->unique()->diff($titles->keys())->values();
$multilingualOpts = collect($showMultilingualMetadataOpts)
->when(in_array('title', $showMultilingualMetadataOpts), fn ($m) => $m->concat(['subtitle', 'fullTitle'])->unique()->values());
$primaryLocale = isset($titles->get('title')[$contextPrimaryLocale]) ? $contextPrimaryLocale : $publication->getData('locale');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not correct: why do we use the context primary locale?
See how the function DataObject::getLocalePrecedence() works (https://github.com/pkp/pkp-lib/blob/main/classes/core/DataObject.php#L97), used in DataObject::getLocalizedData() (https://github.com/pkp/pkp-lib/blob/main/classes/core/DataObject.php#L65):
First either preferred locale will be considered, if given (e.g. if you want to get a key/attribute in a specific locale).
If preferred locale is null, the UI locale is considered.
If there is no value for this locale, then the fallback locale (getDefaultLocale()) is considered. For Publication object it is the submission primary locale (s. e.g. PKPPublication::getDefaultLocale()). This value should actually always exist for required fields.
And if no value is found here, e.g. for keywords that do not necessarily need to be in the submission primary locale, then check context and then site primary locale.
If no value exists for any of these locale the function getLacalizedData() will return the first found value.

Thus, I think we should do the same here, no? Also, if possible to use that getLacalizedData() function.

Also, on the article view page:
With this implementation the context primary locale instead of UI locale (that exists) is displayed. For example, let say context primary locale is FR, and the article primary locale is EN, and metadata exist in both languages (EN and FR). When the UI locale is EN, the article is displayed in FR, although EN exist.
If the UI would be DE, and article does not have metadata in DE, the EN should be displayed, because EN is the submission primary locale.

I do not know if Devika said something about the situation when e.d. keywords only exist also in DE, additionally to the example above.
Currently it is so: if the UI = DE, then title and abstract are displayed in EN (because they do not exist in DE, but in submission primary locale), but keywords are displayed in DE.
I think for now we should keep this, if Devika has said nothing about it now, how it woks now. And I think Devika wanted to think further about how to improve it all...

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed context->getPrimaryLocale() to templateMgr->getTemplateVars('currentLocale'). If no "show multilingual metadata" options selected in the default theme settings and metadata does not exist in title's locale, then the metadata is shown in some other language.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jyhein, I have not taken a look into the code yet, but I tested it, and there is still some difference from how it was till now:
Lets say the journal has EN, FR, DE, and SP enabled as UI and submission languages.
Lets say the article primary locale is EN, and it has all metadata also in FR, and additionally it also has author metadata and keywords in SP.
When the reader select SP as UI language:
Now it is so:
The article title and abstract are displayed in EN, author metadata in SP, and the keywords also in EN, although the keywords in SP exist. Then the article metadata in SP are considered next, and there the keywords in SP are displayed.
If the new option to show metadata in all languages is not selected in Website Settings, then the SP keywords are never displayed.
Thus, I think it should be:
The article title and abstract are displayed in EN, author metadata and keywords in SP. Then the other languages are considered the data exists for, i.e. EN and FR.

Thus, could we do something like this:
For the first/main display of metadata use getLocalizedData as till now. This first/main display considers the selected UI language. It will return either the data in the UI language or the data in article primary language or any other existing language.
Then for the new functionality, to display metadata in further languages: Get all existing article languages for the selected metadata from the settings (title, abstract, keywords), remove the UI language from that list (because it is handled as first), then for each language from that list display existing metadata using getLocalizedData(key, language).

I am not 100% sure, but maybe in the handler class you would 'only' need to get those further languages that needs to be displayed (= get all existing article languages for the selected metadata from the settings (title, abstract, keywords), remove the UI language from that list). And then in the template this can be done: for each language from that list use getLocalizedData(key, language) to display metadata in additional languages.

Copy link
Contributor Author

@jyhein jyhein Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bozana! Default view (no metadata options selected): the code tries to give the metadata based on the title language (if not ui then submission). If the metadata does not exist in title language, then the getLocalized data selects some found language. I tried to avoid to display a mix of languages as much as possible. I can change this to match the original logic, or I could display the other languages the same way like in the multilingual view.

Multilingual view (one or more options selected) : Using getLocalizedData won't work here because if in UI/submission language e.g. keywords do not exist, the function would show it in other language. In this view it would be inconsistent.

I have not included author metadata in to this but I can do that

Copy link
Contributor

@bozana bozana Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jyhein, I am hesitant to change how it worked till now -- it was so for a long time... :-) Also because maybe not all users will use this additional function and the system should behave as always. The keywords in SP from the example above should be visible. (Also, users could extend the default theme to also display other metadata (e.g. coverage, sponsoring agencies, etc.) and they would probably follow the same logic, and they all should be visible in default view).
And because Devika will maybe come with a fully different model/logic later... So lets keep this as it was, for now, i.e. with minimal changes, if possible.

Thus, I think default view (no metadata options selected) should work as till now.
The multilingual view (one or more options selected): the first metadata display should stay as it is, as in the default view, and only the other existing languages (different than selected UI language) should be added.

Sorry, I was wrong about getLocalizedData for additional (other than selected UI) languages: it should be getData(key, locale)....

You do not need to include author metadata -- it was just an example, that they can also be in other languages, i.e. in SP in the example above and would be visible...

@jyhein jyhein force-pushed the f7272 branch 3 times, most recently from f95676a to 0baa986 Compare December 6, 2023 17:10
@bozana
Copy link
Contributor

bozana commented Dec 8, 2023

Hi @Devika008,
Just to double check something with you:
Lets say the journal has EN, FR, DE, and SP enabled as UI and submission languages.
Lets say the article primary locale is EN, and it has all metadata also in FR, and additionally it also has author metadata and keywords in SP.
When the reader selects SP as UI language, it was so till now: Title and abstract are shown in EN (article primary language, because they do not exist in SP) and author metadata and keywords in SP.
With this new feature, when metadata are selected to be displayed in other languages too, it would look like this:
1)
Title EN
Author SP
Keywords SP
Abstract EN

Article Metadata in EN
Title EN
Author EN
Keywords EN
Abstract EN

Article Metadata in FR
Title FR
Author FR
Keywords FR
Abstract FR

That means under "Article Metadata in EN" the title and abstract will be shown, even they are also shown in the first element (for UI = SP) because they do not exist in SP.
Do you think it is OK so for now?
This would be the minimal change needed to be made for now.

Else, @jyhein, tried not to mix the languages, so that way it now would be:
2)
Title EN
Author SP
Keywords EN
Abstract EN

Article Metadata in SP
Keywords SP

Article Metadata in FR
Title FR
Author FR
Keywords FR
Abstract FR

This looks maybe OK when the option to show the metadata in multiple languages is selected, but when that option is not selected, the SP metadata will never be displayed, which I think is not a solution. Also, this changes the way how it was till now.

Thus, just to double check with you what do you think is better for now, and to let you know about this edge case when you work on the default theme further.

Thanks a lot!

EDIT: I think we could also consider authors metadata in the #2, so that not only they are displayed in UI=SP in the first element, and we could maybe differentiate the situation when the option to show the metadata in multiple languages is selected or not (so that the SP data are shown if that option is not selected), but it is all even a bigger complication.
I prefer #1 and minimal changes for now, till we find the right way for all this (also considering that submission and metadata locales can be fully different from UI locales - the feature that is coming).

@bozana
Copy link
Contributor

bozana commented Dec 8, 2023

@Devika008, maybe just a note: I have just spoken with @jyhein and we will then try to have separate solutions for those that have the multilingual view enabled and those that do not have it (which will work as till now). @jyhein will document it in the issue on Monday...

I still think that we are maybe investing too much time now, because we will need to rethink it all soon (when submission and metadata languages are separated from the UI languages), and eventually when UI language will be accessible via URL... but...

@jyhein jyhein force-pushed the f7272 branch 2 times, most recently from 4b735dc to aed56ac Compare December 10, 2023 17:14
@jyhein
Copy link
Contributor Author

jyhein commented Dec 11, 2023

Hey, @Devika008

Here are some some cases when metadata exist partially only:

  • Multilingual view
  • Show metadata in other languages: Title and abstract selected, keywords NOT selected
  • English as submission locale

Case 1: Only keywords in Swedish:

  • Swedish: UI (Abstract and ##plugins.themes...## headings are in Swedish) and keywords
  • English : Title, keywords, and abstract

landing_page_settings-title_and_abstract

Case 2: Only title in Swedish

  • Swedish: UI and title
  • English: Title, keywords, and abstract

landing_page-only_title_exists

@ajnyga
Copy link
Contributor

ajnyga commented Dec 18, 2023

@bozana I think your examples show that the real problem we have in OJS (and which is underlined now more) is the concept of mixing metadata based on the UI language. I mean this:

When the reader selects SP as UI language, it was so till now: Title and abstract are shown in EN (article primary language, because they do not exist in SP) and author metadata and keywords in SP.

This is confusing for the reader especially in cases where the two languages are close to eachother.

I still think that we are maybe investing too much time now, because we will need to rethink it all soon (when submission and metadata languages are separated from the UI languages), and eventually when UI language will be accessible via URL... but...

I do not think that having the UI language accessible via URL will affect this. It will just change the way language switching is happening. The real question is that should the UI language affect submission metadata view especially in cases where the full metadata is not available for the selected language. In my opinion such functionality should only happen when the full text is multilingual and in all other cases we should always respect the Submission Locale.

But I think this issue is separate from that. The real use case for this is a situation where only small parts of metadata (like the abstract) is available in other language and the editors want to show that on the same landing page. IMO we should not try to extend this further from that concept.

@bozana
Copy link
Contributor

bozana commented Dec 18, 2023

@ajnyga, yes... So what do you think is best for this issue, now?

EDIT: because according to the design, we do not display the abstracts one after another (which would be much easier), but first all metadata in one language and then in other, and then other,... (for all existing metadata languages)...

EDIT EDIT: I am not thinking about the way we will solve the UI, submission and metadata languages and URL languages now -- we will wait for Devika's concept...

@bozana
Copy link
Contributor

bozana commented Apr 26, 2024

Hi all, I believe this could be maybe the next issue we can finish :-)
I am not sure what we decided, how to proceed with the multilingual view. Thus, can someone -- it would be good if @Devika008 could also tell us what she thinks about it -- summarize what do you think would be the best way to display information for the following case:
The journal has EN, DE and ES enabled as UI and submission languages.
The article primary locale is EN. Additionally it also has author metadata and keywords in ES.

  1. For "Show metadata in other languages" all options (title, abstract and keywords) are selected.
    How would the page look like for each UI language (EN, DE, ES)?
  2. For "Show metadata in other languages" title and abstract are selected (keywords are not selected).
    How would the page look like for each UI language (EN, DE, ES)?

If the journal has additionally FR as submission and metadata locale, and FI as metadata locale. How would those be considered/displayed, if the article has all data in FR and some metadata in FI?

Thanks a lot!

@ajnyga
Copy link
Contributor

ajnyga commented Apr 26, 2024

The journal has EN, DE and ES enabled as UI and submission languages.
The article primary locale is EN. Additionally it also has author metadata and keywords in ES.

For "Show metadata in other languages" all options (title, abstract and keywords) are selected.
How would the page look like for each UI language (EN, DE, ES)?

  • UI EN: en metadata shown as usual, additionally es keywords visible in the bottom
  • UI DE: en metadata shown as usual, additionally es keywords visible in the bottom
  • UI ES: en metadata shown for most cases keywords shown if es, additionally en keywords visible in the bottom

For "Show metadata in other languages" title and abstract are selected (keywords are not selected).
How would the page look like for each UI language (EN, DE, ES)?

  • UI EN: en metadata shown as usual, es keywords not visible
  • UI DE: en metadata shown as usual, es keywords not visible
  • UI ES: en metadata shown for most cases keywords shown in es, en keywords not visible

If the journal has additionally FR as submission and metadata locale, and FI as metadata locale. How would those be considered/displayed, if the article has all data in FR and some metadata in FI?
This would depend on the settings they made and if the UI is available in both languages. If the UI is available just in French then it is quite clear: if the new setting is turned of for the metadata fields, then any content given for those in Finnish is shown in the bottom.

Just want to underline two things:

  1. We are sure to find obscure combinations with this setting. It is however good to note that it is entirely voluntary to turn on and it works best in a situation where publishing is happening in one language, the UI is in one language BUT the journal is producing some metadata in other languages as well and wants to display this without turning on the UI for a language they do not have for example any of the journal information available. It will not fit the needs of all journals and combinations.
  2. As a software OJS has opted to use the switching of the UI to display specific language metadata. We could argue that it would make more sense to show the metadata always based on the primary article locale especially in cases where the full text is just in one language and any other language metadata would always be available without changing the UI (I also think that if you publish multilingual full text that should be multiple submissions). But as long as we stick with the current model we need to implement solutions that are not transparent for the user: for example falling back to any available language when a specific field of metadata is missing for the current UI locale.

@jyhein jyhein force-pushed the f7272 branch 2 times, most recently from 65fd6ac to 7d7cde1 Compare April 29, 2024 15:47
@Devika008
Copy link

Hello @bozana @jyhein and @ajnyga,

I apologize for not addressing this issue sooner. It appears that there is a problem with my GitHub notifications, as they do not send me updates when I am tagged in something. (time to correct it)

Initially, this appeared to be a straightforward issue, and due to my newness in the industry, I suggested a simple solution without considering potential edge cases and complexities. However, as I began to read comments from Bozana and Antti-Jussi, it became evident that this was a more complex problem than anticipated. Over the past few days, I delved into research and reading, and I now believe that the solution is a relatively simple fix.

Part 1 of the Solution: Modifying the language dropdown on our UI to display appropriate indications

Typically, webpages and applications disrupt user experience and create confusion when there are inadequate indications. Consider it akin to entering a highway without clear signs indicating which exits are open and which are closed. By providing indicators in the language dropdown, users can ascertain which languages are complete and which are not before they proceed to change the UI. This preemptive information enables users to understand what to expect before making any adjustments. Furthermore, after extensive reading of various materials and webpages, it appears that many multilingual websites are also adopting this approach as the way forward.

Below, you'll find a screenshot illustrating how the dropdown could appear. We can integrate this information by implementing code that checks for incomplete form fields when metadata is filled.

image

Alternatively, if implementing it in the dropdown would be confusing, an indication can appear at the top of the page when a language is selected, stating whether the translations are complete or not. We'll opt for whichever solution is easier to implement.

Now, I'll outline how the information can be presented on each page.

For "Show metadata in other languages" all options (title, abstract and keywords) are selected. How would the page look like for each UI language (EN, DE, ES)?

UI: EN

Title (EN)
Author (EN)
Abstract (EN)
Keywords (EN)

Metadata in other languages

_Spanish_
Author (ES)
Keywords (ES)

_French_
Title (FR)
Author (FR)
Abstract (FR)
Keywords (FR)

_Finnish_
Keywords (FI)

UI: DE

Since we have already indicated that the Translations are not available for this language, users will not be confused if they see the metadata in Primary Locale which in our case is English

Metadata in other languages

_English_
Title (EN)
Author (EN)
Abstract (EN)
Keywords (EN)

_Spanish_
Author (ES)
Keywords (ES)

_French_
Title (FR)
Author (FR)
Abstract (FR)
Keywords (FR)

_Finnish_
Keywords (FI)

UI: ES

Since we have already indicated that some translations are not available for this language, users will not be confused if they see the metadata in Primary Locale which in our case is English

Title (EN) with indication that translation not available on the side
(This will help reinforce clarity and prevent confusion. Through user research, I've learned that our users are not averse to seeing additional information. What they dislike are convoluted elements that leave them guessing.)
Author (ES)
Abstract (EN) with indication that translation not available on the side
(This will help reinforce clarity and prevent confusion. Through user research, I've learned that our users are not averse to seeing additional information. What they dislike are convoluted elements that leave them guessing.)
Keywords (ES)

Metadata in other languages

_English_
Title (EN)
Author (EN)
Abstract (EN)
Keywords (EN)

_French_
Title (FR)
Author (FR)
Abstract (FR)
Keywords (FR)

_Finnish_
Keywords (FI)

For "Show metadata in other languages" title and abstract are selected (keywords are not selected). How would the page look like for each UI language (EN, DE, ES)?

In this case we are do not show the keywords, not because the translations are not available but because the editor / journal manager has chosen to not show keywords

UI: EN

Title (EN)
Author (EN)
Abstract (EN)
Keywords (EN)

Metadata in other languages

_Spanish_
Author (ES)

_French_
Title (FR)
Author (FR)
Abstract (FR)

UI: DE

Since we have already indicated that the Translations are not available for this language, users will not be confused if they see the metadata in Primary Locale which in our case is English

Metadata in other languages

_English_
Title (EN)
Author (EN)
Abstract (EN)
Keywords (EN)

_Spanish_
Author (ES)

_French_
Title (FR)
Author (FR)
Abstract (FR)

UI: ES

Since we have already indicated that some translations are not available for this language, users will not be confused if they see the metadata in Primary Locale which in our case is English

Title (EN) with indication that translation not available on the side
(This will help reinforce clarity and prevent confusion. Through user research, I've learned that our users are not averse to seeing additional information. What they dislike are convoluted elements that leave them guessing.)
Author (ES)
Abstract (EN) with indication that translation not available on the side
(This will help reinforce clarity and prevent confusion. Through user research, I've learned that our users are not averse to seeing additional information. What they dislike are convoluted elements that leave them guessing.)
Keywords (ES)

Metadata in other languages

_English_
Title (EN)
Author (EN)
Abstract (EN)

_French_
Title (FR)
Author (FR)
Abstract (FR)

@Devika008
Copy link

Hiiiii,

Following our discussion in the last CRAFT OA call, I've prepared the UX/UI for this issue. I believe this solution will address most of our problems and should be relatively easy to implement.

I have extracted the examples from the instances mentioned above, so I'll reiterate them here for clarity.

For "Show metadata in other languages" all options (title, abstract and keywords) are selected. How would the page look like for each UI language (EN, DE, ES)?

UI: EN
When selecting Spanish, French, or Finnish, the screen will scroll to display the metadata in those languages. Although these buttons could be mistaken for language selectors, I made them clickable to alleviate frustration caused by extensive scrolling through primary locale metadata to access secondary language metadata.
image

UI: DE
The German translation next to the selected language essentially states: "Since no translations for metadata are available, the metadata will be displayed in English." This helps manage expectations of the user
image

UI: ES
The Spanish translation next to the selected language essentially states: ""Some translations of metadata are not available, so you will see them in English."
image

For "Show metadata in other languages" title and abstract are selected (keywords are not selected). How would the page look like for each UI language (EN, DE, ES)?
In this scenario, we do not display the keywords, not because translations are unavailable, but because the editor or journal manager has chosen not to show them.

UI: EN
image

UI: DE
image

UI: ES
image

@ajnyga
Copy link
Contributor

ajnyga commented May 24, 2024

I think this is an interesting concept with the navigation on top.

To be honest my initial concept/idea was just to imitate what the journals were already doing when adding the abstract in more than one language to the same abstract field in order to show the data on the same page.

This is of course more complex, but probably would serve the same purpose.

What do others think? @asmecher @bozana @marcbria @AhemNason

@marcbria
Copy link
Contributor

marcbria commented May 24, 2024

Hi Devika,

I'm sorry to say that this time the proposal doesn't look good to me and I think it's all because we haven't been able to convey to you the main problem we are trying to solve (although I never rule out that I might be the one who is not clear about it). ;-)

I understood that the main objective is to allow bilingual researchers to read two languages at the same time (for example because my knowledge of one language is not as good as the other and the translated text serves to clarify) but the current solution does not allow this.

For example, if I want to read the abstract in English and French, I have to scroll (or click on the header) to jump from one text to the other... and nobody will do this.

Fellows, if I am wrong in the definition of the feature, please correct me.

That said, I also see UI/UX problems in the proposal such as:

  1. Excess of information.
  2. Problems with the hierarchy of information.
  3. Not enough emphasis on the submission language.
  4. Switch on/off functionality.

I comment on each case:

1. Excess of information

About the content:

  • By displaying ALL metadata, the volume of information will be overwhelming for the reader.
  • It is likely that most of the information displayed will be unnecessary (imagine that I want to read French and English... but on screen I will also have the other languages interposed between the ones I want to read).
  • Ultimately, the proposal will mean that the article pages will end up with a huge scroll.

About the interface:

  • The indicators of "Language selected / Discover metadata in other avaliable languages" are too relevant, appearing even before the article title (developed better in "Problems with hierarchy of information").
  • The clarifications about the "completeness of the data" generate noise and won't be read by final users (it would be preferable to use an infographic).

2. Problems with the hierarchy of information

  • The selectors at the beginning and the languages get in the way of the flow.
  • The structure of the information (title, author, abstract, keywords...) is not obvious at a glance.
  • As a conclusion: Multi-language features should be displayed without hindering the reading of the article, which should always be the main objective of the article page.

3. Not enough emphasis on the submission language.

If I put myself in the shoes of a bilingual researcher, I always want to know in which language the article was written, as there is no guarantee that the translations have been done by the authors themselves (lots of examples of errors in translations in science).
Therefore, if several metadata are displayed on screen, it is important that the language in which the submission was made (and therefore validated by the authors) is highlighted.
My proposal here would be to use a different background for the original text or some iconography (and as always, make the appropriate adjustments to ensure accessibility in that information).

4. Switch on/off functionality

We are working with the assumption that this is going to be a functionality that we activate at the journal level (editors/admins choose whether the article page shows all the langs or just one), but after some more thought, I think it is a mistake of approach as it is really the reader who should decide how the metadata is displayed.

So why not approach it as a "reading tool" (a term familiar to the old guys in the room)? ;-)

This would be an interface functionality that the reader can activate or deactivate at will (e.g. as a new icon in the header) and therefore available in all OJS.

I discuss this idea in the next point.

Some ideas

I suggest some ideas on how the problem could be solved without making the information so overwhelming.

Translations in the same field:
Actually this proposal is not mine... it's the one suggested by AJ in his previous post and I need to say that I'm not full convinced :-P, but I agree that it would be better than the current proposal.

I understand that what he is proposing is that, instead of dividing the page into languages, the languages should be interspersed in the fields, which would allow the bilingual reading I was talking about at the beginning.

It will looks like something like this: https://journal.fi/virittaja/article/view/126811

The problem I find here is that if there are many translations, the volume of information will saturate the reader... and showing this way it's a decision made by the editors/admins, not by the readers.

Side by side:
This would be a variant of the previous one but limiting the displayed languages to two, which would be displayed side by side.

This solution would have two drawbacks:

  • If no more than (say) the title and metadata is translated we are generating an empty column for the rest of the metadata.
  • Presenting the article in two columns (especially with themes with limited widths) is not conducive to readability.

Nice part is:

  • It's perfect for bilingual reading.
  • This makes obvious what metadata was NOT translated.

Click to switch:
Would it be too crazy to offer the functionality of clicking on a field to switch between languages?
This apporach has several advantages:

  • It doesn't overwhelm with unnecessary information (until reader request for it).
  • It leaves it up to the reader to decide when to activate it.
  • It can be activated on a field-by-field basis (instead of a general switch, you get the translation if you click over the field).
  • Can be combined with side-by-side (or not).
  • Facilitates bilingual reading without scrolling.

I would propose that, in the case of registered users, the language jump should be made only between the languages that the reader has indicated as "languages he/she knows", which in turn could be an incentive for visitors to register.

Devika, sorry for the long feedback, but I just didn't know where to cut.
Anything else, just whistle.

Take care!
m.

@ajnyga
Copy link
Contributor

ajnyga commented May 24, 2024

Hi,

I had this in the drawing board but Marc was faster :) So these comments are mostly something where I have not considered what Marc writes above.

In general I would prefer a simpler solution. I do think that the addition of explaining with the "i" element why OJS is showing some random language in the top for some fields would be a good idea, but I am unsure about the two elements above title (is metadata complete for the current language and the language links).

The use case here is to me not so much to show all possible content to bilingual readers. I do not think it serves them to have the same data in two languages which they are able to read.

The main use case is journals that publish mostly with one language, use one UI language BUT also produce for example English metadata mostly related to abstract and title of the article.

Currently in OJS if you have one UI language enabled, the metadata with other languages is not shown at all. And to solve this what journals do is that they add the metadata in several languages into a single metadata field to be able to show it online (https://journal.fi/virittaja/article/view/126811).

We should have another solution for these journals they can easily use AND produce good metadata.

How would we define "all metadata available"
The central idea in the UI solution relies on our ability to say when metadata is "complete" or "partial". But in effect this is fairly hard to do. In most cases the metadata is never complete. I realize that in the UI it refers to a few specific fields to be complete, but I think we are leading the reader a bit off when we say that metadata is complete when we have title, abstract and keywords filled in.

Authors field
The example include the authors field but in our original suggestion we did not consider this field at all. I do not think it is that important to include, but of course technically possible.

Visual elements in default theme?
The examples above are not for default theme now, just wanted to confirm that would the elements look the same in default?

@marcbria
Copy link
Contributor

marcbria commented May 24, 2024

In OJS if you have one UI language enabled, the metadata with other languages is not shown at all.

Hummm... didn't thought in this scenario. It's not a common case here.
When a journal have more than one lang, they enable the UI for this lang too.
Is there a reason to NOT enable the UI in other langs?

And to solve this what journals do is that they add the metadata in several languages into a single metadata field to be able to show it online

Noooo, peeeeople, pleeease... don't do that. :___-(
Every time someone does that, a library-kitten dies.

I do not think it serves them to have the same data in two languages which they are able to read.

Well, there are different levels of knowledge of a language.
For instance, I'm spanish and catalan native speaker (as unbelievable as it may seem after hearing me speak English)... and for me, showing both will be useless.
But when second lang is not as good as first (let's say Spanish vs English?) I would really appreciate to see the original text (English) and the translation (Spanish). I thought in this second case after Emma's presentation about m13m.

But my apologies if I was straying off topic and thank you for focussing the issue.
Any case, I think points 1 to 4 that I raised are about UI/UX and apply equally, isn't it?

How would we define "all metadata available"

And what about letting the journalmanagers decide about this?
I mean, why not a config matrix to check what metadata need to be completed for each lang?

Authors field: in our original suggestion we did not consider this field at all.
Visual elements in default theme?

Agree on both.

@Devika008
Copy link

Hello @marcbria and @ajnyga

Firstly, thank you so much for taking the time to explain the problem in detail. I believe my faulty UX/UI solution prompted a more in-depth response, providing me with greater detail about the issue. I realise now that I was working with some wrong assumptions and lacked crucial information, so thank you once again.

I reviewed both your responses in detail and have a solution in mind, which I will present here. However, I want to address some questions raised above first.

Visual elements in default theme
In my design directory, I have revised OJS elements that are being implemented as we modernize the code. However, creating the old visual components took too much time. Therefore, whichever developer works with me takes cues from these design elements and matches them to the visual elements in older themes and versions. The rationale behind my designs is primarily UX, and the UI or visual components are considered when we collectively decide to upgrade the design, such as for submission lists or user invitations.

Translations in the same field
To be honest, I have reservations about this idea. Initially, I designed something similar but wasn't convinced it would work. The feedback I received confirmed my hunch: users would have to scroll through unnecessary language metadata to find relevant information. This issue aligns with the problems you both raised about the proposed solution. So I wouldn't recommend going ahead with this ( this is also because I want to save some kittens in libraries :p)

In OJS if you have one UI language enabled, the metadata with other languages is not shown at all.

Based on the information I have received, there are two factors at play: UI language and metadata language.

UI languages could be: English(EN), German(DE) and Spanish(ES)
The Journal (for some reason beyond my understanding) can input metadata in following languages: English(EN), Spanish(ES), French(FR) and Finnish (FI)

This means that even if I change the UI language to German (DE) I can still see or have access to metadata in English(EN), Spanish(ES), French(FR) and Finnish (FI)

This was the example I was working on and let me know if my understanding on this particular case is correct @bozana @ajnyga and @marcbria

Proposed Solution

Firstly thank you @marcbria for putting the some ideas across because just yesterday I was tinkering with something on similar lines

I have been researching bilingual speakers and found that a side-by-side view works best for comparing information and filling in gaps. I believe the readers, not the journal managers, should decide on this format, as they are the ones using the data.So here is my solution. I made a very very very very very basic drawing (scribble) but only if you'll agree with the proposed solution, ill go create a mock-up

image
  1. We will have the article landing page in Primary Submission Language (English here)
  2. Metadata will have buttons below them to show options to select languages in which other metadata is available
  3. Upon clicking "Show French", the abstract in French appears to the right of the English abstract.
  4. Both versions are displayed side by side, with clear separation (e.g., vertical line or shaded background).

Some Guiding Questions for this proposal over and above the questions and points raised above include

  1. How can we make the language selection intuitive and easily noticeable?
  2. What is the best layout to display the metadata side by side without cluttering the interface?
  3. How can we ensure the text in different languages is readable and well-formatted?
  4. How do we handle long texts and maintain readability across different devices?

The Disadvantages

  1. Below the metadata, there will be language text buttons that would function as breakpoints for readers. However, we can decrease their prominence to minimize hindrance.

The Advantages

  1. Provide readers with more control through comparison options.
  2. Minimize scrolling.
  3. Display only the metadata in the selected language, eliminating empty space and unnecessary translations in areas the reader does not wish to see.
  4. In cases where the UI language is set to German but translations are not available, we can still display information circles next to the unavailable translations. Upon hovering over these circles, readers can see that the information is displayed in English because German translations are not available.

According to me is quite an easy way out with only one disadvantage. Let me know your thoughts and opinions. I am determined to provide the best solution to our users.

@marcbria
Copy link
Contributor

The Journal (for some reason beyond my understanding) can input metadata in following languages: English(EN), Spanish(ES), French(FR) and Finnish (FI). This means that even if I change the UI language to German (DE) I can still see or have access to metadata in English(EN), Spanish(ES), French(FR) and Finnish (FI)

Not exactly, but don't suffer. I was also lost on the subject, till AJ's comments.

Short version: If the UI doesn't allow you to choose a language, that metadata won't be displayed.

Why it happens?

Take a look to this screenshot form the lang configuration in a testing journal:
imagen

It show us that you will be able to submit in all langs except Portuguese BUT (this is the relevant part) you won't be able to see the metadata of your articles in PT and IT because the interface (lang selector) don't let you switch to any of those langs than the ones with UI check enabled.

At this point, reading this matrix, some questions would rise to you here, like:

  • Has any sense to allow submissions in IT and don't enable the UI? Well... may be the editors decided that the IT translation is not good enough to be shown, may be is a configuration error... but the fact is this metadata won't be exposed to visitors.
  • Has any sense to enable PT lang and disallow PT submissions and UI? Although it looks absurd at first sight, but journals are living organisms so this specific settings could make sense for a journal that decide to temporarily disable PT (ie: started with powerful PT editors/reviewers but don't have them anymore) or again, could be a configuration error... but anyway, it's a valid combination.

Sorry in advance if I have overexplained myself. :-)
I don't know what information might be relevant to you, so I prefer to write it all down for you to decide.

Back to the thread

I have been researching bilingual speakers and found that a side-by-side view works best for comparing information and filling in gaps... if you'll agree with the proposed solution, ill go create a mock-up

The new solution is much better than former one and looks good to me... but apart from the problems you pointed, I will also highlight that:

  • Imagine a journal that only translate the title... it will generate an empty column for all the rest of metadata, isn't it?
  • Not all themes will be able to handle columns gracefully... and as you say, what to do on responsive?
  • The "switch lang" after each field will be kind of redundant and will break the reading flow.

What do you think about the idea of "Click to switch metadata lang"?
We won't be showing content "side-by-side" but all metadata will be reachable and we won't need columns.

In cases where the UI language is set to German but translations are not available, we can still display information circles next to the unavailable translations. Upon hovering over these circles, readers can see that the information is displayed in English because German translations are not available.

I think I understand you but I'd rather ask than regret. We're not planning to transfer the "red balloon" solution to visitors, are we? If so, it would be a mistake as the solution is already provoking complaints in the backend and exporting it to the frontend would be adding more tongue to the fire.

I understand that it would be a much more discreet solution but it would explain why a certain field cannot be displayed with the language requested by the user with the UI language selector, isn't it?

Thanks a lot for your work Devika.

@bozana
Copy link
Contributor

bozana commented May 27, 2024

@marcbria, before I read your last post till the end :-) : we now have separate submission and UI languages -- submission language can be anything from the weblate list of languages, while UI languages are only those we have translation for...

@marcbria
Copy link
Contributor

@marcbria, before I read your last post till the end :-) : we now have separate submission and UI languages -- submission language can be anything from the weblate list of languages, while UI languages are only those we have translation for...

Thanks because it answers my question about "Is there a reason to NOT enable the UI in other langs?" (to reach the metadata).
Hope my comments will be still useful, at least to show "how we got here".

@AhemNason
Copy link

Hey folks, I'm just getting caught up on this conversation and trying to wrap my head around it. 

I think any movement in this direction is good. Off the top. I just want to say that! Devika, I appreciate all the work you've put into these. 

I think there's more than one reason for journals to try to display multilingual metadata. 

Marc said this: 

 I understood that the main objective is to allow bilingual researchers to read two languages at the same time (for example because my knowledge of one language is not as good as the other and the translated text serves to clarify) but the current solution does not allow this.

I think this is only half true. The other objective is to give journal options for displaying multilingual metadata so that they're not tempted to jam all their metadata into one field to get them to display at the same time. 

When I see errors in this space it is almost always about display. "I want to see both". "I want our title to have both languages". "I want both abstracts to be viewable on one record without having to search for it." 

But, it's possible that this is a cultural difference between what I've seen with Canadian journals and what I've seen with other cultures where bilingualism is a lot less... uhhh... federally complex

But I also want to raise something that A-J said further down: 

 How would we define "all metadata available"
The central idea in the UI solution relies on our ability to say when metadata is "complete" or "partial". But in effect this is fairly hard to do. In most cases the metadata is never complete. I realize that in the UI it refers to a few specific fields to be complete, but I think we are leading the reader a bit off when we say that metadata is complete when we have title, abstract and keywords filled in.

This is where I think we start to run into problems with multilingual metadata for real. Downstream. When the metadata leaves OJS for other systems. 

There's two problems: 

  1. Multilingual Metadata Fidelity
  2. What metadata is displayed

And Devika has indicated this. 

And I think the side-by-side option for displayed stuff works. But I do think we need to figure out what we mean by "completeness" in the multilingual space before we figure out what "completeness" in the UI/UX space is. 

Basically, I don't really know if users need an at-a-glance multilingual view for, like, affiliations. They need titles, abstracts, and then galley labels. We know that much. And I think for major UI/UX refactors knowing what metadata users need, specifically, in this kind of view is good. I'm not confident it needs to be "all available metadata". And, actually, I almost think we should do something more like a DSpace or repository record where you can view all item metadata external to the article view UI. 

I think I'll also tag @mtub here. I do think the conversations around what's displayed for multilingual metadata and how users see it is a huge issue. There's such a balance between: 

  • metadata completeness and consistency
  • ui/ux best practice
  • reader needs
  • journal wants

@jardakotesovec
Copy link
Contributor

jardakotesovec commented Nov 22, 2024

Hi, just let you know, I have been reviewing the metadata switching on article page.

But still have not figure out how to proceed exactly with it yet.

Main issue I have there is with that metadata switcher.

From seeing the interactive mockup - it works exactly as html select element - just with custom look. You click on it, and than you can select other one and once you select other one it closes.

So I think best for accessibility would be to code it like that. Example of such component with correct accessibility is for example here - https://headlessui.com/v1/vue/listbox (when using for example such headless component its quite straightforward to have custom look as in mock up)

And ideally organise it is so the code of the select component itself is not entangled as much with the metadata changing use case.

On the reader side we have limited options (no vue.js yet). I have been looking to alpinej, which currently offers headless components and is good fit - does not require build step and is good for adding some JS interactivity.

I managed to make it work with it - avoiding any custom JS and relying on alpine for accessibility. But realised that the problem might be that even all alpine code is MIT - the documentation for components/headless components are paywalled, so I am not sure how much we would want to encourage using it going forward. So need to check with team and explore if I can come up with some other alternative. Basically to avoid re-implementing listbox correctly.

Ideas/thoughts welcomed.

@jardakotesovec
Copy link
Contributor

jardakotesovec commented Nov 28, 2024

@jyhein
Sorry for delay.. lets proceed with following:

Here is example how the alpine select can be used, so we don't have to reinvent accessible select - 4bf3847

Here are suggestions to improve things

  1. Move the select component to separate smarty component, so its not repeated and its simple to replace it with different implementation if we would depart with alpine
  2. select itself should not be inside h element
  3. lets keep more intricate logic in php realm, so we can keep the smarty templates as simple as possible, which makes it easier for downstream to update it and it also it makes easier once we would be moving from smarty. So for example its better to calculate which locales are available for each metadata in php
  4. Same with styling - default theme needs to be easy to understand and adjust. Lets keep it as simple as possible - I don't think we need animations there for example. The css I introduced is not something to follow neceserrarly - just wanted to illustrate that I can achieve custom styling with this headless component
  5. The alpine dependency should be handled from package.json.. thats something I can look into later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants