sanity-plugin-internationalized-array icon indicating copy to clipboard operation
sanity-plugin-internationalized-array copied to clipboard

Copy/Paste Issue: Translated Fields Lose _key Assignment

Open marco-land opened this issue 1 year ago • 4 comments

Hi, I’ve noticed an issue with Sanity’s Copy/Paste functionality that might need attention. When using this feature, the translated fields do not seem to paste correctly. Specifically, the _key values are replaced with new random UIDs rather than retaining their associated language keys.

As a result, after pasting, it becomes necessary to manually re-select the language for each field, which is time-consuming and could lead to errors.

This significantly impacts workflows involving multilingual content.

CleanShot 2024-11-19 at 16 42 54@2x CleanShot 2024-11-19 at 16 26 03@2x

marco-land avatar Nov 19 '24 15:11 marco-land

We are experiencing the same issue. Any updates on this? Thank you

messiosmarios avatar Apr 10 '25 09:04 messiosmarios

Same issue here

olivierolivier avatar Jun 19 '25 13:06 olivierolivier

Same problem, any update?

pkol92 avatar Jul 24 '25 08:07 pkol92

Even worse than having to manually select language, is the default language is pre-created and thus cannot be selected. It also cannot be removed because it's the default language. So this completely inhibits usage of the copy-paste functionality for fields using this plugin.

Image Image

I am quite bummed the localization is not standard built-in functionality in Sanity. That was one of my main doubts when choosing Sanity as CMS, and this was exactly the type of issue I was afraid of.

By the way, when debugging I noticed that the keys aren't included in the copy-paste format — it's quite basic actually. Just a comma-separated list of values, with no indication of field names, types, or keys:

Item 1 NL, Item 1 EN, normal, Item 1 NL portabletext, Item 1 EN portabletext, normal, Item 2 NL, Item 2 EN, Item 2 FR, Item 2 NL portabletext, normal

This is copied from this field:

Image

So I think this plugin will never be able to fix this, as it's impossible to infer the language from the data copied. Maybe we should move this issue to the main https://github.com/sanity-io/sanity repo instead?

rijk avatar Oct 09 '25 13:10 rijk

Any news on this?

harrycollin avatar Nov 22 '25 16:11 harrycollin