Repository navigation
Conversation
When a locale had no translation of a file, read_translated_text_blob returned "", so pages such as untranslated track docs rendered blank. It now returns the English, as names and blurbs already do since #10686. The miss is still reported, except for docs on inactive tracks. Refs exercism/i18n#237. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iHiD
force-pushed
the
content-english-fallback
branch
from
November 8, 2026 04:06
be31bc9 to
803f888
Compare
Member
Author
|
Closing. A missing translation should be fixed by translating it, and the miss reported. Falling back to English hides it, and English doesn't help a reader who doesn't speak it. |
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.
When a locale had no translation of a file,
Git::Repository#read_translated_text_blobreturned"", so the page rendered blank. Untranslated track docs at/docs/tracks/<slug>/*in Hungarian were one example. Exercise instructions, hints, blog posts and analyzer comments go through the same method.It now returns the English, as names and blurbs already do since #10686. It reuses the blob id it already found, so it does not walk the tree twice. A file that has no English still renders empty.
The miss is still reported to Sentry.
read_translated_text_blobtakes a newreport_missing:keyword, andDocument#markdownpassestranslation_expected?, so docs on inactive tracks no longer report. Exercise, concept and track content still always report, because those git objects do not know whether their track is active.Nothing caches the English fallback beyond the request. ETags and fragment caches include
TranslationRepo.cache_key, which changes when a translation lands.translated?andSolution::ResolveDocsare unchanged.Tests in
test/models/git/translated_content_test.rbcover a present translation, a missing one (English plus a report),report_missing: false, a missing English file, and docs on active and inactive tracks.Refs exercism/i18n#237. That issue stays open for
Document#nav_title, which shows an untranslated database value.🤖 Generated with Claude Code