Skip to content

chore(release): v1.23.0 — locale-aware theme content pages (restore per-locale marketing) - #340

Merged
WebTigers merged 2 commits into
mainfrom
fix/tiger-325-theme-locale-content
Oct 18, 2026
Merged

WebTigers merged 2 commits into
mainfrom
fix/tiger-325-theme-locale-content

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

Problem

A theme's content/<slug>.phtml pages were resolved by slug only, so the public marketing site rendered English in every locale. This is the regression from TIGER-230, which lifted the marketing pages out of core into the TigerMarketing theme. In core those pages were per-locale sibling view scripts (index/<slug>.<locale>.phtml, resolved by Tiger_View_Helper_LocaleView); the extraction carried only the base English files and left the theme-content render path locale-blind.

Fix

Tiger_Theme::contentFile($slug, $dir = null, $lang = null) — the theme sibling of localeView:

  • serves content/<slug>.<LANG>.phtml when the theme ships that translation, else the base content/<slug>.phtml;
  • requires the base English page (a lone locale file is an orphan);
  • same strict, dot-free slug guard as template() / ThemeContent (no traversal out of content/);
  • locale is injectable ($lang) for testing, defaulting to the request's LANG.

PageController::themeContentAction resolves through it, so a translated page and its hint title render fully in-locale. The dispatch gates (ThemeContent plugin, IndexController::indexAction, the theme-page forward) already require the base file, which always ships — so this only changes which file renders, never dispatchability.

Tests

tests/Unit/Theme/ThemeContentFileTest.php — 9 cases: locale-variant hit (incl. 3-letter tlh), base fallback, orphan-variant refusal, nested slug, traversal / bad-slug refusal, bogus-locale ignore, explicit dir override.

Companion

The recovered translated content files (56: es/fr/de/hi/pt × 11 pages + the Klingon home) ship in TigerMarketing v1.0.2. Together they restore the real multilingual marketing site — including the grammatical tlhIngan Hol / pIqaD home.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ

WebTigers and others added 2 commits October 18, 2026 06:09
…ting)

A theme's content/<slug>.phtml pages were resolved by slug only, so the whole
public site rendered English in every locale — the regression from TIGER-230,
which lifted the marketing pages (and their per-locale .<locale>.phtml siblings,
resolved by Tiger_View_Helper_LocaleView) out of core into the TigerMarketing
theme but left the theme-content path locale-blind.

Add Tiger_Theme::contentFile($slug, $dir, $lang) — the theme sibling of the
localeView helper: it serves content/<slug>.<LANG>.phtml when the theme ships
that translation, else the base content/<slug>.phtml. The base English page is
required (a lone locale file is an orphan), the same strict dot-free slug guard
as template()/ThemeContent prevents traversal, and the locale is injectable for
testing (defaults to the request's LANG).

PageController::themeContentAction resolves through it, so a translated page —
and its hint title — renders fully in-locale; the dispatch gates already require
the base file, which always ships. 9 unit cases (variant hit incl. tlh, base
fallback, orphan-variant, nested slug, traversal/bad-slug refusal, bogus locale,
explicit dir).

The matching translated content files ship in TigerMarketing (v1.0.2).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ
New @api Tiger_Theme::contentFile() — a backward-compatible addition — so this
is a minor bump. Ships the locale-aware theme content resolution that restores
the per-locale marketing pages (TIGER-325).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ
@WebTigers WebTigers changed the title TIGER-325: locale-aware theme content pages (restore per-locale marketing) chore(release): v1.23.0 — locale-aware theme content pages (restore per-locale marketing) Oct 18, 2026
@WebTigers
WebTigers merged commit 9538a41 into main Oct 18, 2026
14 checks passed
@WebTigers
WebTigers deleted the fix/tiger-325-theme-locale-content branch October 18, 2026 10:32
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