raycast-multi-translate
A Raycast extension that translates text to multiple languages at once
by antfuTypeScript
Commit activity
Last 12 weeks · 0 commits
Community health
5 of 6 standards met
Recent PRs & issues
Summary Resolves #7 by adding support for DeepL API translation (both DeepL Free and DeepL Pro endpoints) with BYOK (Bring Your Own Key). Changes Preferences in package.json: deeplApiKey: Optional password field for users to configure their DeepL API key. deeplPro: Optional checkbox to toggle between DeepL Free (pi-free.deepl.com) and DeepL Pro (pi.deepl.com). Auto-detects :fx keys as Free by default. src/logic/translator.ts: Implemented ranslateDeepl with standard form body. Added target language code mapping for DeepL (e.g. EN-US, PT-BR, ZH). Seamless fallback to Google Translate if no DeepL API key is configured. src/types.ts**: Added Preferences interface with typed preference keys. Bounty Claim @algora-pbc /claim #7
Description Adds optional Bring-Your-Own-Key (BYOK) DeepL API v2 support while keeping Google Translate as the default provider: Preferences (, ): Adds ( default / ) and an optional password preference. DeepL client (): Uses native against with header authentication (no extra runtime dependencies), routes keys to and standard keys to , maps Raycast language codes ( -> , -> , -> , -> , , omitted on request), and maps /, , and responses to clear toast errors. Caching & tests (, , , ):** Namespaces LRU cache entries by provider (), keeps free of runtime imports, and adds unit tests covering endpoint routing, locale normalization, provider-scoped caching, and HTTP error handling. Linked Issues Closes #7 Additional context Verified locally with: () () ( — 6/6 passing)
Clear and concise description of the problem DeepL is an alternative to Google Translate. Its translations are often of better quality than G. It supports autodetect language and offers a large amount of languages. Suggested solution Implementing DeepL with a BYOK (Bring your own Keys) would give an alternative for people who want to avoid Google, or demand higher quality translations Alternative _No response_ Additional context Link to docs: https://www.deepl.com/docs-api Validations [X] Follow our Code of Conduct [X] Read the Contributing Guide. [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Recent fixes
feat(deepl): add support for DeepL API Free & Pro translation provider (#7) Summary Adds DeepL API ( and ) support as a translation provider as requested in #7: Automatically detects DeepL Free keys ( suffix) vs DeepL Pro keys and routes requests to the appropriate endpoint. Normalizes source and target language codes (, , , , , etc.) to DeepL's specification. Includes unit tests covering Free/Pro endpoint routing, header authentication, and response parsing. /claim #7 Fixes #7
Repository: antfu/raycast-multi-translate. Description: A Raycast extension that translates text to multiple languages at once Stars: 498, Forks: 56. Primary language: TypeScript. Languages: TypeScript (94.6%), Swift (5.4%). License: MIT. Topics: raycast-extension, translate. Open PRs: 23, open issues: 1. Last activity: 1y ago. Community health: 85%. Top contributors: antfu, tmkx, Innei, MeleMannen.