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

Adding dynamic language and URL input fields #133

Merged
merged 24 commits into from
Jul 23, 2024

Conversation

untari
Copy link
Contributor

@untari untari commented Jul 1, 2024

This pull request introduces dynamic input fields for adding languages and their corresponding YouTube URLsas part of the task in this issues: (#113) It also includes a button that allows the admin user to add more language and URL pairs dynamically.

Screenshot from 2024-07-01 16-01-13

Showcase for audio translation dropdown menu:
The current setup will display only the language titles in the dropdown menu. However, when a language is selected, it will only emit the selected language's title, not the associated URL yet.
eventyay-vid

Summary by Sourcery

This pull request introduces dynamic input fields for adding languages and their corresponding YouTube URLs, along with a button for admin users to add more language and URL pairs dynamically. It also enhances the audio translation dropdown and media source components to handle language changes and dynamically update the YouTube video being played.

  • New Features:
    • Introduced dynamic input fields for adding languages and their corresponding YouTube URLs in the admin interface.
    • Added a button to allow admin users to dynamically add more language and URL pairs.
    • Implemented a dropdown menu for audio translation that displays language titles and emits the selected language's title.
  • Enhancements:
    • Updated the AudioTranslationDropdown component to handle language changes and emit the selected language's YouTube ID.
    • Enhanced the MediaSource component to support dynamic language audio URLs and iframes for language-specific YouTube videos.
    • Modified the rooms/item.vue view to initialize languages dynamically and handle language changes.
    • Updated the stage.vue view in the admin interface to use YouTube video IDs instead of URLs for language entries.

@untari untari marked this pull request as draft July 1, 2024 16:35
@untari untari force-pushed the translation-system branch from bf35e4b to 81b93e8 Compare July 9, 2024 17:06
@untari untari force-pushed the translation-system branch 3 times, most recently from 68b1813 to 05bde03 Compare July 21, 2024 13:43
@untari
Copy link
Contributor Author

untari commented Jul 21, 2024

Force pushing to bring back the changes to my messed up PR.

@untari untari marked this pull request as ready for review July 23, 2024 13:29
Copy link

sourcery-ai bot commented Jul 23, 2024

Reviewer's Guide by Sourcery

This pull request introduces dynamic input fields for adding languages and their corresponding YouTube URLs. It also includes a button that allows the admin user to add more language and URL pairs dynamically. The changes affect several components, including the AudioTranslationDropdown, ChatContent, MediaSource, and various views and store files. The main focus is on enabling dynamic language selection and handling YouTube URLs for audio translations.

File-Level Changes

Files Changes
webapp/src/components/AudioTranslationDropdown.vue
webapp/src/components/MediaSource.vue
webapp/src/views/rooms/item.vue
webapp/src/views/admin/rooms/types-edit/stage.vue
Implemented dynamic language and YouTube video ID input fields, and updated methods to handle language changes and corresponding YouTube video IDs.
webapp/src/components/ChatContent.vue
webapp/src/components/Chat.vue
Removed unused imports and refactored functions for better readability.
webapp/src/store/index.js Added state and mutation to handle YouTube translation audio URL.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @untari - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@mariobehling mariobehling requested review from hongquan and odkhang July 23, 2024 13:45
@mariobehling
Copy link
Member

Ok, so we need to test this in a larger team with more people and this will only be possible when deployed to production. For now I could see that key features work. Good job! Thank you!

@mariobehling mariobehling merged commit c7babe8 into fossasia:development Jul 23, 2024
1 of 2 checks passed
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.

4 participants