Skip to content

Added translation for donation Stripe Checkout product title#28246

Merged
9larsons merged 4 commits into
TryGhost:mainfrom
lujuldotcom:fix/donations-stripe-title
Jun 1, 2026
Merged

Added translation for donation Stripe Checkout product title#28246
9larsons merged 4 commits into
TryGhost:mainfrom
lujuldotcom:fix/donations-stripe-title

Conversation

@lujuldotcom
Copy link
Copy Markdown
Contributor

Closes #28226

Localized the Stripe product title used for tips and donations. For example, French sites now show:
Soutenir [SITE TITLE]

instead of:
Support [SITE TITLE]

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Review Change Stack

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: 8361cfbf-c227-4d42-af98-55ca699cd0c2

📥 Commits

Reviewing files that changed from the base of the PR and between 0f4e133 and 7a095c6.

📒 Files selected for processing (65)
  • ghost/core/core/server/services/members/members-api/services/payments-service.js
  • ghost/core/test/unit/server/services/members/members-api/services/payments-service.test.js
  • ghost/i18n/locales/af/ghost.json
  • ghost/i18n/locales/ar/ghost.json
  • ghost/i18n/locales/bg/ghost.json
  • ghost/i18n/locales/bn/ghost.json
  • ghost/i18n/locales/bs/ghost.json
  • ghost/i18n/locales/ca/ghost.json
  • ghost/i18n/locales/context.json
  • ghost/i18n/locales/cs/ghost.json
  • ghost/i18n/locales/da/ghost.json
  • ghost/i18n/locales/de-CH/ghost.json
  • ghost/i18n/locales/de/ghost.json
  • ghost/i18n/locales/el/ghost.json
  • ghost/i18n/locales/en/ghost.json
  • ghost/i18n/locales/eo/ghost.json
  • ghost/i18n/locales/es/ghost.json
  • ghost/i18n/locales/et/ghost.json
  • ghost/i18n/locales/eu/ghost.json
  • ghost/i18n/locales/fa/ghost.json
  • ghost/i18n/locales/fi/ghost.json
  • ghost/i18n/locales/fr/ghost.json
  • ghost/i18n/locales/gd/ghost.json
  • ghost/i18n/locales/he/ghost.json
  • ghost/i18n/locales/hi/ghost.json
  • ghost/i18n/locales/hr/ghost.json
  • ghost/i18n/locales/hu/ghost.json
  • ghost/i18n/locales/id/ghost.json
  • ghost/i18n/locales/is/ghost.json
  • ghost/i18n/locales/it/ghost.json
  • ghost/i18n/locales/ja/ghost.json
  • ghost/i18n/locales/ko/ghost.json
  • ghost/i18n/locales/kz/ghost.json
  • ghost/i18n/locales/lt/ghost.json
  • ghost/i18n/locales/lv/ghost.json
  • ghost/i18n/locales/mk/ghost.json
  • ghost/i18n/locales/mn/ghost.json
  • ghost/i18n/locales/ms/ghost.json
  • ghost/i18n/locales/nb/ghost.json
  • ghost/i18n/locales/ne/ghost.json
  • ghost/i18n/locales/nl/ghost.json
  • ghost/i18n/locales/nn/ghost.json
  • ghost/i18n/locales/pa/ghost.json
  • ghost/i18n/locales/pl/ghost.json
  • ghost/i18n/locales/pt-BR/ghost.json
  • ghost/i18n/locales/pt/ghost.json
  • ghost/i18n/locales/ro/ghost.json
  • ghost/i18n/locales/ru/ghost.json
  • ghost/i18n/locales/si/ghost.json
  • ghost/i18n/locales/sk/ghost.json
  • ghost/i18n/locales/sl/ghost.json
  • ghost/i18n/locales/sq/ghost.json
  • ghost/i18n/locales/sr-Cyrl/ghost.json
  • ghost/i18n/locales/sr/ghost.json
  • ghost/i18n/locales/sv/ghost.json
  • ghost/i18n/locales/sw/ghost.json
  • ghost/i18n/locales/ta/ghost.json
  • ghost/i18n/locales/th/ghost.json
  • ghost/i18n/locales/tr/ghost.json
  • ghost/i18n/locales/uk/ghost.json
  • ghost/i18n/locales/ur/ghost.json
  • ghost/i18n/locales/uz/ghost.json
  • ghost/i18n/locales/vi/ghost.json
  • ghost/i18n/locales/zh-Hant/ghost.json
  • ghost/i18n/locales/zh/ghost.json
✅ Files skipped from review due to trivial changes (26)
  • ghost/i18n/locales/sv/ghost.json
  • ghost/i18n/locales/th/ghost.json
  • ghost/i18n/locales/it/ghost.json
  • ghost/i18n/locales/ar/ghost.json
  • ghost/i18n/locales/sl/ghost.json
  • ghost/i18n/locales/hi/ghost.json
  • ghost/i18n/locales/eu/ghost.json
  • ghost/i18n/locales/id/ghost.json
  • ghost/i18n/locales/ur/ghost.json
  • ghost/i18n/locales/bs/ghost.json
  • ghost/i18n/locales/pl/ghost.json
  • ghost/i18n/locales/zh-Hant/ghost.json
  • ghost/i18n/locales/af/ghost.json
  • ghost/i18n/locales/mk/ghost.json
  • ghost/i18n/locales/fa/ghost.json
  • ghost/i18n/locales/en/ghost.json
  • ghost/i18n/locales/tr/ghost.json
  • ghost/i18n/locales/nl/ghost.json
  • ghost/i18n/locales/et/ghost.json
  • ghost/i18n/locales/nn/ghost.json
  • ghost/i18n/locales/vi/ghost.json
  • ghost/i18n/locales/cs/ghost.json
  • ghost/i18n/locales/lt/ghost.json
  • ghost/i18n/locales/fi/ghost.json
  • ghost/i18n/locales/sr-Cyrl/ghost.json
  • ghost/i18n/locales/kz/ghost.json
🚧 Files skipped from review as they are similar to previous changes (19)
  • ghost/i18n/locales/ta/ghost.json
  • ghost/i18n/locales/bn/ghost.json
  • ghost/i18n/locales/sr/ghost.json
  • ghost/i18n/locales/hr/ghost.json
  • ghost/i18n/locales/hu/ghost.json
  • ghost/i18n/locales/ms/ghost.json
  • ghost/i18n/locales/nb/ghost.json
  • ghost/i18n/locales/pt/ghost.json
  • ghost/i18n/locales/de/ghost.json
  • ghost/i18n/locales/sk/ghost.json
  • ghost/i18n/locales/uk/ghost.json
  • ghost/i18n/locales/da/ghost.json
  • ghost/i18n/locales/eo/ghost.json
  • ghost/i18n/locales/es/ghost.json
  • ghost/i18n/locales/sq/ghost.json
  • ghost/i18n/locales/ko/ghost.json
  • ghost/i18n/locales/ca/ghost.json
  • ghost/i18n/locales/he/ghost.json
  • ghost/core/core/server/services/members/members-api/services/payments-service.js

Walkthrough

PaymentsService now imports the i18n helper and builds the donation Stripe nickname with t('Support {siteTitle}', {siteTitle: this.settingsCache.get('title'), interpolation: {escapeValue: false}}) and truncates to 250 chars. Tests initialize and re-require i18n to verify localization, no HTML-escaping of site title, and truncation. The i18n dataset and context received a new "Support {siteTitle}" key across locale files (French: "Soutenir {siteTitle}", others added with empty values).

Suggested reviewers

  • mike182uk
  • sagzy
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding translations for the donation Stripe Checkout product title to support multiple locales.
Description check ✅ Passed The description is directly related to the changeset, explaining the localization of the Stripe Checkout product title with a concrete example (French).
Linked Issues check ✅ Passed The PR fully addresses issue #28226 by implementing i18n support for the donation price nickname, replacing hardcoded English strings with localized alternatives across all supported locales.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing i18n support for donations: updating the payments service to use translations, adding translation keys across locales, and adding comprehensive test coverage.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

🌐 Automated translation review

Verdict: ⏭️ Skipped — PR is too large for automated review

Reviewed 0 translations across 61 files.

This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.


Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.

ref TryGhost#28226

- translating "Support" alone and concatenating the title stops translators reordering words around the site name; the whole phrase now lives in one key ("Support {siteTitle}")
- disabled HTML escaping on the interpolated title to match other siteTitle usages, so ampersands etc. stay intact in the Stripe nickname
- added unit coverage for getDonationPriceNickname (English, French, no-escape, truncation)
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

🌐 Automated translation review

Verdict: ⏭️ Skipped — PR is too large for automated review

Reviewed 0 translations across 61 files.

This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.


Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

🌐 Automated translation review

Verdict: ⏭️ Skipped — PR is too large for automated review

Reviewed 0 translations across 61 files.

This PR touches 61 translation files, which is beyond the automated reviewer's per-PR limit (max 15 files / 500 lines). A maintainer should review the translations manually.


Advisory review by i18n-review-bot. Non-blocking — a maintainer still owns the merge decision, and the bot cannot approve PRs on its own. Translator expertise wins where there is doubt.

@9larsons
Copy link
Copy Markdown
Contributor

9larsons commented Jun 1, 2026

@lujuldotcom Thanks for the contribution! I made an adjustment to allow for reversing of the token placement, added some test coverage, and rebased to avoid some of the i18n conflicts that were a result of other contributions to main.

@9larsons 9larsons enabled auto-merge (squash) June 1, 2026 00:40
@9larsons 9larsons disabled auto-merge June 1, 2026 00:40
@9larsons 9larsons enabled auto-merge (squash) June 1, 2026 00:40
@9larsons 9larsons merged commit 98774e4 into TryGhost:main Jun 1, 2026
49 checks passed
@lujuldotcom lujuldotcom deleted the fix/donations-stripe-title branch June 1, 2026 11:07
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.

Stripe checkout title for donations is hardcoded and not translatable

2 participants