Changeset 834bcc3 in Klonkt for src/routes/epk.js


Ignore:
Timestamp:
06/23/2026 06:14:27 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
d774679
Parents:
bb42dfb
Message:

i18n: translate Dutch code comments to English across src/

Comments in routes/services/views/config/middleware/assets translated to
English for the public repo. A few dev-facing throw/console message strings
were Englished too. No user-facing UI strings or i18n dictionary values changed
(src/services/i18n.js untouched). Logic unchanged.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/epk.js

    rbb42dfb r834bcc3  
    11/**
    2  * EPK / perskit (premium) — een deelbare perspagina per Klonkt-site.
     2 * EPK / press kit (premium) — a shareable press page per Klonkt site.
    33 *
    4  * GET /pers  (solo) of /user/:slug/pers (hub, via resolveSite + siteUrlBase)
    5  *   -> nette, openbare perskit: hero (foto/titel/tagline), korte bio, topnummers,
    6  *      recente posts en een contact-knop. Bedoeld om naar boekers/pers te sturen.
     4 * GET /pers  (solo) or /user/:slug/pers (hub, via resolveSite + siteUrlBase)
     5 *   -> clean, public press kit: hero (photo/title/tagline), short bio, top tracks,
     6 *      recent posts and a contact button. Intended to share with bookers/press.
    77 *
    8  * Premium-gated: niet-premium instances hebben GEEN /pers (next() -> 404 via de
    9  * catch-all). De PAGINA zelf is openbaar (geen login) zodat pers 'm kan bekijken;
    10  * alleen het BESTAAN ervan is premium. Geen login-e-mail lekken: contact loopt via
    11  * een expliciet ingesteld pers-adres (epk_contact, per site) of anders de site zelf.
     8 * Premium-gated: non-premium instances have NO /pers (next() -> 404 via the
     9 * catch-all). The PAGE itself is public (no login) so press can view it;
     10 * only its EXISTENCE is premium. No login email leak: contact goes via an
     11 * explicitly configured press address (epk_contact, per site) or the site itself.
    1212 */
    1313
     
    2121
    2222router.get('/pers', (req, res, next) => {
    23   if (!premiumUnlocked()) return next();      // geen premium -> geen perskit
     23  if (!premiumUnlocked()) return next();      // no premium -> no press kit
    2424  const site = res.locals.site;
    2525  if (!site) return next();
    2626
    27   // Nummers op de perskit: een door de admin GEKOZEN selectie (max 5, in eigen
    28   // volgorde) als die is ingesteld; anders automatisch de top 5 meest beluisterde.
     27  // Tracks on the press kit: an admin-CHOSEN selection (max 5, in custom order)
     28  // if configured; otherwise automatically the top 5 most-listened.
    2929  let chosenIds = [];
    3030  try {
    3131    const raw = JSON.parse(getSetting('epk_tracks_' + site.id, '') || '[]');
    3232    if (Array.isArray(raw)) chosenIds = raw.filter((x) => typeof x === 'string').slice(0, 5);
    33   } catch (e) { /* ongeldige JSON → val terug op top */ }
     33  } catch (e) { /* invalid JSON → fall back to top */ }
    3434
    3535  let tracks;
     
    4141    ).all(site.id, ...chosenIds);
    4242    const byId = new Map(rows.map((r) => [r.id, r]));
    43     tracks = chosenIds.map((id) => byId.get(id)).filter(Boolean);  // behoud gekozen volgorde
     43    tracks = chosenIds.map((id) => byId.get(id)).filter(Boolean);  // preserve chosen order
    4444  } else {
    4545    tracks = db.prepare(
     
    6060  ).all(site.id);
    6161
    62   // Pers-contact: per-site instelling (epk_contact_<siteId>) als die er is, anders
    63   // de globale epk_contact. NOOIT automatisch de login-mail tonen.
     62  // Press contact: per-site setting (epk_contact_<siteId>) if present, otherwise
     63  // the global epk_contact. NEVER auto-expose the login email.
    6464  const contact = (getSetting('epk_contact_' + site.id, '') || getSetting('epk_contact', '') || '').trim();
    65   // Korte pers-bio: per-site instelling, anders de tagline van de site.
     65  // Short press bio: per-site setting, otherwise the site's tagline.
    6666  const bio = (getSetting('epk_bio_' + site.id, '') || site.tagline || '').trim();
    6767
Note: See TracChangeset for help on using the changeset viewer.