Skip to content

Add inline note translation#208

Open
sato820 wants to merge 1 commit into
PrimalHQ:mainfrom
sato820:codex/inline-note-translation-206
Open

Add inline note translation#208
sato820 wants to merge 1 commit into
PrimalHQ:mainfrom
sato820:codex/inline-note-translation-206

Conversation

@sato820

@sato820 sato820 commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Refs #206.

Adds inline note translation for feed and thread cells:

  • shows a Translate control directly below eligible note text
  • translates through a LibreTranslate-compatible endpoint
  • uses the device preferred language as the default target language
  • supports UserDefaults configuration for enabled state, endpoint URL, API key, and target language
  • caches translations in memory for the current app session
  • protects URLs, nostr references, Lightning invoices, Bitcoin addresses, hashtags, and handles from being modified by the translation provider
  • handles reusable cells safely by ignoring stale translation callbacks

Notes

The default endpoint is https://libretranslate.com/translate; self-hosters or later Settings UI can set noteTranslationEndpointURL, noteTranslationAPIKey, noteTranslationTargetLanguage, and noteTranslationEnabled.

This keeps the implementation client-side and avoids adding backend cost for Primal.

Verification

  • git diff --check
  • Could not run xcodebuild or swift in this Windows environment; both tools are unavailable here.

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