Skip to content

Removed themeTranslation labs flag - #30018

Closed
9larsons wants to merge 2 commits into
mainfrom
slars/remove-theme-translations-flag-c85007
Closed

9larsons wants to merge 2 commits into
mainfrom
slars/remove-theme-translations-flag-c85007

Conversation

@9larsons

Copy link
Copy Markdown
Contributor

no ref

The themeTranslation private labs flag gated the i18next-based theme translation service. It has been on for long enough to be considered GA, so this removes the flag and makes i18next the only implementation.

Changes

  • Removed themeTranslation from PRIVATE_FEATURES in labs and from the Admin private-features list
  • core/frontend/services/theme-engine/i18next/ moved to i18n/, replacing the legacy intl-messageformat-based service (I18n + ThemeI18n classes)
  • {{t}} helper and ActiveTheme.initI18n no longer branch on the flag
  • Removed the settings.labs.edited listener in bridge.js that only existed to re-init translations when the flag flipped
  • Dropped intl-messageformat dependency from ghost/core
  • Tests: dropped the legacy I18n/ThemeI18n unit tests, renamed t-new.test.js → t.test.js and i18next.test.js → theme-i18n.test.js, collapsed the dual-implementation matrices in content, pagination, and private-blogging controller tests, simplified i18n-test-utils, and reduced the e2e theme-i18n test to a single service

Verification

  • ghost/core unit: theme-engine, helpers/t, content, pagination, private-blogging controller, shared/labs — all pass
  • ghost/core e2e: test/e2e-frontend/** (20 files, 269 tests), e2e-api/admin/settings, e2e-api/admin/config — all pass
  • eslint + depcruise on touched files pass

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: QUIET

Plan: Pro Plus

Run ID: 4a52ae53-7dca-4916-b870-0e6ef25ad971

📥 Commits

Reviewing files that changed from the base of the PR and between 9a22123 and 35af686.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • apps/admin/src/settings/advanced/labs/private-features.tsx
  • ghost/core/core/bridge.js
  • ghost/core/core/frontend/helpers/t.js
  • ghost/core/core/frontend/services/handlebars.js
  • ghost/core/core/frontend/services/theme-engine/active.js
  • ghost/core/core/frontend/services/theme-engine/i18n/i18n.js
  • ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js
  • ghost/core/core/frontend/services/theme-engine/i18next/index.js
  • ghost/core/core/frontend/services/theme-engine/i18next/theme-i18n.js
  • ghost/core/core/shared/labs.js
  • ghost/core/package.json
  • ghost/core/test/e2e-frontend/theme-i18n.test.js
  • ghost/core/test/unit/frontend/apps/private-blogging/controller.test.js
  • ghost/core/test/unit/frontend/helpers/content.test.js
  • ghost/core/test/unit/frontend/helpers/pagination.test.js
  • ghost/core/test/unit/frontend/helpers/t-new.test.js
  • ghost/core/test/unit/frontend/helpers/t.test.js
  • ghost/core/test/unit/frontend/services/theme-engine/i18n.test.js
  • ghost/core/test/unit/frontend/services/theme-engine/i18next.test.js
  • ghost/core/test/unit/frontend/services/theme-engine/theme-i18n.test.js
  • ghost/core/test/utils/i18n-test-utils.js
💤 Files with no reviewable changes (11)
  • apps/admin/src/settings/advanced/labs/private-features.tsx
  • ghost/core/package.json
  • ghost/core/core/frontend/services/theme-engine/i18next/index.js
  • ghost/core/test/unit/frontend/services/theme-engine/i18next.test.js
  • ghost/core/core/frontend/services/handlebars.js
  • ghost/core/test/unit/frontend/services/theme-engine/i18n.test.js
  • ghost/core/core/shared/labs.js
  • ghost/core/core/frontend/services/theme-engine/i18n/i18n.js
  • ghost/core/test/unit/frontend/helpers/t-new.test.js
  • ghost/core/core/bridge.js
  • ghost/core/core/frontend/services/theme-engine/i18next/theme-i18n.js

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (20)
  • GitHub Check: App Playwright Acceptance Tests (@tryghost/activitypub)
  • GitHub Check: App Playwright Acceptance Tests (@tryghost/admin)
  • GitHub Check: App Playwright Acceptance Tests (@tryghost/comments-ui)
  • GitHub Check: App Playwright Acceptance Tests (@tryghost/signup-form)
  • GitHub Check: App Playwright Acceptance Tests (@tryghost/koenig-lexical)
  • GitHub Check: Stripe fixture checks
  • GitHub Check: Legacy tests (Node 22.23.1, mysql8)
  • GitHub Check: Build Docker Images
  • GitHub Check: Build Admin
  • GitHub Check: Build E2E Public App Assets
  • GitHub Check: App Playwright Acceptance Tests (@tryghost/kg-unsplash-selector)
  • GitHub Check: Legacy tests (Node 22.23.1, better-sqlite3)
  • GitHub Check: i18n
  • GitHub Check: Acceptance tests (Node 22.23.1, better-sqlite3)
  • GitHub Check: Admin tests - Chrome
  • GitHub Check: Acceptance tests (Node 22.23.1, mysql8)
  • GitHub Check: Check app version bump
  • GitHub Check: Unit tests (Node 22.23.1)
  • GitHub Check: Lint
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,jsx,cjs,mjs}

📄 CodeRabbit inference engine (Custom checks)

**/*.{js,jsx,cjs,mjs}: New files are TypeScript: Fail if the PR adds a new .js/.jsx/.cjs/.mjs source file, unless it is: a DB
migration (ghost/core/core/server/data/migrations/), under apps/ember-admin/,
a tool/config file, under scripts/ or docker/, or generated/vendored code.
Modifying pre-existing JS files never fails this check.

