• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ThePalaceProject / web-patron / 31813085213
30%

Build:
DEFAULT BRANCH: main
Ran 14 Aug 2026 03:11PM UTC
Jobs 1
Files 23
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Aug 2026 03:09PM UTC coverage: 82.498% (+0.7%) from 81.781%
31813085213

push

github

web-flow
Feature flag gates language selection support (PP-4937) (#183)

Adds a PALACE_CPW_FEATURE_LANGUAGE_SELECTOR environment variable feature
flag (default off) that gates all patron-facing language support,
following the existing PALACE_CPW_FEATURE_OPDS2 pattern:

- Language selector: with the flag off, the selector in the catalog
header is not rendered at all, so it is absent from the accessibility
tree.
- Automatic locale detection: with the flag off, the NEXT_LOCALE cookie
and Accept-Language header are stripped from inbound requests before
Next.js sees them, so every patron is served the default (English)
locale. This is done dynamically at the HTTP layer in instrumentation.ts
because the standalone build bakes next.config.js values in at build
time, so i18n.localeDetection cannot follow a runtime environment
variable. A patron's saved locale cookie is ignored, not cleared, so
their choice resumes working when the flag is enabled.
- Locale-prefixed URLs: a new request proxy (src/proxy.ts, Next 16's
successor to the middleware convention) 307-redirects bookmarked /
hand-typed / etc. locale URLs (e.g. /es/...) to the same path in the
default locale.

With the flag on, behavior is exactly as delivered in PP-4708. The i18n
runtime, message catalogs, and tooling remain active in both flag
states. The flag is documented in the README and .env, its state is
logged at server startup, and the flag env var names moved to
src/constants/env.ts so the proxy can import them without pulling in the
Node-only config loader.

Motivation and Context

PP-4708 shipped the i18n framework, including a patron-facing language
switcher, but other elements of the localization epic is still in
progress, so the non-English catalogs are stubs that fall back to
English. A patron who selects one of those languages might be confused
by the lack of translation. This flag can hide the switcher and prevents
any locale other than English from activating, so the framework can keep
shippin... (continued)

313 of 410 branches covered (76.34%)

Branch coverage included in aggregate %.

24 of 24 new or added lines in 3 files covered. (100.0%)

526 of 607 relevant lines covered (86.66%)

30.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31813085213.1 14 Aug 2026 03:11PM UTC 23
82.5
GitHub Action Run
Source Files on build 31813085213
  • Tree
  • List 23
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 672891e9 on github
  • Prev Build on main (#31743336326)
  • Next Build on main (#32297395938)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc