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

Set language from context when using copy endpoint #2845

Open
tmkarlsen opened this issue Dec 9, 2024 · 3 comments
Open

Set language from context when using copy endpoint #2845

tmkarlsen opened this issue Dec 9, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request NDLA NDLA Edlib

Comments

@tmkarlsen
Copy link
Member

tmkarlsen commented Dec 9, 2024

Copy endpoint flow

Ensure the language from context (NDLA = articles) is set when opening CA to create copies. Edlib (Hub) seems to have gotten this info, as it displays the correct language in the header.
Note: this is the same behavior as when new content is created today -> the language from the article is set within CA + H5P.

Desired solution:

  • the language selector in Edlib should be set according to article language
  • the language selector in H5P settings and texts should be set according to article language

Screenshot shows the desired outcome

Image

@tmkarlsen tmkarlsen added enhancement New feature or request NDLA NDLA Edlib needs triage All issues that need to be triaged by repository admins labels Dec 9, 2024
@tmkarlsen tmkarlsen added this to Edlib 3 Dec 9, 2024
@tmkarlsen tmkarlsen moved this to 📋 Backlog in Edlib 3 Dec 9, 2024
@tmkarlsen tmkarlsen removed the needs triage All issues that need to be triaged by repository admins label Dec 11, 2024
@tmkarlsen tmkarlsen moved this from 📋 Backlog to 🔖 Prioritized and ready in Edlib 3 Jan 9, 2025
@chrieinv
Copy link
Contributor

chrieinv commented Jan 9, 2025

@tmkarlsen
In the image above, you had Norwegian Bokmål selected in the NDLA editor, and used the copy function on a Norwegian Nynorsk content, and this should cause the two language selectors to show Norwegian Bokmål?

@tmkarlsen
Copy link
Member Author

tmkarlsen commented Jan 10, 2025

@chrieinv my bad.

  • The image above shows the desired outcome (header is edited to describe this now)

  • The desired solution is now described in the unordered list in the text (also edited to be more precise)

@chrieinv
Copy link
Contributor

The translations in the "Texts overrides and translations" section in the H5P are stored in the H5P content. The switching of language is handled by the H5P editor in JavaScript when the user selects a different language from the dropdown. It may be possible to trigger this change after the H5P editor and H5P content are loaded, but a dialog will appear. This may also be possible to handle in JavaScript, but the user experience will not be good.

The other option is to copy the code that does the handling, this however increases the complexity when updating H5P Editor as we must verify that the code hasn't changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request NDLA NDLA Edlib
Projects
Status: 🔖 Prioritized and ready
Development

No branches or pull requests

2 participants