Skip to content

feat(blog): translation bar on untranslated posts - #13

Merged
proggeramlug merged 1 commit into
mainfrom
banner-language
Oct 30, 2026
Merged

proggeramlug merged 1 commit into
mainfrom
banner-language

Conversation

@TheHypnoo

Copy link
Copy Markdown
Member

Summary

Untranslated posts already fall back to English, but the small inline notice was easy to miss. They now show a full-width bar under the nav with a link that opens GitHub's editor to create the missing translation.

 <Base>
   <Nav />
+  {isFallback && <div class="translation">}   # icon, "This post is available in English only.", "Help translate it"
   <PageHeader />
   <article>
-    {isFallback && <p class="notice notice--accent">}
     <p class="notice">{t.historical}</p>

The link goes to github.com/PerryTS/perryts.com/new/main/src/content/blog/<slug>?filename=<lang>.md. People without write access get a fork and a pull request automatically.

Evidence

All 21 posts are currently translated into all 13 locales, so no bar renders today.

  • Test: removed building-pry/es.md in a scratch copy and built.
    Result: the bar renders only on /es/blog/building-pry/, and its link points to .../src/content/blog/building-pry?filename=es.md. Checked in a browser on desktop and at 375px; it fits on one line in both.

Merge Danger

Door: two-way

Blast Radius: small

Only affects article pages for untranslated posts. Adds one helpTranslate string to each of the 13 locale files.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0c657187-6093-46cb-af96-424febdc2f80
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug merged commit 7bdb13b into main Oct 30, 2026
2 checks passed
@TheHypnoo
TheHypnoo deleted the banner-language branch October 30, 2026 14:34
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.

2 participants