source: Klonkt/src/routes/changelog.js@ 5a6a457

main
Last change on this file since 5a6a457 was 834bcc3, checked in by Robin Genis <roboburr@…>, 3 months ago

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@…>

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[90259da]1/**
[834bcc3]2 * Public changelog / release page.
[90259da]3 *
[834bcc3]4 * GET /changelog -> renders CHANGELOG.md (the source of truth for releases).
[90259da]5 *
[834bcc3]6 * The app version (footer, package.json) is intentionally decoupled from the
7 * circle federation proto (KLONKT_PROTO): a version bump is cosmetic and does not
8 * affect federation. We show the proto here explicitly so that each release
9 * makes visible which federation version this instance speaks (circles = lockstep per proto).
[90259da]10 */
11
12import express from 'express';
13import fs from 'fs';
14import path from 'path';
15import { fileURLToPath } from 'url';
16import { renderPage } from '../middleware/render.js';
17import { MarkdownService } from '../services/MarkdownService.js';
18import { KLONKT_PROTO } from '../services/CircleFederation.js';
19
20const router = express.Router();
21const __dirname = path.dirname(fileURLToPath(import.meta.url));
22const CHANGELOG_PATH = path.join(__dirname, '..', '..', 'CHANGELOG.md');
23
24router.get('/changelog', (req, res) => {
25 let html;
26 try {
27 html = MarkdownService.render(fs.readFileSync(CHANGELOG_PATH, 'utf8'));
28 } catch {
29 html = '<p>Geen wijzigingenoverzicht beschikbaar.</p>';
30 }
31 renderPage(req, res, 'pages/changelog', {
32 pageTitle: 'Wijzigingen',
33 bodyClass: 'on-changelog',
34 changelogHtml: html,
35 proto: KLONKT_PROTO,
36 });
37});
38
39export default router;
Note: See TracBrowser for help on using the repository browser.