Skip to content
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

No localization for string "Reference to <document-type>" in Studio editor #8906

Open
LarsSelbekk opened this issue Mar 12, 2025 · 0 comments

Comments

@LarsSelbekk
Copy link

Describe the bug

Using a localization of the Sanity Studio such as nb-NO, no translation exists for the string "Reference to " when a field is an array of references. I cannot find a translation ID for this string, so I believe it is untranslatable.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Sanity studio using the nextjs-sanity-clean template
  2. In studio/src/schemaTypes/documents/post.ts, change the author field from
      type: 'reference',
      to: [{type: 'person'}],

to

      type: 'array',
      of: [{type: 'reference', to: [{type: 'person'}]}],
  1. Run npm install @sanity/locale-nb-no in the studio project
  2. Add localeNbNO() to plugins in sanity.config.ts
  3. Open the studio in the browser
  4. Click + and Post
  5. Scroll to the Author field, and click + Legg til (add)
  6. See that it says Reference to person instead of Referanse til person

Expected behavior
The label should say "Referanse til person", or it should at least be possible to translate.

Screenshots

Image

Image

Which versions of Sanity are you using?

@sanity/cli (global)          3.77.0 (latest: 3.79.0)
@sanity/assist                 3.2.0 (up to date)
@sanity/eslint-config-studio   4.0.0 (latest: 5.0.2)
@sanity/icons                  3.6.0 (latest: 3.7.0)
@sanity/locale-nb-no          1.1.19 (up to date)
@sanity/vision                3.77.0 (latest: 3.79.0)
sanity                        3.77.0 (latest: 3.79.0)

What operating system are you using?
MacOS Sequoia 15.3.2

Which versions of Node.js / npm are you running?

10.9.2
v23.9.0

Additional context

I'm not sure since it's under the legacy-path, but it might be this line

I found no instances of the string Reference to in https://github.com/sanity-io/locales or any ID which looked relevant, and the string was also not translated in the es-ES and fr-FR locales.

Security issue?
No

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

1 participant