Repository navigation
fix(download): localized messages for incomplete file downloads and busy PDF rendering - #79
Merged
Merged
Conversation
…usy PDF rendering - validateFileResponse now throws a translatable error (ra.notification.file_download_incomplete) instead of raw English "content length mismatch" / "missing keys" text. These usually come from a network content filter blocking or truncating the download, and the message says so. Technical details go to console.error and error.details. - fetchJson maps known server error codes to translation keys; PDF_RENDER_BUSY becomes ra.notification.pdf_render_busy. - Hebrew and English texts for both keys (English extends ra-language-english). Fixes buzz-code/ops#46 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GTics1vhDVoBFRPcg7nSn
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.
Requested by הדסה · project thread
Fixes buzz-code/ops#46
What
validateFileResponse(inproviders/baseDataProvider.ts) used to throw raw English errors (content length mismatch: expected X, got Y,missing keys,Invalid file response). It now throws the translation keyra.notification.file_download_incomplete. These errors usually come from a network content filter blocking or cutting off the download, and the message tells the user that. The technical details go toconsole.erroranderror.details.fetchJson(inutils/httpUtil.js) maps known server error codes to translation keys.PDF_RENDER_BUSY(nra-server, same branch name) becomesra.notification.pdf_render_busy.ra-language-englishis now extended with a smallextendedEnglishTranslationobject.notify()translates the key in the user's current locale.Compatibility
Works with any server version. An older server never sends the code, so its message passes through unchanged.
Tests
New tests for
httpUtil, the three invalid-response cases, and he/en lookups. Full suite: 39 suites, 230 tests pass.Generated by Claude Code