Skip to content

Validate required translation metadata before publishing - #368

Open
biodranik wants to merge 1 commit into
masterfrom
fix/translation-metadata-validation
Open

biodranik wants to merge 1 commit into
masterfrom
fix/translation-metadata-validation

Conversation

@biodranik

@biodranik biodranik commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Require translations to retain reader-visible metadata fields as non-empty strings, with product names and runtime placeholders preserved. Malformed YAML and non-mapping headers or extra values produce explicit errors. The FAQ maintenance-note body exemption requires render: false in both documents; metadata validation runs independently.

Share brand checks between body text and metadata, remove an ineffective transliteration-exemption table and duplicate brand entry, and use one delimiter pattern for parsing and translation. Empty headers and headers ending at EOF are recognized consistently. Translation, proofreading and both Telegram commands reject malformed inputs before API/model calls, including malformed linked-page metadata.

Restore the Russian article's title: key in content/news/2024-03-22/325/index.ru.md, so its page title and H1 render correctly.

Validation:

  • Python 3.12: 31 offline tooling tests pass, including missing/blank/typed fields, malformed YAML and dates, EOF headers, metadata brands, rendered-note cases, and publishing preflight failures.
  • 185 round-trip checks pass; all 3,169 corpus files round-trip.
  • Syntax validation: 0 faults in 3,164 content files.
  • All 1,836 checked translations were compared with master: the only additional diagnostics are 61 existing metadata omissions of Organic Maps; body diagnostics are unchanged. These omissions remain visible in the existing report-only corpus check.
  • Parser comparison over all 3,169 Markdown files: the only parsing changes are 1,096 template-only news section stubs whose closing delimiter is at EOF.
  • Zola 0.23.6 builds successfully; the repaired Russian title and H1 are present in rendered HTML.
  • English/German Telegram dry run and git diff --check pass.
  • CI passes, including the pinned Zola 0.23.4 build and all checkout browser regressions. Cloudflare Pages preview deployment succeeds.

Created from master. Related to #365's narrower FAQ metadata fix; this PR adds required-field, parser, brand and rendering-policy validation.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Deploying organicmaps with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8b657c3
Status: ✅  Deploy successful!
Preview URL: https://9b031e59.organicmaps.pages.dev
Branch Preview URL: https://fix-translation-metadata-val.organicmaps.pages.dev

View logs

Check reader-visible fields and shared brand invariants before applying the taxonomy-note body exemption. Reject malformed YAML and metadata shapes before translation, model or Telegram requests. Share the header delimiter pattern and restore the Russian news title key.

Signed-off-by: Alexander Borsuk <me@alex.bio>
@biodranik
biodranik force-pushed the fix/translation-metadata-validation branch from 27362d2 to 8b657c3 Compare November 3, 2026 16:34

This branch was successfully deployed

1 active deployment
production — 8b657c3b Deployed Nov 3, 2026 by biodranik via Check Zola build #1246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant