Changeset 834bcc3 in Klonkt for src/routes/admin.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/admin.js

    rbb42dfb r834bcc3  
    1414const router = express.Router();
    1515
    16 // Recente posts van één site, CONCEPTEN BOVENAAN, met mode-bewuste edit/view-URLs.
    17 // Lost op dat drafts (status != published) nergens terug te vinden waren: de
    18 // tijdlijn toont alleen gepubliceerde posts.
     16// Recent posts from one site, DRAFTS ON TOP, with mode-aware edit/view URLs.
     17// Solves the problem that drafts (status != published) were not findable anywhere:
     18// the timeline shows only published posts.
    1919function sitePosts(siteId, siteSlug, tenancy, limit = 60) {
    2020  const base = tenancy === 'hub' ? `/user/${siteSlug}` : '';
     
    3535  const user = req.session.user;
    3636
    37   // Een kijker mag het volledige (god-)Beheer alleen-lezen inzien — net als god
    38   // dus, alleen schrijven is globaal geblokkeerd. Een gewone artiest die een
    39   // eigen site bezit krijgt een "Mijn Klonkt Hub"-dashboard, gescopet op z'n
    40   // eigen site. Bezit 'ie geen site -> geen beheer.
     37  // A kijker may view the full (god) admin panel read-only — same as god,
     38  // but writing is globally blocked. A regular artist who owns a site gets
     39  // a "My Klonkt Hub" dashboard, scoped to their own site. No site -> no admin.
    4140  if (user.role !== 'god' && user.role !== 'kijker') {
    4241    const mySite = db.prepare(
     
    6059  const tenancy = getTenancy();
    6160
    62   // De primaire/hoofd-site — in solo dé site, in hub de hoofdsite. Geeft de
    63   // "Uiterlijk"-tegel z'n edit-link + de posts/concepten-lijst.
     61  // The primary/main site — in solo THE site, in hub the main site. Provides the
     62  // "Appearance" tile with its edit link + the posts/drafts list.
    6463  const primarySite = getPrimarySite();
    6564
     
    7372  };
    7473
    75   // Sites/users-tabellen zijn alleen in hub relevant; in solo besparen we de query.
     74  // Sites/users tables are only relevant in hub mode; in solo we skip the query.
    7675  const sites = tenancy === 'hub' ? db.prepare(`
    7776    SELECT s.slug, s.title, s.created_at, u.username AS owner_username
     
    8988  `).all() : [];
    9089
    91   // Posts/concepten van de primaire site (in solo = de site; in hub = de
    92   // hoofdsite van de admin). Concepten staan bovenaan zodat ze vindbaar zijn.
     90  // Posts/drafts of the primary site (in solo = the site; in hub = the admin's
     91  // main site). Drafts are listed first so they are easy to find.
    9392  const posts = primarySite ? sitePosts(primarySite.id, primarySite.slug, tenancy) : [];
    9493
     
    105104});
    106105
    107 // Handleiding — doorzoekbare uitleg van alle Beheer-functies. Zichtbaar voor wie
    108 // het Beheer mag zien (ingelogd); puur statische hulptekst, niets gevoeligs.
     106// Handleiding — searchable explanation of all admin features. Visible to anyone
     107// who may view the admin panel (logged in); purely static help text, nothing sensitive.
    109108router.get('/handleiding', requireAuth, (req, res) => {
    110109  renderPage(req, res, 'pages/admin-help', {
Note: See TracChangeset for help on using the changeset viewer.