Paste block to all locales

A neat little addition to Copy-Paste blocks.

It would be very useful to have Paste block to all locale. With 12 locales I have to spend some time to paste it to every locale:

Hey @primoz.rome, what’s the use case here?

We generally try to discourage people from reusing the same blocks all over the place (because then wouldn’t a linked record make more sense?)… but maybe there’s a use case we’re not considering?

There’s also a locale copy plugin: https://www.datocms.com/marketplace/plugins/i/datocms-plugin-locale-duplicate if that helps…? You can modify that to be field-specific or block-specific if you want.

But if you’re reusing a block over and over again between locales, can’t that block just be a linked record instead with localized fields within it?

I am happy to share my usecase. Maybe there is already a better way of doing this and I don’t know it…

Here is the screenshot for editing my Landing Page model…

Field sections is modular content field type. Let’s say we add a new block to this in English locale (or multiple blocks). We take care of only English editorial, but then we need copy this same content to all other locales and have our locale editors translate it.

Now my workflow is that I am copying new block(s) from English locale and then use paste block function in every locale. I need to repeate this 11-times to get to the last locale. Now imagine when we add couple of new blocks. It takes some time to copy all newly added blocks.

But if you’re reusing a block over and over again between locales, can’t that block just be a linked record instead with localized fields within it?

That is the case in some situations. But I am using predefined modular blocks, because it’s easier to compose landing paye layouts…

There’s also a locale copy plugin: https://www.datocms.com/marketplace/plugins/i/datocms-plugin-locale-duplicate if that helps…? You can modify that to be field-specific or block-specific if you want.

Need to dig into this one if this could help in my usecase.

I see, thanks for explaining, @primoz.rome! In your case, I don’t think there is an easy solution yet.

We might be able to do this with a plugin that extends the bulk block selection feature and then offer to copy them to different locales: https://www.datocms.com/docs/plugin-sdk/dropdown-actions#global-record-actions

Let me take a look and see if I might be able to make a quick example.

Sorry Primoz, I was wrong about this. The bulk actions and dropdowns can only apply to records and fields right now, not blocks. It’s one of the things we’re discussing and can hopefully add in the future (at which point a plugin like this will be much simpler), but it’s not available yet. Sorry about that!

Let’s keep this feature request open and I’ll let you know if we do add that hook.

1 Like

Thank you @roger … Very understood from our side. If this comes in the future, it will make few of our editors happy :)! Take care.