Skip to content

Add "Proof" section to slug detail pages linking to proof source#118

Merged
brunoborges merged 3 commits intomainfrom
copilot/add-proof-link-to-slug-detail
Feb 28, 2026
Merged

Add "Proof" section to slug detail pages linking to proof source#118
brunoborges merged 3 commits intomainfrom
copilot/add-proof-link-to-slug-detail

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 28, 2026

Each pattern's detail page now surfaces a link to its corresponding JBang proof script, placed between "Related Documentation" and "Related patterns".

What changed

  • templates/slug-template.html — Added {{proofSection}} placeholder between the docs and related sections
  • translations/strings/en.yaml — Added sections.proof and sections.proofLink keys
  • translations/strings/{locale}.yaml — Added sections.proof and sections.proofLink translations for all 11 non-English locales (de, es, fr, it, pt-BR, pl, tr, ar, ja, ko, zh-CN)
  • html-generators/generate.java / generate.py — Added slugToPascalCase / slug_to_pascal_case helpers and renderProofSection / render_proof_section functions; wired into generateHtml / generate_html

Behavior

The section only renders when a proof file exists (proof/{category}/{PascalCase}.java). Currently 105 of 112 patterns have proof files; the remaining 7 silently omit the section.

Generated link example for type-inference-with-var:

https://github.com/javaevolved/javaevolved.github.io/blob/main/proof/language/TypeInferenceWithVar.java

The section reuses existing .docs-section / .doc-link styles for visual consistency with "Related Documentation". The section title and link label are fully translated across all supported locales.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] Link to proof in slug detail page</issue_title>
<issue_description>### Describe the feature

Around the sections near Related Documentation, add a section linking to the Proof source code.

Why would this be useful?

No response

Alternatives considered

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
Copilot AI changed the title [WIP] Add link to proof in slug detail page Add "Proof" section to slug detail pages linking to proof source Feb 28, 2026
@brunoborges
Copy link
Copy Markdown
Member

@copilot also needs to cover translations for the section title

Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 28, 2026

@copilot also needs to cover translations for the section title

Done in f9a2dc3. Added sections.proof and sections.proofLink to all 11 locale files:

Locale Proof Link label
de Beweis Beweisquelle ansehen
es Prueba Ver código de prueba
fr Preuve Voir la preuve source
it Prova Vedi sorgente di prova
pt-BR Prova Ver código de prova
pl Dowód Zobacz źródło dowodu
tr Kanıt Kanıt kaynağını görüntüle
ar إثبات عرض كود الإثبات
ja 証明 証明ソースを見る
ko 증명 증명 소스 보기
zh-CN 证明 查看证明源码

The generator now runs with zero missing-key warnings for sections.proof.

@brunoborges brunoborges marked this pull request as ready for review February 28, 2026 07:44
@brunoborges brunoborges merged commit f48197a into main Feb 28, 2026
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.

[Feature] Link to proof in slug detail page

2 participants