Repository navigation
fix: show the language note on the blog listing page - #116
Merged
Merged
Conversation
`enShortNote` / `trOnlyNote` live in both locales but were only read by `RecentPosts`. On the blog listing page an English visitor silently saw one post where there are 28 — `getPostSummaries(i18n.language)` filters by language, so 27 Turkish-only posts vanish with no explanation. BlogPage now renders the same note whenever the active language has fewer posts than one page: | visitor | posts | one page? | note | |---|---|---|---| | Turkish | 6 | yes | hidden | | English | 1 | no | shown | The Turkish note is hidden on purpose — every Turkish visitor would otherwise be told their own content is "Turkish only". The condition is `allPosts.length < postsPerPage`, not a language check, so it stays correct if a second Turkish post is ever published. The note reuses the keys `RecentPosts` already reads, so no translation changes were needed; tr/en parity holds. ## Verification - [x] `tsc -b` clean - [x] `biome check .` clean across 146 files - [x] 31 suites / 198 tests pass - [x] note contrast: 7.25:1 dark, 6.31:1 light — AA for 12px text - [x] build succeeds, agent gate passes - [ ] CI green - [ ] Post-deploy: confirm the note appears at /blog under `lang=en` and is absent under `lang=tr`
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
web-site | f4ef288 | Commit Preview URL Branch Preview URL |
Oct 19 2026, 12:53 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
enShortNote/trOnlyNoteexist in both locales but were only read byRecentPosts. On the blog listing page an English visitor silently saw one post where there are 28 —getPostSummaries(i18n.language)filters by language, so 27 Turkish-only posts vanish with no explanation.The note on the home page told them. The page they land on did not.
Fix
BlogPagerenders the same note whenever the active language has fewer posts than one page:The condition is
allPosts.length < postsPerPage, not a language check — so every Turkish visitor is not told their own content is "Turkish only", and the rule stays correct if a second Turkish post is ever published.The note reuses the keys
RecentPostsalready reads (home.recentPosts.enShortNote/trOnlyNote), so no translation changes were needed and tr/en parity holds.New
.blog-language-notestyle mirrors.recent-posts-note: same margin, size and--color-text-subtle, which measures 7.25:1 on dark and 6.31:1 on light — AA for 12px text.Verification
tsc -bcleanbiome check .clean across 146 files/blogunderlang=enand is absent underlang=tr