Prechádzať zdrojové kódy

Improve readability of all seven-language visa guides

zhangwei123 1 mesiac pred
rodič
commit
e84a62e

+ 42 - 0
docs/editorial/blog-readability-verification.md

@@ -0,0 +1,42 @@
+# Guide readability refinement — 2026-10-10
+
+## Scope and baseline
+
+The remote handoff branch `feat/ireland-visa-guides-en` was fetched and verified at `9cae31f7ac0c1ef41790436e0454757d79b7783d`. Work continues on a separate local branch, `feat/blog-guide-readability`, without changing the handoff branch.
+
+All 21 guide bodies (three destinations in seven languages) received an editorial readability pass: clearer paragraph grouping, direct task instructions, selective lists and emphasis, and more explicit qualifications where a short formulation could mislead. The seven main sections, existing preparation tables and official links remain. This is an editorial refinement, not a new official-source research date or a claim of measured SEO/conversion improvement.
+
+An independent reviewer read every revised body and approved all 21 after the requested small clarity corrections. The Netherlands personal-booking/intermediary warning, Greece's official confirmation distinction and Denmark's Dublin-submission/London-processing distinction are retained. This review is not a claim of certified native-language proofreading.
+
+## Preservation checks
+
+`scripts/check-blog-readability.mjs` compares the current collection directly with the verified handoff commit. It checks the 21-record identity set, exact equality of every non-body field, Markdown link occurrences and seven H2 boundaries per guide. It reports descriptive paragraph/list statistics; those statistics do not replace factual review or establish that every paragraph is shorter.
+
+Titles, descriptions, slugs, review dates, official booking links, source lists, related IDs and publication flags are unchanged. No renderer, shared navigation, green service CTA, localization, canonical/hreflang, structured-data, business-rule or indexing configuration changes are included.
+
+The existing production `BLOG_INDEXING_ENABLED=true` setup is preserved. Local validation explicitly sets the flag for each mode, with an isolated dummy API URL. Environment files are excluded from this validation checkout and are not read, edited or included in the new commit/bundle. A dummy-API test build must not be deployed.
+
+## Verification receipts
+
+Passed with exit 0:
+
+- `node scripts/check-blog-readability.mjs`: all 21 bodies changed; non-body fields and link/section integrity pass.
+- `node scripts/check-blog.mjs` and `BLOG_INDEXING_ENABLED=true node scripts/check-blog.mjs --release`.
+- `node scripts/check-blog-nav.cjs` and `node scripts/check-blog-style.mjs`.
+- `node scripts/check-i18n.mjs`: seven languages, 588 base dictionary keys and 449 active static UI keys.
+- `node scripts/check-localization-scope.mjs`: 260 protected business checks, zero differences requiring review.
+- `node_modules/.bin/tsc --noEmit --incremental false`.
+- Focused ESLint for the new comparison script and `git diff --check`.
+
+- `BLOG_INDEXING_ENABLED=false NEXT_PUBLIC_API_URL=http://127.0.0.1:9 npm run build`: exit 0; matching HTTP suite passed 28 blog pages, 56 public app pages and 42 private localized routes, with an empty preview sitemap.
+- `BLOG_INDEXING_ENABLED=true NEXT_PUBLIC_API_URL=http://127.0.0.1:9 npm run build`: exit 0; matching HTTP suite passed the same route scope and the exact 84-entry sitemap. Canonicals, reciprocal alternates, schema, index/noindex rules and error routes passed.
+
+Both bounded test servers were stopped. The final local build uses indexing=true with the isolated dummy API; the repository's production settings remain unchanged. HTTP checks do not exercise authenticated accounts, real appointment availability, orders, payments or email delivery.
+
+## Limits
+
+Full `npm run lint` exits 1 because the pre-existing `next/core-web-vitals` configuration cannot be loaded. The existing build skips ESLint; build success is not a full-lint pass.
+
+Fresh browser QA could not start: installed Chromium exited before page load at `process_singleton_posix.cc` with `socket() failed: Operation not permitted`. No new screenshot, rendered mobile, hydration or interactive-browser result is claimed. Previous browser results in the handoff documentation belong to that earlier version/environment.
+
+No remote push, master merge, deployment or Search Console action is part of this handoff.

+ 32 - 0
scripts/check-blog-readability.mjs

@@ -0,0 +1,32 @@
+import assert from 'node:assert/strict';
+import fs from 'node:fs';
+import { execFileSync } from 'node:child_process';
+
+// The user's verified handoff is the preservation baseline for this body-only edit.
+const baseline = '9cae31f7ac0c1ef41790436e0454757d79b7783d';
+const before = JSON.parse(execFileSync('git', ['show', `${baseline}:src/content/blog/articles.json`], { encoding: 'utf8' }));
+const after = JSON.parse(fs.readFileSync('src/content/blog/articles.json', 'utf8'));
+const key = a => `${a.locale}/${a.id}`;
+const links = body => [...body.matchAll(/\]\(([^)\s]+)\)/g)].map(m => m[1]).sort();
+const headings = body => (body.match(/^## /gm) || []).length;
+const stats = body => {
+  const paragraphs = body.split(/\n\s*\n/).filter(p => p.trim() && !/^(?:#|\||[-*] |\d+\. )/.test(p));
+  const visible = paragraphs.map(p => p.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1').replace(/[*_`]/g, ''));
+  return { proseBlocks: paragraphs.length, longestVisibleProseBlock: Math.max(0, ...visible.map(p => p.length)), listItems: (body.match(/^(?:[-*]|\d+\.) /gm) || []).length };
+};
+assert.equal(before.length, 21);
+assert.equal(after.length, 21);
+assert.deepEqual(after.map(key).sort(), before.map(key).sort());
+const report = [];
+for (const article of after) {
+  const original = before.find(a => key(a) === key(article));
+  const { body: oldBody, ...oldFields } = original;
+  const { body, ...fields } = article;
+  assert.deepEqual(fields, oldFields, `${key(article)} changed fields outside body`);
+  assert.deepEqual(links(body), links(oldBody), `${key(article)} changed link occurrences`);
+  assert.equal(headings(body), headings(oldBody), `${key(article)} changed H2 section count`);
+  assert(!/<\/?(?:script|iframe|html|body)\b/i.test(body), 'Unsafe HTML');
+  report.push({ article: key(article), changed: body !== oldBody, before: stats(oldBody), after: stats(body) });
+}
+console.log(JSON.stringify({ baseline, changedBodies: report.filter(a => a.changed).length, articles: report }, null, 2));
+console.log('PASS: 21-article inventory, body-only scope, exact link occurrences and H2 boundaries. Readability statistics are descriptive; factual qualifiers require editorial review.');

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
src/content/blog/articles.json


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov