Skip to content

(document-internationalization) Adding option to change preview of translations metadata #1629

Description

@Michaelkire

Hello Sanity maintainers.

I'm trying to create a setup in this fashion:

Page (document level translated)
-> list of references to modules of X type
Module X (field level translated)
-> call to action reference to a Page translation metadata (filtered in the reference defineField fn)

To which I've set up the document-internationalization plugin to handle the page localization.

However, when selecting any of these in the call to action field, I get a predefined preview which just says Y translations and the type name, meaning visually its hard to see what page was actually selected.

The reason for doing this is to enable editors to make modules which are locale independent when linking internally, but having the actual resolve of locale specific url happen on GROQ fetch time in my nextjs app.

So I propose an ability to change/override the preview for the translations metadata in the plugin options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions