Skip to content

Added Turkish translation for gift subscription#28904

Open
selin-blip wants to merge 1 commit into
TryGhost:mainfrom
selin-blip:main
Open

Added Turkish translation for gift subscription#28904
selin-blip wants to merge 1 commit into
TryGhost:mainfrom
selin-blip:main

Conversation

@selin-blip

Copy link
Copy Markdown

I have added a Turkish translation for Ghost's new gift subscription feature.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Updated Turkish locale strings in ghost/i18n/locales/tr/ghost.json and ghost/i18n/locales/tr/portal.json. The changes fill in two previously empty translations, revise two subscription-related strings, and update the wording of two membership-sharing strings.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding Turkish translations for the gift subscription feature.
Description check ✅ Passed The description is clearly related to the changes and matches the translated gift subscription updates.
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.

✏️ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ghost/i18n/locales/tr/portal.json`:
- Line 200: The translation for the key in portal.json drops the required
{siteTitle} placeholder, breaking the message contract used at runtime. Update
the localized string in the Turkish locale entry for this message so it
preserves the same {siteTitle} interpolation as the source text, and verify the
placeholder remains unchanged in the translation.
🪄 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: cbed1377-e0bf-43ff-afdd-405e39b1d9b1

📥 Commits

Reviewing files that changed from the base of the PR and between 78c060f and 46a91a6.

📒 Files selected for processing (2)
  • ghost/i18n/locales/tr/ghost.json
  • ghost/i18n/locales/tr/portal.json

"Sending...": "Gönderiliyor...",
"Share": "Paylaş",
"Share a full membership to {siteTitle} with a friend or colleague": "Bir arkadaşınız veya iş arkadaşınızla {siteTitle} tam üyeliğini paylaşın.",
"Share a full membership to {siteTitle} with a friend or colleague": "Yakınlarınız için en havalı hediye, hem de mağaza gezme derdi olmadan.",

@coderabbitai coderabbitai Bot Jun 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve {siteTitle} interpolation in this translation.

Line 200 drops {siteTitle}, but this key is rendered with {siteTitle} at runtime, so the localized string no longer matches the source message contract.

Suggested fix
-    "Share a full membership to {siteTitle} with a friend or colleague": "Yakınlarınız için en havalı hediye, hem de mağaza gezme derdi olmadan.",
+    "Share a full membership to {siteTitle} with a friend or colleague": "{siteTitle} için tam üyeliği bir arkadaşınızla veya iş arkadaşınızla paylaşın.",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"Share a full membership to {siteTitle} with a friend or colleague": "Yakınlarınız için en havalı hediye, hem de mağaza gezme derdi olmadan.",
"Share a full membership to {siteTitle} with a friend or colleague": "{siteTitle} için tam üyeliği bir arkadaşınızla veya iş arkadaşınızla paylaşın.",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ghost/i18n/locales/tr/portal.json` at line 200, The translation for the key
in portal.json drops the required {siteTitle} placeholder, breaking the message
contract used at runtime. Update the localized string in the Turkish locale
entry for this message so it preserves the same {siteTitle} interpolation as the
source text, and verify the placeholder remains unchanged in the translation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@selin-blip Why don't we need {siteTitle} here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

key='Share a full membership to {siteTitle} with a friend or colleague'

echo "== Find exact key usage =="
rg -n -F "$key" .

echo
echo "== Outline likely portal i18n/usage files =="
fd -a 'gift|portal|i18n|translation|locale' apps ghost --max-depth 6 2>/dev/null | sed -n '1,200p'

echo
echo "== Search for siteTitle interpolation near gift/share UI =="
rg -n -C3 --glob '!ghost/i18n/locales/**' 'siteTitle|Gift a membership|friend or colleague|gift' apps ghost

Length of output: 243478


🏁 Script executed:

#!/bin/bash
set -euo pipefail

key='Share a full membership to {siteTitle} with a friend or colleague'

echo "== Exact matches for the key across the repo =="
rg -n -C2 -F "$key" .

echo
echo "== Narrow search for the gift purchase success/share UI in portal source =="
rg -n -C3 --glob '!ghost/i18n/locales/**' --glob '!**/test/**' \
  'Share a full membership|Send the link below to share it|siteTitle|gift-purchase-success|gift_token' \
  apps ghost

Length of output: 255827



@9larsons We do need {siteTitle} here.

I checked the runtime usage:

  • apps/portal/src/components/pages/gift-page.js Line 847 calls
    t('Share a full membership to {siteTitle} with a friend or colleague', {siteTitle})
  • ghost/i18n/locales/context.json Line 278 also documents this key and says {siteTitle} is the publication name.

So once Turkish provides a non-empty translation for that key, it should preserve the same placeholder contract. Dropping {siteTitle} won’t crash, but it does discard runtime data that the source string expects to show.

In other words:

  • empty translation → falls back to English, fine
  • translated value without {siteTitle} → loses the publication name, so the review comment still applies

🐇💭


🧠 Learnings used
Learnt from: cathysarisky
Repo: TryGhost/Ghost PR: 27188
File: ghost/i18n/locales/ar/portal.json:15-15
Timestamp: 2026-04-06T20:50:45.744Z
Learning: In TryGhost/Ghost, follow the i18n workflow for locale files: when introducing new i18n keys, allow a first PR to ship the feature while adding the new keys with empty/blank string values in the locale JSON files (e.g., under ghost/i18n/locales/...). In code review, do not flag empty string values in these locale JSON files as missing translations; expect the actual translated text to be provided in a subsequent follow-up PR.

Learnt from: sagzy
Repo: TryGhost/Ghost PR: 27840
File: ghost/core/core/server/services/gifts/gift-email-service.ts:75-80
Timestamp: 2026-05-13T11:28:15.780Z
Learning: In the TryGhost/Ghost monorepo’s `ghost/i18n` code/locales (using i18next v23.x), do not raise code review findings for “missing pluralization configuration.” i18next v23 automatically handles pluralization via the Intl API, so you should not expect/require an explicit `pluralSeparator` or manual pluralization rules. Locale JSON plural keys should use the `_one`/`_other` suffix convention (e.g., `"{count} year_one"` / `"{count} year_other"`), and calls like `t("{count} year", { count: n })` should be considered correct and should resolve plural forms.

"Sending...": "Gönderiliyor...",
"Share": "Paylaş",
"Share a full membership to {siteTitle} with a friend or colleague": "Bir arkadaşınız veya iş arkadaşınızla {siteTitle} tam üyeliğini paylaşın.",
"Share a full membership to {siteTitle} with a friend or colleague": "Yakınlarınız için en havalı hediye, hem de mağaza gezme derdi olmadan.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@selin-blip Why don't we need {siteTitle} here?

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