Changeset 3487567 in Klonkt for src/routes/admin-shows.js


Ignore:
Timestamp:
06/28/2026 10:13:27 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
48027f2
Parents:
abc8959
Message:

fix(i18n): translate admin page titles (pageTitleKey instead of hardcoded strings)

Admin page/tab titles were hardcoded (mostly Dutch: Beheer, Instellingen, Nieuwsbrief, …).
renderPage now accepts pageTitleKey (+ pageTitleVars) and translates it with the resolved
language; the 16 admin routes pass keys. Adds admin.t_* keys in nl/en/de.

  • middleware/render.js — pageTitleKey support
  • services/i18n.js — admin.t_* title keys (nl/en/de)
  • routes/admin*.js — pageTitle string -> pageTitleKey
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/admin-shows.js

    rabc8959 r3487567  
    3535  const shows = db.prepare('SELECT * FROM shows WHERE site_id = ? ORDER BY date DESC, time DESC').all(site.id);
    3636  renderPage(req, res, 'pages/admin-shows', {
    37     pageTitle: 'Agenda', bodyClass: 'on-admin',
     37    pageTitleKey: 'admin.t_shows', bodyClass: 'on-admin',
    3838    shows, smtp: mailerConfigured(), notifyCount: confirmedFor(site.id, 'notify').length,
    3939    agendaEnabled: getSetting('agenda_enabled') === '1',
Note: See TracChangeset for help on using the changeset viewer.