Skip to content

fix(download): localized messages for incomplete file downloads and busy PDF rendering - #79

Merged
buzz-code merged 1 commit into
mainfrom
claude/project-thread-tgebkb
Nov 4, 2026
Merged

buzz-code merged 1 commit into
mainfrom
claude/project-thread-tgebkb

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Requested by הדסה · project thread

Fixes buzz-code/ops#46

What

  • Incomplete downloads: validateFileResponse (in providers/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 key ra.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 to console.error and error.details.
  • Busy PDF rendering: fetchJson (in utils/httpUtil.js) maps known server error codes to translation keys. PDF_RENDER_BUSY (nra-server, same branch name) becomes ra.notification.pdf_render_busy.
  • Translations: both keys get Hebrew and English texts. For English, ra-language-english is now extended with a small extendedEnglishTranslation object. 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

…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
@buzz-code buzz-code self-assigned this Nov 4, 2026
@buzz-code
buzz-code merged commit 4b62749 into main Nov 4, 2026
1 check passed
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