Skip to content

Video Files cannot be translated ('wagtailmedia.Media') #587

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

Open
hennabanana opened this issue Jun 22, 2022 · 7 comments
Open

Video Files cannot be translated ('wagtailmedia.Media') #587

hennabanana opened this issue Jun 22, 2022 · 7 comments

Comments

@hennabanana
Copy link

Hi there,

currently its not possible to upload a Video for a Video-Media-File in a another language (https://github.com/torchbox/wagtailmedia). After Translating the Page, its just empty.

is it possible to add this datatype so that i can upload an video in another language by the MediaChooserPanel?

class VideoSlidePage(Page):

   video = models.ForeignKey(
        'wagtailmedia.Media',
        null=True,
        blank=True,
        verbose_name=_('Video'),
        on_delete=models.SET_NULL,
        related_name='+' )

Screenshot 2022-06-22 at 08 32 07

@zerolab
Copy link
Collaborator

zerolab commented Jun 24, 2022

Hey @hennabanana,
thank you for bringing this up.

Hmm, I would've thought this would be handled by the fallback logic. Will try to have a look sometime soon.

@zerolab
Copy link
Collaborator

zerolab commented Jul 4, 2022

Had a look over the weekend. This will require more work as localize doesn't know which chooser to use.

@catilgan-nextension
Copy link

Hi @zerolab

Is there any chance that this feature will be implemented in near future? We need support for translating the audio files in StreamField fields. Currently, the UI in translation view only shows the foreign key of the media model.

I tried to implement the functionality by myself within the test application, but it's rather a "hacky" solution. So, we would be glad, if there is an official support for media files.

Thanks for the great work on the Wagtail Localize and Wagtail Media projects.

@catilgan-nextension
Copy link

Hi @zerolab

I implemented the missing chooser logic in our own fork and created a pull-request (#847). I hope my implementation helps to fix this issue.

Unfortunately, the dependency checks are failing due to code formatting issues. Thanks for the support.

@zerolab
Copy link
Collaborator

zerolab commented Jan 15, 2025

Thanks @catilgan-nextension, will try to have a look soon. The main consideration is we can't make wagtailmedia a dependency, so the code would need to check that wagtailmedia is an installed app

@catilgan-nextension
Copy link

Thanks @zerolab for your reply and looking into this issue.

Yes, i understand your point with the dependency of wagtailmedia, since it's not a Wagtail core module. Nonetheless, the wagtailmedia is such an important module for most Wagtail sites, at least for us, the localization workflow should to be working for media files. This dependency might be "acceptable" in this case.

@zerolab
Copy link
Collaborator

zerolab commented Jan 16, 2025

Let's carry over this discussion on the PR. As I mentioned, we need to avoid tight coupling with a third-party package (even if it happens that I maintain both 🙈 )

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

No branches or pull requests

3 participants