wagtail / wagtail-localize

Translation plugin for Wagtail CMS
https://wagtail-localize.org/
Other
222 stars 84 forks source link

Sync block fields #750

Closed freddiemixell closed 8 months ago

freddiemixell commented 8 months ago

Hey, this is a great integration thank you for taking the time to build it!

As soon as my current project is over I've been talking with my managers to try to free up some time to help contribute to this and a few other Wagtail packages we've been using.

In the meantime, I'm still learning the codebase and I'm wondering: is there a way to sync a value within a block?

For example:

class YouTubeIframeBlock(blocks.StructBlock):
    """YT iFrame block."""

    video_id = blocks.CharBlock(
        required=True,
        help_text="Add a YouTube video ID"
    )

In our .po file for the post we receive a "video_id" for this value. Is there a way to tell Wagtail Localize to sync that and exclude it from the po file?

zerolab commented 8 months ago

Alas, that is not yet supported. See #307 - if you manage to get the time for this, it would be wonderful

freddiemixell commented 8 months ago

Thanks for pointing me in the right direction I will try to make this my first PR!