Files:

  • ghost/core/test/unit/frontend/helpers/t.test.js
  • ghost/core/test/unit/frontend/services/theme-engine/theme-i18n.test.js
  • ghost/core/core/frontend/services/theme-engine/active.js
  • ghost/core/test/unit/frontend/apps/private-blogging/controller.test.js
  • ghost/core/test/unit/frontend/helpers/pagination.test.js
  • ghost/core/test/e2e-frontend/theme-i18n.test.js
  • ghost/core/core/frontend/helpers/t.js
  • ghost/core/test/unit/frontend/helpers/content.test.js
  • ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js
  • ghost/core/test/utils/i18n-test-utils.js

⚙️ CodeRabbit configuration file

**/*.{js,jsx,cjs,mjs}: New source files must be TypeScript: flag new JS files as a required change
unless exempt (DB migrations, apps/ember-admin/, tool/config files, scripts/,
docker/, generated code).
Never request conversion of pre-existing JS files. If the PR substantially
reworks one (rewritten logic or significant new functions — not renames or
small fixes), you may leave ONE optional, non-blocking note for the whole PR
that those files are cheap TS-conversion candidates; skip minor changes and
exempt areas.
If the PR adds or changes a runtime boundary (parsing HTTP input, JSON, config,
external responses), suggest validating it — ideally with TS + Zod.

Files:

  • ghost/core/test/unit/frontend/helpers/t.test.js
  • ghost/core/test/unit/frontend/services/theme-engine/theme-i18n.test.js
  • ghost/core/core/frontend/services/theme-engine/active.js
  • ghost/core/test/unit/frontend/apps/private-blogging/controller.test.js
  • ghost/core/test/unit/frontend/helpers/pagination.test.js
  • ghost/core/test/e2e-frontend/theme-i18n.test.js
  • ghost/core/core/frontend/helpers/t.js
  • ghost/core/test/unit/frontend/helpers/content.test.js
  • ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js
  • ghost/core/test/utils/i18n-test-utils.js
**/*

📄 CodeRabbit inference engine (AGENTS.md)

Always use pnpm, never npm or Yarn.

Files:

  • ghost/core/test/unit/frontend/helpers/t.test.js
  • ghost/core/test/unit/frontend/services/theme-engine/theme-i18n.test.js
  • ghost/core/core/frontend/services/theme-engine/active.js
  • ghost/core/test/unit/frontend/apps/private-blogging/controller.test.js
  • ghost/core/test/unit/frontend/helpers/pagination.test.js
  • ghost/core/test/e2e-frontend/theme-i18n.test.js
  • ghost/core/core/frontend/helpers/t.js
  • ghost/core/test/unit/frontend/helpers/content.test.js
  • ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js
  • ghost/core/test/utils/i18n-test-utils.js

⚙️ CodeRabbit configuration file

**/*: Prioritise concrete correctness, security, data-integrity, compatibility,
and regression risks. Explain the failure mode and point to the affected
code. Do not report formatting, naming, import ordering, type errors, or
other findings already owned by configured static tools or failing GitHub
checks. Do not request speculative abstractions, broad refactors, generic
documentation, or tests unrelated to changed behaviour. Treat nearby
AGENTS.md files and mapped codebase documentation as authoritative; do not
enforce proposals, plans, or historical guidance as current policy.

Files:

  • ghost/core/test/unit/frontend/helpers/t.test.js
  • ghost/core/test/unit/frontend/services/theme-engine/theme-i18n.test.js
  • ghost/core/core/frontend/services/theme-engine/active.js
  • ghost/core/test/unit/frontend/apps/private-blogging/controller.test.js
  • ghost/core/test/unit/frontend/helpers/pagination.test.js
  • ghost/core/test/e2e-frontend/theme-i18n.test.js
  • ghost/core/core/frontend/helpers/t.js
  • ghost/core/test/unit/frontend/helpers/content.test.js
  • ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js
  • ghost/core/test/utils/i18n-test-utils.js
**/*{.,-}{test,spec}.{js,jsx,ts,tsx}

⚙️ CodeRabbit configuration file

**/*{.,-}{test,spec}.{js,jsx,ts,tsx}: Review whether tests prove changed behaviour, meaningful error/edge paths, and
externally observable contracts without coupling to implementation details.
Prefer the lowest useful test layer. Do not demand broad E2E coverage for
isolated logic or repeat test-run failures already visible in GitHub checks.

Files:

  • ghost/core/test/unit/frontend/helpers/t.test.js
  • ghost/core/test/unit/frontend/services/theme-engine/theme-i18n.test.js
  • ghost/core/test/unit/frontend/apps/private-blogging/controller.test.js
  • ghost/core/test/unit/frontend/helpers/pagination.test.js
  • ghost/core/test/e2e-frontend/theme-i18n.test.js
  • ghost/core/test/unit/frontend/helpers/content.test.js
🔇 Additional comments (10)
ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js (1)

2-30: LGTM!

Also applies to: 41-85, 94-101

ghost/core/core/frontend/helpers/t.js (1)

31-38: LGTM!

ghost/core/core/frontend/services/theme-engine/active.js (1)

111-111: LGTM!

ghost/core/test/unit/frontend/services/theme-engine/theme-i18n.test.js (1)

2-60: LGTM!

ghost/core/test/utils/i18n-test-utils.js (1)

7-45: LGTM!

ghost/core/test/unit/frontend/helpers/t.test.js (1)

17-20: LGTM!

ghost/core/test/e2e-frontend/theme-i18n.test.js (1)

3-22: LGTM!

Also applies to: 56-59, 69-73

ghost/core/test/unit/frontend/apps/private-blogging/controller.test.js (1)

149-419: LGTM!

ghost/core/test/unit/frontend/helpers/content.test.js (1)

79-201: LGTM!

ghost/core/test/unit/frontend/helpers/pagination.test.js (1)

47-133: LGTM!


Walkthrough

The change removes the beta theme-translation flag and legacy themeI18next path. ThemeI18n now directly uses @tryghost/i18n, loads locale resources, and handles fallbacks. Frontend helpers and initialization use themeI18n without feature-flag branching. Related exports, tests, utilities, and the unused intl-messageformat dependency were removed or updated.

Suggested reviewers: evanhahn

Merge Risk: ⚪ Minimal · up to 35af6

The PR removes the retired theme translation flag and consolidates behavior on the existing translation service; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Type-Safe Boundaries ⚠️ Warning The PR makes ThemeI18n unconditional; it checks only locale-file existence, then @tryghost/i18n require()s filesystem JSON without schema validation. Validate each locale resource with a Zod schema before passing it to i18n, and use the documented fallback for invalid resources.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the removal of the themeTranslation labs flag, which is the primary change.
Description check ✅ Passed The description accurately explains the flag removal, the service consolidation, dependency changes, and test 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.
New Files Are Typescript ✅ Passed The PR diff contains only modifications and deletions; it adds no .js/.jsx/.cjs/.mjs files.
✨ 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 slars/remove-theme-translations-flag-c85007

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.

9larsons added a commit that referenced this pull request Aug 19, 2026
no ref

The settings shell and the shared `components/`, `hooks/`, `utils/`,
`data/`, `assets/` and `providers/` now live directly under `settings/`,
leaving only `advanced/` in `settings/app/` until the PRs touching it
land (#30018, #30019, #29916, #30054, #30099, #30110, #28368). Big diff,
but ~300 of the 325 files are import-line rewrites; the substantive
changes are the lint-debt fixes the move surfaces:

- shell files grouped in `settings/layout/`: `app.tsx` (provider tree),
`main-content.tsx`, `sidebar.tsx`, `settings-sections.tsx` (was
`components/settings.tsx`); root `settings.tsx` route entry unchanged
- contexts split the way admin's other contexts are — hooks + context in
`*-context.ts`, provider component in its own file — for global data,
settings app, confirmations, scroll sections; `withErrorBoundary` →
`with-error-boundary.tsx`
- `loadKoenig` → `components/koenig-loader.ts`; the untyped
`@tryghost/koenig-lexical` bundle gets a minimal `KoenigLexicalModule`
type instead of `any`
- `@tryghost/limit-service` and `@tryghost/nql` get typed ambient
declarations in `vite-env.d.ts` (clears ~25 `no-unsafe-*` in
`use-limiter`)
- `iframe-buffering` reuses `utils/debounce`; `TopLevelGroup.saveState`
uses the framework's `SaveState`; the usual `void`-wrapping of async
handlers
no ref

Theme translations via i18next have been the default behind the
`themeTranslation` private flag for long enough that the flag is no longer
useful. This makes the i18next-based theme i18n service the only
implementation, drops the legacy intl-messageformat service and its
`intl-messageformat` dependency, removes the labs listener in the bridge that
only existed to swap services on flag change, and collapses the dual-
implementation test matrices to a single run.
@9larsons
9larsons force-pushed the slars/remove-theme-translations-flag-c85007 branch from 7244437 to 35af686 Compare August 21, 2026 15:55
@nx-cloud

nx-cloud Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 35af686

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 53s View ↗
nx run @tryghost/admin:test:acceptance ✅ Succeeded 8m 13s View ↗
nx run-many -t test:unit -p @tryghost/admin,gho... ✅ Succeeded 28s View ↗
nx run ghost:test:integration ✅ Succeeded 3m 20s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 59s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 31s View ↗
nx run ghost-admin:test ✅ Succeeded 3m 1s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 14s View ↗
Additional runs (9) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-21 16:07:07 UTC

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.66667% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.15%. Comparing base (3695343) to head (35af686).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../frontend/services/theme-engine/i18n/theme-i18n.js 78.37% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #30018      +/-   ##
==========================================
- Coverage   75.20%   75.15%   -0.05%     
==========================================
  Files        1638     1635       -3     
  Lines      154716   154313     -403     
  Branches    18596    18541      -55     
==========================================
- Hits       116355   115976     -379     
- Misses      37355    37358       +3     
+ Partials     1006      979      -27     
Flag Coverage Δ
admin-tests 56.71% <ø> (ø)
e2e-tests 76.88% <78.66%> (-0.05%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

@9larsons 9larsons closed this Sep 2, 2026
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.

1 participant