Skip to content

Translate-and-adapt: pass stored article id + graceful fallback#1151

Merged
mircealungu merged 1 commit into
masterfrom
claude/translate-adapt-stored-article
May 28, 2026
Merged

Translate-and-adapt: pass stored article id + graceful fallback#1151
mircealungu merged 1 commit into
masterfrom
claude/translate-adapt-stored-article

Conversation

@mircealungu
Copy link
Copy Markdown
Member

Summary

Web half of the translate-and-adapt fix. When a user chose Translate to my level on an article open in the reader, the request could fail server-side and the reader silently closed the modal — "nothing happened."

Changes

  • translateAndAdaptArticle accepts { url, articleId } and sends article_id, so the backend can translate the stored article content instead of re-downloading a URL (which fails when the stored URL is a Zeeguu reader link).
  • ArticleReader: on translation error, fall back to reading the original (translations off, since it isn't in the learned language) instead of dead-ending on a closed modal.
  • SharedArticleHandler: pass the detected articleId when known, so the share flow also uses stored content.

Companion PR

Test plan

  • Deeplink into a foreign-language article, tap Translate to my level → opens translated version
  • Simulate backend translate failure → reader falls back to the original article (no stuck/closed-empty modal)
  • Share flow (external URL) still translates and still falls back to "promote" on error

🤖 Generated with Claude Code

…-ending

When translating an article already open in the reader, pass its article_id
so the backend translates the stored content (the article's URL can be a
Zeeguu reader link that readability can't re-fetch). On translation error,
ArticleReader now falls back to reading the original instead of silently
closing the modal and leaving the user with nothing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for voluble-nougat-015dd1 ready!

Name Link
🔨 Latest commit 7028df6
🔍 Latest deploy log https://app.netlify.com/projects/voluble-nougat-015dd1/deploys/6a17e2d6a0aa940009ede4b7
😎 Deploy Preview https://deploy-preview-1151--voluble-nougat-015dd1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mircealungu mircealungu merged commit e15eb8c into master May 28, 2026
4 checks 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.

1 participant