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

[OWA-79] feat(i18n): add translations #602

Merged
merged 40 commits into from
Sep 19, 2024

Conversation

CarinaDraganJW
Copy link
Contributor

@CarinaDraganJW CarinaDraganJW commented Aug 28, 2024

Description

  • This PR adds custom translations in the web app

Steps completed:

According to our definition of done, I have completed the following steps:

  • Acceptance criteria met
  • Unit tests added
  • Docs updated (including config and env variables)
  • Translations added
  • UX tested
  • Browsers / platforms tested
  • Rebased & ready to merge without conflicts
  • Reviewed own code

@CarinaDraganJW CarinaDraganJW marked this pull request as draft August 28, 2024 13:28
Copy link

github-actions bot commented Aug 28, 2024

Visit the preview URL for this PR (updated for commit bba1a37):

https://ottwebapp--pr602-feature-owa-79-add-t-wemqd5g1.web.app

(expires Sat, 19 Oct 2024 12:23:40 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c198f8a3a199ba8747819f7f1e45cf602b777529

@baukef
Copy link

baukef commented Aug 29, 2024

Great work. Could you maybe describe the scope of this ticket a bit more?

@CarinaDraganJW
Copy link
Contributor Author

Great work. Could you maybe describe the scope of this ticket a bit more?

@baukef Definitely! In the dashboard, we have the Translations section on media details page, where users can add custom translations for the content type fields marked as translatable. For each field filled in we save a custom parameter of the following type: param-languageCode: translation introduced in the field

However, we did not integrate this into the OTT Web App yet, so these custom params translations are not retrieved. What this ticket is trying to do is to retrieve these custom params and transform the media item: if we for instance have title and title-es, and language is set to es (Spanish), we will retrieve value for title-es and set title to this value.

@baukef
Copy link

baukef commented Aug 29, 2024

It would be awesome if you could extend this pattern to playlists as well. This is not yet available in the dashboard, but we could still use the custom parameters on playlists. The main goal would be for the navigation (library) items to be translated this way.

@marcovandeveen
Copy link
Member

@baukef agree. It should probably be on a shelf level

Shelves have titles as well. The same goes for menu items.
Shelves now have custom params as well. So should be easy to implement the pattern there as well.

@langemike
Copy link
Collaborator

This is heading in the right direction. I suggest using APP_DEFAULT_LANGUAGE for the language fallback instead of the hard-coded 'en'

@CarinaDraganJW CarinaDraganJW marked this pull request as ready for review September 2, 2024 08:21
@CarinaDraganJW CarinaDraganJW changed the title [OWA-79] Feature | Add translations [OWA-79] feat(i18n): add translations Sep 5, 2024
@CarinaDraganJW
Copy link
Contributor Author

@AntonLantukh @ChristiaanScheermeijer Code is ready and working, feel free to have another look 🚀

@CarinaDraganJW
Copy link
Contributor Author

Hi @ChristiaanScheermeijer 👋🏻

The feature is ready, I fixed all the feedback Anton had and I added translations for all media on Blender
Let me and Anton know if you have any more feedback on the code, otherwise I can proceed and merge the PR 🚀
Thank you for all the help ❤️

@CarinaDraganJW CarinaDraganJW merged commit e116b12 into develop Sep 19, 2024
10 checks passed
@CarinaDraganJW CarinaDraganJW deleted the feature/OWA-79.add-translations branch September 19, 2024 12:39
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.

6 participants