A Raycast extension that translates text to multiple languages at once
by antfuTypeScript
Last 12 weeks · 0 commits
5 of 6 standards met
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.
Linked issue Closes #7 Context Adds DeepL as an optional bring-your-own-key translation provider while keeping Google Translate as the default provider. Description Adds a translation provider preference and optional DeepL API key preference. Sends DeepL requests to the free or pro API endpoint based on the API key suffix. Maps DeepL language codes back to the extension language codes where needed. Keeps the generated preference metadata in sync. Verification pnpm run typecheck pnpm exec ray build -e dist git diff --check /claim #7
Summary add a Translation Provider preference with Google as the default add a separate DeepL API Key password preference, matching prior maintainer feedback add DeepL translation support with separate source/target language code mapping and clear errors for missing keys or unsupported languages keep cache entries scoped by provider so Google and DeepL results do not collide Closes #7 /claim #7 Verification Note: could not run because this repo still uses while ESLint 9 expects ; no lint config migration is included in this focused PR.
Summary Adds DeepL as an alternative translation provider, selectable per-extension. Google Translate remains the default — DeepL is opt-in via preferences. Closes #7 /claim #7 What's added New Translation Provider preference ( default, opt-in) DeepL API Key preference (password field) DeepL Plan preference ( → , → ) What's refactored Pulls translation logic out of into per-provider modules so adding more providers later stays cheap: The cache key now includes the provider, so toggling Google ↔ DeepL won't surface stale entries. DeepL implementation notes No new runtime dependency — uses the global available in the Raycast Node runtime Source language: uppercased and region-stripped (DeepL source codes are region-less) Target language picks sensible defaults where DeepL requires region: → → / → → Unsupported target languages return from the mapping helper so the call site surfaces a clear error rather than a generic 4xx Error mapping: → (bad key or wrong plan endpoint) → → other → Validation — clean (after regenerating via ) — built extension successfully Smoke test of the lang-code conversion functions ( export from ): 14/14 cases pass source: →undefined, →, →, → target: →, →, →, →, →, →, unsupported →undefined, →undefined from-DeepL: →, → Why no dependency The official SDK adds ~1 MB of transitive deps for what is effectively one POST endpoint. Sticking with keeps the bundle lean and avoids a runtime dep just to set one header. Out of scope Per-language provider routing (always uses the selected provider for the whole translation set) DeepL glossary support Formal test suite — repo currently has no test runner configured; conversion-helper smoke test was run via against exports
Linked issue Resolves #7. Context This adds DeepL as an optional bring-your-own-key translation engine while keeping Google Translate as the default behavior. Description Adds extension preferences for the translation engine, DeepL API endpoint type, and a password-protected DeepL API key. Routes translations through DeepL's API when selected, including source auto-detection support. Maps existing extension language codes to DeepL-compatible source and target codes for English, Portuguese, and Chinese variants. Skips unsupported DeepL language pairs when other selected target languages can still be translated, while still surfacing API/auth failures. Documents how to enable DeepL in the README. Verification I also ran ; it still fails on existing repository/tooling issues unrelated to this change: the current icon size check, missing ESLint flat config for ESLint 9, missing Prettier binary, and existing title-case warnings.
@algora-pbc /claim #7 Summary Add a Translation Provider preference with Google Translate as the default and DeepL as an opt-in provider. Add separate DeepL preferences for API key and Free/Pro endpoint selection. Implement DeepL via the current POST API using the authorization header. Keep the existing language target preferences and document the new DeepL option in the README. Notes This is a fresh implementation against current ; the older DeepL PR #12 is conflicting and had maintainer feedback requesting provider-specific API key fields. No DeepL API key is included or required for build verification. Verification could not run because the repo still has an while the installed ESLint v9 expects . Transparency: this patch was prepared with AI-assisted coding through Codex.
Repository: antfu/raycast-multi-translate. Description: A Raycast extension that translates text to multiple languages at once Stars: 500, Forks: 39. Primary language: TypeScript. Languages: TypeScript (94.6%), Swift (5.4%). License: MIT. Topics: raycast-extension, translate. Open PRs: 5, open issues: 1. Last activity: 9mo ago. Community health: 85%. Top contributors: antfu, tmkx, Innei, MeleMannen.