Repository navigation
RDAT: Translation Copilot v0.3.0 — Bidirectional EN↔AR + Cross-Platform CI/CD
RDAT: Translation Copilot v0.3.0
Professional Bidirectional English↔Arabic Computer-Assisted Translation (CAT) Environment
v0.3.0 is a major release that completes the bidirectional translation pipeline, polishes the dark/light theme, and adds GitHub Actions CI/CD with cross-platform Tauri builds.
⏳ Installers building: The Windows (.exe), macOS (.dmg), and Linux (.deb / .rpm / .AppImage) installers are being built right now by the
ReleaseGitHub Actions workflow. The first run takes 15–30 minutes per platform because Rust compiles every dependency from scratch. Once complete, the installers will appear in the Assets section below.
🌐 Bidirectional Translation (Phase 1)
AR→EN translation now works end-to-end across all three tiers — previously it only worked on the Tauri+Ollama path; every other tier silently hardcoded an EN→AR assumption.
Tier 0 — Local Translation Engine (LTE)
- Bidirectional
enIndex+arIndexbuilt inload();getSuggestion()/search()take adirectionparameter (default"en-ar"for backward compat). - Arabic sentence-splitting now recognises the Arabic question mark
؟(U+061F) and Arabic-letter lookahead. normalize()strips؟alongside the existing؛/،punctuation stripping.
Tier 1 — Local LLM (Ollama + WebLLM)
generateLocalTranslation()/generateRAGTranslation()/prefetchTranslation()accept adirectionparameter and call the sharedbuildRAGSystemPrompt()/buildUserPrompt()fromllm-adapter.ts.- The duplicated hardcoded prompts that caused the original AR→EN bug are deleted.
- WebLLM adapter reads direction from the workspace store (mirroring Ollama adapter); the dead
buildRAGSystemPrompt/buildUserPromptimport is removed.
Tier 2 — Cloud Gemini (Vercel + Tauri proxy)
GeminiBurstRequest/GeminiFullRequest/GeminiTutorRequestaccept an optionaldirectionfield.- New shared
api/_lib/prompts.tskeeps PWA and Tauri prompt builders in sync. useGeminihook forwards direction;TargetEditor.tsxpasses it at the call site.
AI Translation Tutor
- Prompt now labels the source/target correctly for AR→EN attempts ("Arabic Source" / "English Translation Attempt") instead of always saying "English Source" / "Arabic Translation Attempt". The course title stays "Arabic-English professional translation" because the tutor teaches bidirectional AR↔EN translation.
isRTLstill controls the output language of the tutor's feedback, separate from the translation direction.
Persistence + UI
- Segment
source_lang/target_langderived from active direction on save. - Source panel header, language tag, placeholder, and textarea direction all flip with direction.
- Target panel's speech-synthesis locale switches to
en-USin AR→EN mode.
📒 Glossary UX (Phase 2)
"Download" → "Use" with persistence
- Downloaded reference DBs are tracked in IndexedDB
sync_meta(downloaded_reference_dbskey), so the button label survives page reloads. - "Use" is a toggle — clicking it removes that DB's entries (identified by a
source_dbfield on each tagged entry). - Multiple DBs can be "in use" simultaneously (matches the existing data model).
Inline editing
- Every glossary entry, regardless of source (manual add, JSON upload, or reference DB), can be edited in place via a Pencil icon next to the existing Trash2.
- Edits trigger an LTE rebuild (deferred via
queueMicrotask) so ghost-text reflects the change immediately.
Dark-mode fixes
- 15 hardcoded
bg-[#0A0B0E]/dark:bg-[#0F1116]patterns replaced withbg-background/bg-surfacetokens across TranslationWorkspace, SourceEditor, TargetEditor, WelcomeTab, GlossaryView, QuickGuideModal. - Toasts converted from always-dark
bg-[#1a1d23]to theme-awarebg-surface/text-foreground/border-border. - WelcomeWindow splash left intentionally always-dark (flagged for project owner decision — see release notes below).
🔬 Regression Sweep + Lint Hardening (Phase 3)
Direction regression sweep
- AI Tutor prompt was the largest remaining hardcoded direction assumption — now direction-aware (see above).
server.ts(local dev Express server) had hardcoded EN→AR prompts for all three endpoints — rewrote to use the shared direction-aware builders fromapi/_lib/prompts.ts.
Data model correctness
- Manual Add-Term and JSON-upload paths now derive
source_lang/target_langfrom active direction (with JSON honouring explicit per-row fields if present). - Reference-DB catalog and SEED_CORPUS loader keep
en/arbecause those datasets are intrinsically English-source → Arabic-target — verified as correct.
TypeScript strictness
noUnusedLocals+noUnusedParametersnow enabled intsconfig.jsonsonpm run lintcatches dead imports going forward.- The Phase 1 dead-import root cause was "no lint rule was on at all" — that gap is now closed.
- All 30 pre-existing unused-var errors cleaned up.
🤖 CI/CD (new in v0.3.0)
.github/workflows/ci.yml
Runs on every push/PR. Provides fast feedback (~2 min):
- TypeScript strict lint (with
noUnusedLocals/noUnusedParameters) - Phase 1 LTE smoke test (12/12)
- Phase 3 regression sweep (30/30)
- Vite production build
.github/workflows/release.yml
Triggered by pushing a v* tag. Pre-flights with the same lint+test+build gate, then builds Tauri installers in parallel:
- Windows x64 —
.exeNSIS installer - macOS Apple Silicon —
.dmg - macOS Intel —
.dmg - Linux x64 —
.deb/.rpm/.AppImage
All four platform installers attach to this release automatically via tauri-apps/tauri-action@v0. First run on each platform takes 15–30 min for Rust compilation; subsequent runs reuse cargo cache and finish in 5–10 min.
🧪 Smoke Tests
Two offline smoke-test scripts ship in scripts/:
npx tsx scripts/test-bidirectional-lte.ts # Phase 1 — 12 tests
npx tsx scripts/test-phase3-regression.ts # Phase 3 — 30 testsBoth pass clean as of this release.
⚠️ Known limitations flagged for project owner
- WelcomeWindow splash is intentionally always-dark (~30
text-white/NNopacity layers). Converting it to follow the theme toggle is a mechanical but spread-out change. Flagged for project owner decision. - Reference-DB "Use" is a toggle (multiple DBs in use simultaneously). If exclusive single-DB use is preferred, the change is local to
GlossaryView.tsx'shandleDownloadDb. docs/RDAT-Translation-Copilot-v0.2.0-User-Guide.pdfstill describes the app as English-to-Arabic only. This is a v0.2.0 release artifact; updating it is a release-engineering task for v0.3.1.- Comprehensive EN↔AR dictionary: the current seed corpus is ~85 hand-picked entries. Sourcing a licensed multi-thousand-entry bidirectional dictionary is still on the roadmap (see README).
- LTE performance at scale: the current "rebuild whole in-memory index on every mutation" approach (deferred via
queueMicrotask) should be load-tested with a multi-thousand-entry corpus. If it janks, move to a Web Worker.
📥 Install
Desktop (recommended)
Download the installer for your platform from the Assets section below. The installers will appear once the Release GitHub Actions workflow finishes building them.
- Windows:
RDAT Copilot_0.3.0_x64-setup.exe(NSIS installer) - macOS Apple Silicon (M1/M2/M3):
RDAT Copilot_0.3.0_aarch64.dmg - macOS Intel:
RDAT Copilot_0.3.0_x64.dmg - Linux: pick
.deb(Debian/Ubuntu),.rpm(Fedora/RHEL), or.AppImage(universal)
After install, open the Models panel and click Pull on gemma4:e2b (~1.5 GB) to get the recommended starter model. See the Getting Started guide for full setup instructions.
PWA (browser, no install)
Visit https://rdat.vercel.app (or your own Vercel deployment) in Chrome 113+ or Edge 113+ for browser-only mode with optional WebLLM inference.
🙏 Acknowledgements
Developed by Dr. Waleed Mandour, Assistant Lecturer at Sultan Qaboos University, Oman. The development of RDAT: Translation Copilot has been performed with the assistance of multi-AI agents. The primary AI assistant used throughout the development lifecycle was GLM 5.2 (2026) by Z.ai, used for code generation, architectural analysis, debugging, documentation, and visual design.
Full changelog: v0.2.0...v0.3.0