Skip to content

fix: Hardcoded strings in comment components (BLO-1033)#2681

Merged
matthewlipski merged 1 commit intomainfrom
comments-components-i18n
Apr 28, 2026
Merged

fix: Hardcoded strings in comment components (BLO-1033)#2681
matthewlipski merged 1 commit intomainfrom
comments-components-i18n

Conversation

@matthewlipski
Copy link
Copy Markdown
Collaborator

@matthewlipski matthewlipski commented Apr 27, 2026

Summary

This PR adds dictionary entries for any remaining hardcoded strings in comment-related components.

Closes #2530

Rationale

This is an issue for internationalization.

Changes

See above.

Impact

N/A

Testing

N/A

Screenshots/Video

N/A

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

Summary by CodeRabbit

  • New Features

    • Added multi-language support for reopening comments and displaying deleted reference messages throughout the app.
  • Localization

    • Expanded translations to 24+ languages with new localized text for comment reopen actions and deleted content indicators.
    • Replaced hardcoded UI text with language-specific translations for improved user experience.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Apr 27, 2026 7:31pm
blocknote-website Ready Ready Preview Apr 27, 2026 7:31pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

📝 Walkthrough

Walkthrough

This PR extends internationalization support across 24 language locales by adding two new comment-related UI strings (deleted_reference_text and actions.reopen), and updates three React components to reference these localized strings instead of hardcoded text values.

Changes

Cohort / File(s) Summary
Locale Translations
packages/core/src/i18n/locales/ar.ts, de.ts, en.ts, es.ts, fa.ts, fr.ts, he.ts, hr.ts, is.ts, it.ts, ja.ts, ko.ts, nl.ts, no.ts, pl.ts, pt.ts, ru.ts, sk.ts, uk.ts, uz.ts, vi.ts, zh-tw.ts, zh.ts
Added comments.deleted_reference_text and comments.actions.reopen keys across all supported language locales.
React Components
packages/react/src/components/Comments/Comment.tsx, FloatingComposer.tsx, ThreadsSidebar.tsx
Replaced hardcoded UI strings with localized dictionary references: reopen action tooltip, save button text, and deleted reference message.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • nperez0111

Poem

🐰 Hops through languages with glee,
Words bloom in twenty-four locales free,
Comments reopen worldwide and true,
Translations dance in every hue!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description follows the template structure and includes all major sections, but some sections lack meaningful detail and specificity. Provide more specific details in the 'Changes' section beyond 'See above', and clarify the testing approach—even if automated tests weren't added, explain the manual validation strategy used.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the main change: removing hardcoded strings from comment components and replacing them with dictionary-driven localized values.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch comments-components-i18n

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 27, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2681

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2681

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2681

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2681

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2681

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2681

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2681

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2681

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2681

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2681

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2681

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2681

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2681

commit: 98953ab

Copy link
Copy Markdown
Contributor

@nperez0111 nperez0111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthewlipski matthewlipski changed the title fix: Hardcoded strings in comment components fix: Hardcoded strings in comment components (BLO-1033) Apr 28, 2026
@matthewlipski matthewlipski merged commit e23f858 into main Apr 28, 2026
41 checks passed
@matthewlipski matthewlipski deleted the comments-components-i18n branch April 28, 2026 13:46
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

Successfully merging this pull request may close these issues.

FloatingComposer doesn't use dictionary for UI elements

2 participants