Skip to content

feat(outreach): publish the blog in French - #1921

Merged
joshunrau merged 2 commits into
mainfrom
feat/french-blog-posts
Nov 13, 2026
Merged

joshunrau merged 2 commits into
mainfrom
feat/french-blog-posts

Conversation

@CMonnin

@CMonnin CMonnin commented Nov 13, 2026

Copy link
Copy Markdown
Member

French visitors to opendatacapture.org now get the blog in French. The site's toggle between French and English on a blog post now opens that post in the other language. A few strings that were still English on French pages are translated.

Changes

  • /fr/blog lists French translations of the five published posts. The REDCap comparison is still a draft and is not translated.
  • On a blog post, the language toggle opens the same post in the other language. If the post has no translation, the toggle opens that language's blog index. It used to lead to a 404.
  • A translated post names its original with translationOf: <slug> in its frontmatter. The build fails if a translationOf names no post, if a post would pair with more than one other post, or if both posts are in the same language. .agents/docs/playbooks/add-blog-post.md documents the field.
  • French pages show "min de lecture" for reading time, "Documentation" in the header and "Bac à sable d'instruments" in the footer.
  • The 404 page shows its message in both English and French.

Decisions

  • French posts have French slugs (/fr/blog/naviguer-la-bureaucratie), linked by one field on the translation. The alternative was to reuse the English slug, which would need a slug override, because /blog is one flat directory where the filename is the slug.
  • The translations use Québec French, to match "Blogue". "Douglas Neuroinformatics Platform" stays in English, as it does in apps/web.
  • Each translation keeps its original's publish date, so the French blog does not present old articles as new.
  • The 404 page shows both languages because it is a single static page and cannot tell which language the visitor wanted.

Risks

  • Claude wrote the French text. No native speaker has read it, so wording errors would be published.
  • "Documentation" is longer than "Docs". I did not check visually whether the French header crowds at the md breakpoint.

Notes

apps/outreach has no unit or e2e tests, so I checked the built site's HTML instead:

  • On all 10 posts, the language toggle points to the post's counterpart.
  • With a translation set to isDraft: true, its English original's toggle points to /fr/blog/.
  • A three-post chain (A → C, B → A) fails the build with Blog post 'l-infonuagique-en-sante' is paired with more than one post.
  • The sitemap lists the five French posts.

Adversarial review

Reviewed at commit eb33c95. pnpm check: green.

Findings

  1. apps/outreach/src/lib/blog.ts:36 — If a post sets translationOf and another post names that post, the build passes with a three-way chain: A (en → C), B (fr → A), C (fr). A links to C and C links to A, so nothing links to B. The length > 1 check only covers posts with no translationOf. — Collect candidates in both directions: candidate.id === original?.id || originals[index]?.id === post.id. The existing length > 1 check then rejects the chain.
  2. apps/outreach/src/lib/blog.ts:30 — getPublishedTranslation returns the original when given a translation, so [slug].astro:11,22 stores an English original in a prop named translation. — Rename to match the package's existing alt naming: getPublishedAltPost / altPost.
  3. apps/outreach/src/lib/blog.ts:26-29 — The doc comment restates the search code, and it states as fact a convention ("Only the translation names its original") that nothing enforces. — Delete the comment once finding 1 enforces the rule in code.

Fixed

    1. Candidates are now collected in both directions, so the existing count check rejects a chain.
    1. Deleted the comment. The fix for finding 1 enforces the rule in code.
    1. Renamed to getPublishedAltPost, with the page prop altPost.

Attestation

I, Claude Opus 5.5, attest that the review block above reports the adversarial review as it ran on the commit named, with every finding it returned.

🤖 Generated with Claude Code

CMonnin and others added 2 commits November 13, 2026 14:23
Add French translations of the five published posts. A translation names
its original in a new `translationOf` frontmatter field, and the language
toggle on a post now opens its counterpart, or the other language's blog
index when it has none, instead of a 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reading time on blog posts, the Docs link in the header, the
Instrument Playground link in the footer and the 404 page were English
on the French site. The 404 page cannot tell which language the visitor
wanted, so it shows both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CMonnin
CMonnin requested a review from joshunrau as a code owner November 13, 2026 19:28
@github-actions github-actions Bot added the Status: Waiting on Review Automated: unreviewed, pushed since the last review, or review re-requested label Nov 13, 2026
@joshunrau
joshunrau merged commit 9925793 into main Nov 13, 2026
7 checks passed
@joshunrau
joshunrau deleted the feat/french-blog-posts branch November 13, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Waiting on Review Automated: unreviewed, pushed since the last review, or review re-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants