Skip to content

fix(richtext-lexical): use headingLevel in danish heading label#15685

Open
divyesh123-jain wants to merge 3 commits intopayloadcms:mainfrom
divyesh123-jain:fix/richtext-lexical-danish-heading-label
Open

fix(richtext-lexical): use headingLevel in danish heading label#15685
divyesh123-jain wants to merge 3 commits intopayloadcms:mainfrom
divyesh123-jain:fix/richtext-lexical-danish-heading-label

Conversation

@divyesh123-jain
Copy link
Contributor

What?

Danish rich text heading labels now show "Overskrift 1", "Overskrift 2", etc. instead of the raw placeholder "Overskrift {{overskriftNi...".

Why?

With the UI in Danish, the heading dropdown (H1–H4) showed an unresolved placeholder because the Danish string used {{overskriftNiveau}} while the code only passes headingLevel. The interpolation key must be {{headingLevel}} for the value to be substituted.

How?

In packages/richtext-lexical/src/features/heading/server/i18n.ts, the Danish (da) label was changed from 'Overskrift {{overskriftNiveau}}' to 'Overskrift {{headingLevel}}' so it matches the variable passed by the client. No other locales used a different placeholder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments