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

    rbb42dfb r834bcc3  
    11/**
    2  * Link-in-bio + klikstats (premium feature #6).
     2 * Link-in-bio + click stats (premium feature #6).
    33 *
    4  *   GET /links          -> Linktree-achtige pagina met de profile_links van de site
    5  *   GET /links/go/:i     -> telt de klik (per url) en stuurt door naar de externe URL
     4 *   GET /links          -> Linktree-style page with the site's profile_links
     5 *   GET /links/go/:i     -> counts the click (per url) and redirects to the external URL
    66 *
    7  * Hergebruikt de bestaande sites.profile_links (JSON [{platform,url}]) + de
    8  * PLATFORMS-iconen/labels. Klikken landen in link_clicks (zie /admin/stats).
    9  * Open-redirect-veilig: /links/go/:i stuurt ALLEEN door naar een url die in de
    10  * eigen profile_links staat. Hub: via /user/:slug/links.
     7 * Reuses the existing sites.profile_links (JSON [{platform,url}]) + the
     8 * PLATFORMS icons/labels. Clicks are stored in link_clicks (see /admin/stats).
     9 * Open-redirect safe: /links/go/:i ONLY redirects to a url present in the
     10 * site's own profile_links. Hub: via /user/:slug/links.
    1111 */
    1212
     
    4848  if (!link || !link.url) return next();
    4949  const url = String(link.url);
    50   // Alleen externe http(s)- of mailto-links (geen open redirect / javascript:).
     50  // Only external http(s) or mailto links (no open redirect / javascript:).
    5151  if (!/^https?:\/\//i.test(url) && !/^mailto:/i.test(url)) return res.status(400).send('Bad link');
    5252  try {
     
    5555       ON CONFLICT(site_id, url) DO UPDATE SET clicks = clicks + 1, updated_at = CURRENT_TIMESTAMP`
    5656    ).run(site.id, url);
    57   } catch { /* telling mag de redirect nooit breken */ }
     57  } catch { /* counting must never break the redirect */ }
    5858  res.redirect(302, url);
    5959});
Note: See TracChangeset for help on using the changeset viewer.