Skip to content

🌐 Consolidated commenting-disabled translation keys into single interpolated string#27174

Merged
rob-ghost merged 2 commits intomainfrom
fix/commenting-disabled-translation-keys
Apr 7, 2026
Merged

🌐 Consolidated commenting-disabled translation keys into single interpolated string#27174
rob-ghost merged 2 commits intomainfrom
fix/commenting-disabled-translation-keys

Conversation

@rob-ghost
Copy link
Copy Markdown
Contributor

The commenting-disabled box in comments-ui previously rendered its message using three separate translation keys: "You can't post comments in this publication.", "Contact support", and "for more information." This fragmented approach made it difficult for translators to produce natural-sounding sentences, since word order and grammar vary across languages. Splitting a sentence into independent fragments forces translators to work around English syntax rather than expressing the idea naturally in their own language.

This change consolidates those three keys into a single interpolated string: "You can't post comments in this publication. <a>Contact support</a> for more information." The <a> tag is handled at render time by @doist/react-interpolate, which swaps it for the actual mailto link element. Translators now see the full sentence and can reorder or restructure it freely while keeping the link in the right place.

All 63 locale files have been updated to remove the two obsolete keys and add the new combined key (with an empty value, ready for translation). The context file has also been updated with descriptions for the new key and a couple of previously undocumented keys.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 23e378ab-7cf4-4d5c-ac81-d7f0f33c8e61

📥 Commits

Reviewing files that changed from the base of the PR and between f04ac6a and a1f2cab.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (65)
  • apps/comments-ui/package.json
  • apps/comments-ui/src/components/content/commenting-disabled-box.tsx
  • ghost/i18n/locales/af/comments.json
  • ghost/i18n/locales/ar/comments.json
  • ghost/i18n/locales/bg/comments.json
  • ghost/i18n/locales/bn/comments.json
  • ghost/i18n/locales/bs/comments.json
  • ghost/i18n/locales/ca/comments.json
  • ghost/i18n/locales/context.json
  • ghost/i18n/locales/cs/comments.json
  • ghost/i18n/locales/da/comments.json
  • ghost/i18n/locales/de-CH/comments.json
  • ghost/i18n/locales/de/comments.json
  • ghost/i18n/locales/el/comments.json
  • ghost/i18n/locales/en/comments.json
  • ghost/i18n/locales/eo/comments.json
  • ghost/i18n/locales/es/comments.json
  • ghost/i18n/locales/et/comments.json
  • ghost/i18n/locales/eu/comments.json
  • ghost/i18n/locales/fa/comments.json
  • ghost/i18n/locales/fi/comments.json
  • ghost/i18n/locales/fr/comments.json
  • ghost/i18n/locales/gd/comments.json
  • ghost/i18n/locales/he/comments.json
  • ghost/i18n/locales/hi/comments.json
  • ghost/i18n/locales/hr/comments.json
  • ghost/i18n/locales/hu/comments.json
  • ghost/i18n/locales/id/comments.json
  • ghost/i18n/locales/is/comments.json
  • ghost/i18n/locales/it/comments.json
  • ghost/i18n/locales/ja/comments.json
  • ghost/i18n/locales/ko/comments.json
  • ghost/i18n/locales/kz/comments.json
  • ghost/i18n/locales/lt/comments.json
  • ghost/i18n/locales/lv/comments.json
  • ghost/i18n/locales/mk/comments.json
  • ghost/i18n/locales/mn/comments.json
  • ghost/i18n/locales/ms/comments.json
  • ghost/i18n/locales/nb/comments.json
  • ghost/i18n/locales/ne/comments.json
  • ghost/i18n/locales/nl/comments.json
  • ghost/i18n/locales/nn/comments.json
  • ghost/i18n/locales/pa/comments.json
  • ghost/i18n/locales/pl/comments.json
  • ghost/i18n/locales/pt-BR/comments.json
  • ghost/i18n/locales/pt/comments.json
  • ghost/i18n/locales/ro/comments.json
  • ghost/i18n/locales/ru/comments.json
  • ghost/i18n/locales/si/comments.json
  • ghost/i18n/locales/sk/comments.json
  • ghost/i18n/locales/sl/comments.json
  • ghost/i18n/locales/sq/comments.json
  • ghost/i18n/locales/sr-Cyrl/comments.json
  • ghost/i18n/locales/sr/comments.json
  • ghost/i18n/locales/sv/comments.json
  • ghost/i18n/locales/sw/comments.json
  • ghost/i18n/locales/ta/comments.json
  • ghost/i18n/locales/th/comments.json
  • ghost/i18n/locales/tr/comments.json
  • ghost/i18n/locales/uk/comments.json
  • ghost/i18n/locales/ur/comments.json
  • ghost/i18n/locales/uz/comments.json
  • ghost/i18n/locales/vi/comments.json
  • ghost/i18n/locales/zh-Hant/comments.json
  • ghost/i18n/locales/zh/comments.json
✅ Files skipped from review due to trivial changes (21)
  • apps/comments-ui/package.json
  • ghost/i18n/locales/sl/comments.json
  • ghost/i18n/locales/et/comments.json
  • ghost/i18n/locales/fi/comments.json
  • ghost/i18n/locales/nl/comments.json
  • ghost/i18n/locales/fr/comments.json
  • ghost/i18n/locales/zh/comments.json
  • ghost/i18n/locales/ta/comments.json
  • ghost/i18n/locales/is/comments.json
  • ghost/i18n/locales/sr-Cyrl/comments.json
  • ghost/i18n/locales/sv/comments.json
  • ghost/i18n/locales/hi/comments.json
  • ghost/i18n/locales/bg/comments.json
  • apps/comments-ui/src/components/content/commenting-disabled-box.tsx
  • ghost/i18n/locales/hr/comments.json
  • ghost/i18n/locales/pa/comments.json
  • ghost/i18n/locales/sw/comments.json
  • ghost/i18n/locales/pt/comments.json
  • ghost/i18n/locales/context.json
  • ghost/i18n/locales/ar/comments.json
  • ghost/i18n/locales/hu/comments.json
🚧 Files skipped from review as they are similar to previous changes (39)
  • ghost/i18n/locales/id/comments.json
  • ghost/i18n/locales/ko/comments.json
  • ghost/i18n/locales/de/comments.json
  • ghost/i18n/locales/ne/comments.json
  • ghost/i18n/locales/pl/comments.json
  • ghost/i18n/locales/th/comments.json
  • ghost/i18n/locales/el/comments.json
  • ghost/i18n/locales/vi/comments.json
  • ghost/i18n/locales/mk/comments.json
  • ghost/i18n/locales/af/comments.json
  • ghost/i18n/locales/it/comments.json
  • ghost/i18n/locales/si/comments.json
  • ghost/i18n/locales/he/comments.json
  • ghost/i18n/locales/kz/comments.json
  • ghost/i18n/locales/eu/comments.json
  • ghost/i18n/locales/ur/comments.json
  • ghost/i18n/locales/tr/comments.json
  • ghost/i18n/locales/mn/comments.json
  • ghost/i18n/locales/bs/comments.json
  • ghost/i18n/locales/bn/comments.json
  • ghost/i18n/locales/zh-Hant/comments.json
  • ghost/i18n/locales/sq/comments.json
  • ghost/i18n/locales/fa/comments.json
  • ghost/i18n/locales/nn/comments.json
  • ghost/i18n/locales/pt-BR/comments.json
  • ghost/i18n/locales/gd/comments.json
  • ghost/i18n/locales/lv/comments.json
  • ghost/i18n/locales/en/comments.json
  • ghost/i18n/locales/eo/comments.json
  • ghost/i18n/locales/ja/comments.json
  • ghost/i18n/locales/sk/comments.json
  • ghost/i18n/locales/ms/comments.json
  • ghost/i18n/locales/es/comments.json
  • ghost/i18n/locales/lt/comments.json
  • ghost/i18n/locales/da/comments.json
  • ghost/i18n/locales/uk/comments.json
  • ghost/i18n/locales/cs/comments.json
  • ghost/i18n/locales/ca/comments.json
  • ghost/i18n/locales/uz/comments.json

Walkthrough

The package version in apps/comments-ui was bumped from 1.4.2 to 1.4.3 and a new runtime dependency, @doist/react-interpolate@2.2.1, was added. The CommentingDisabledBox component was refactored to use react-interpolate to render the contact-support anchor via a mapping instead of inline JSX. Many locale files replaced the separate keys "Contact support" and "for more information." with a single combined key: You can't post comments in this publication. <a>Contact support</a> for more information.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: consolidating three separate translation keys into one interpolated string for the commenting-disabled message.
Description check ✅ Passed The description clearly explains the rationale, implementation approach, and scope of changes, directly relating to the changeset of translation consolidation across 63 locale files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 fix/commenting-disabled-translation-keys

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.12%. Comparing base (17492ed) to head (a1f2cab).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27174      +/-   ##
==========================================
- Coverage   73.13%   73.12%   -0.01%     
==========================================
  Files        1531     1531              
  Lines      121987   121987              
  Branches    14701    14699       -2     
==========================================
- Hits        89218    89206      -12     
+ Misses      31774    31764      -10     
- Partials      995     1017      +22     
Flag Coverage Δ
admin-tests 54.38% <ø> (-0.02%) ⬇️
e2e-tests 73.12% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rob-ghost rob-ghost marked this pull request as ready for review April 6, 2026 15:10
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ghost/i18n/locales/it/comments.json`:
- Line 77: The Italian locale file is missing a translation for the key "You
can't post comments in this publication. <a>Contact support</a> for more
information." in comments.json which will cause a fallback to English; add an
appropriate Italian translation string for that exact key in the
it/comments.json file (preserving the HTML <a> tag) so the UI uses the Italian
text (update the value for the key rather than adding a new key).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 390141fa-dfb7-4127-bea2-60d3f341b8ad

📥 Commits

Reviewing files that changed from the base of the PR and between 17492ed and b3ae272.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (65)
  • apps/comments-ui/package.json
  • apps/comments-ui/src/components/content/commenting-disabled-box.tsx
  • ghost/i18n/locales/af/comments.json
  • ghost/i18n/locales/ar/comments.json
  • ghost/i18n/locales/bg/comments.json
  • ghost/i18n/locales/bn/comments.json
  • ghost/i18n/locales/bs/comments.json
  • ghost/i18n/locales/ca/comments.json
  • ghost/i18n/locales/context.json
  • ghost/i18n/locales/cs/comments.json
  • ghost/i18n/locales/da/comments.json
  • ghost/i18n/locales/de-CH/comments.json
  • ghost/i18n/locales/de/comments.json
  • ghost/i18n/locales/el/comments.json
  • ghost/i18n/locales/en/comments.json
  • ghost/i18n/locales/eo/comments.json
  • ghost/i18n/locales/es/comments.json
  • ghost/i18n/locales/et/comments.json
  • ghost/i18n/locales/eu/comments.json
  • ghost/i18n/locales/fa/comments.json
  • ghost/i18n/locales/fi/comments.json
  • ghost/i18n/locales/fr/comments.json
  • ghost/i18n/locales/gd/comments.json
  • ghost/i18n/locales/he/comments.json
  • ghost/i18n/locales/hi/comments.json
  • ghost/i18n/locales/hr/comments.json
  • ghost/i18n/locales/hu/comments.json
  • ghost/i18n/locales/id/comments.json
  • ghost/i18n/locales/is/comments.json
  • ghost/i18n/locales/it/comments.json
  • ghost/i18n/locales/ja/comments.json
  • ghost/i18n/locales/ko/comments.json
  • ghost/i18n/locales/kz/comments.json
  • ghost/i18n/locales/lt/comments.json
  • ghost/i18n/locales/lv/comments.json
  • ghost/i18n/locales/mk/comments.json
  • ghost/i18n/locales/mn/comments.json
  • ghost/i18n/locales/ms/comments.json
  • ghost/i18n/locales/nb/comments.json
  • ghost/i18n/locales/ne/comments.json
  • ghost/i18n/locales/nl/comments.json
  • ghost/i18n/locales/nn/comments.json
  • ghost/i18n/locales/pa/comments.json
  • ghost/i18n/locales/pl/comments.json
  • ghost/i18n/locales/pt-BR/comments.json
  • ghost/i18n/locales/pt/comments.json
  • ghost/i18n/locales/ro/comments.json
  • ghost/i18n/locales/ru/comments.json
  • ghost/i18n/locales/si/comments.json
  • ghost/i18n/locales/sk/comments.json
  • ghost/i18n/locales/sl/comments.json
  • ghost/i18n/locales/sq/comments.json
  • ghost/i18n/locales/sr-Cyrl/comments.json
  • ghost/i18n/locales/sr/comments.json
  • ghost/i18n/locales/sv/comments.json
  • ghost/i18n/locales/sw/comments.json
  • ghost/i18n/locales/ta/comments.json
  • ghost/i18n/locales/th/comments.json
  • ghost/i18n/locales/tr/comments.json
  • ghost/i18n/locales/uk/comments.json
  • ghost/i18n/locales/ur/comments.json
  • ghost/i18n/locales/uz/comments.json
  • ghost/i18n/locales/vi/comments.json
  • ghost/i18n/locales/zh-Hant/comments.json
  • ghost/i18n/locales/zh/comments.json

Copy link
Copy Markdown
Member

@cathysarisky cathysarisky left a comment

Choose a reason for hiding this comment

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

This is a huge improvement in translate-ability, thank you!

To avoid losing existing translations, I reconstructed a couple spots where we already had strings. That way we keep whatever translators had already settled on (still available for improvements, or course!) instead of having those revert to English.

"View in admin": "Преглед в админ панела",
"Yesterday": "Вчера",
"You can't post comments in this publication.": "Не може да коментирате под тази публикация.",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "Не може да коментирате под тази публикация. <a>Връзка с поддръжката</a> за повече информация.",

"View in admin": "Im Admin anzeigen",
"Yesterday": "Gestern",
"You can't post comments in this publication.": "Sie können in dieser Publikation keine Kommentare schreiben.",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "Sie können in dieser Publikation keine Kommentare schreiben. <a>Kontaktieren Sie den Support</a> für weitere Informationen.",

"View in admin": "Visualizza nell'area admin",
"Yesterday": "Ieri",
"You can't post comments in this publication.": "Non puoi postare commenti in questa pubblicazione.",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "Non puoi postare commenti in questa pubblicazione. <a>Contatta il supporto</a> per maggiori informazioni.",

"View in admin": "Погледајте у админ",
"Yesterday": "Јуче",
"You can't post comments in this publication.": "Не можете објављивати коментаре у овој публикацији.",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "Не можете објављивати коментаре у овој публикацији. <a>Контактирајте подршку</a> за више информација.",

"View in admin": "Pogledajte u admin",
"Yesterday": "Juče",
"You can't post comments in this publication.": "Ne možete objavljivati komentare u ovoj publikaciji.",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "Ne možete objavljivati komentare u ovoj publikaciji. <a>Kontaktirajte podršku</a> za više informacija.",

"View in admin": "從管理後台檢視",
"Yesterday": "昨天",
"You can't post comments in this publication.": "您無法在此刊物留言。",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"You can't post comments in this publication. <a>Contact support</a> for more information.": "",
"You can't post comments in this publication. <a>Contact support</a> for more information.": "您無法在此刊物留言。<a>聯繫客服</a> 以取得更多資訊。",

Copy link
Copy Markdown
Member

@cathysarisky cathysarisky left a comment

Choose a reason for hiding this comment

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

Good fix, thanks! :)

…polated string

Replaced three separate translation keys ("You can't post comments...", "Contact support",
"for more information.") with a single key using <a> tag interpolation via
@doist/react-interpolate. Fragmented keys made it impossible for translators to
produce grammatically correct sentences in languages with different word order.
Applied @cathysarisky's translations for bg, de-CH, it, sr-Cyrl, sr, zh-Hant
for the new combined commenting-disabled key. Bumped version to 1.4.3 since
main already has 1.4.2.
@rob-ghost rob-ghost force-pushed the fix/commenting-disabled-translation-keys branch from f04ac6a to a1f2cab Compare April 7, 2026 09:08
@rob-ghost rob-ghost enabled auto-merge (squash) April 7, 2026 09:09
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

@rob-ghost rob-ghost merged commit 1dc488a into main Apr 7, 2026
41 checks passed
@rob-ghost rob-ghost deleted the fix/commenting-disabled-translation-keys branch April 7, 2026 09:44
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.

2 participants