payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
28.91k stars 1.8k forks source link

Translation for Link Element in Rich Text Field #1565

Closed DanRibbens closed 1 year ago

DanRibbens commented 2 years ago

Discussed in https://github.com/payloadcms/payload/discussions/1562

Originally posted by **bobbyZ94** December 1, 2022 The link element pop-up inside the rich text editor is missing translations. ![grafik](https://user-images.githubusercontent.com/63556657/205050811-9e95cc2d-2a3e-49f8-bf2e-05b700ea5c2e.png) And this little tooltip is also missing translations. ![grafik](https://user-images.githubusercontent.com/63556657/205051209-d51f0cdb-1e67-49ff-94e2-bddbeacf2323.png) Would it be possible to add these translations or is there a workaround possible with an e.g.: custom slate element?

Recommended fix

Under src/admin/components/forms/field-types/RichText/elements/link/Modal/ the index.tsx and baseFields.ts needs translations added.

DanRibbens commented 1 year ago

@bobbyZ94 I have a PR for the code change. Now we just need the language files updated. If you want to contribute the translation we need these keys added in /src/translations:

fields:
    chooseBetweenCustomTextOrDocument
    chooseDocumentToLink
    customURL
    editLink
    enterURL
    internalLink
    linkType
    openInNewTab
    textToDisplay
bobbyZ94 commented 1 year ago

Opend a PR with german translation.

DanRibbens commented 1 year ago

@bobbyZ94 Thank you for this!

Closing now since it has been released, though more languages still need translation as an ongoing matter.

github-actions[bot] commented 2 months ago

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.