Inspiration

Many Bengali speakers know exactly what they want to communicate, but expressing the same thought naturally in English can be difficult. Forming sentences takes time, the right words may not come to mind, and grammar uncertainty can make a detailed Bangla thought become shorter or less accurate in English.

The usual solution also breaks the conversation flow: write in Bangla or Banglish, open a translation tool, copy and paste the text, copy the English result back, and then repair any meaning or tone that changed. This is especially frustrating for Bangladeshi freelancers communicating with international clients.

We built ToneBridge to remove that friction.

What it does

ToneBridge is an open-source Chrome and Edge writing assistant that converts Bangla and Banglish into natural English directly inside supported web editors.

When a user pauses after typing, ToneBridge displays a floating English suggestion beside the active editor. The user can replace the original text, copy the translation, retry it, dismiss it, or undo a replacement.

Unlike a general translator or grammar rewriter, ToneBridge follows a strict translation contract:

  • Preserve the complete meaning and intention.
  • Preserve casual, formal, polite, direct, or emotional tone.
  • Do not add or remove information.
  • Do not answer or explain the source message.
  • Keep names, brands, versions, and technical terms exact.
  • Leave the original text unchanged until the user approves the result.

Users can choose automatic or keyboard-triggered manual translation, configure different behavior for each website, protect important vocabulary, select English spelling and contraction preferences, and move the floating overlay anywhere on the screen.

How we built it

ToneBridge is a Manifest V3 browser extension built with JavaScript, React, Vite, HTML, and CSS.

A content script detects standard inputs, textareas, and rich contenteditable editors. The suggestion interface runs inside a closed Shadow DOM so website styles cannot break it. A background service worker stores provider credentials in a protected extension context and performs translation requests without exposing keys to webpages.

The hosted translation path currently uses OpenAI's open-weight gpt-oss-120b model through Groq's free API. ToneBridge also includes an optional loopback-only Ollama provider so users can experiment with local open-source models without silently falling back to a hosted service.

The provider system is modular, allowing additional hosted or self-hosted engines to be added later without rebuilding the editor integration.

Challenges we faced

Modern websites do not use one consistent type of text box. ChatGPT, Gmail, LinkedIn, Fiverr, and other applications use controlled inputs, dynamically rendered editors, modal layers, and embedded frames.

We had to solve editor detection, framework-compatible text replacement, stale translation results, overlay positioning, extension reload errors, iframe site rules, keyboard shortcut behavior, and website interfaces that could appear above the extension overlay.

The harder AI challenge was defining “faithful translation.” Natural English alone is not enough if the model adds politeness, removes emotion, changes certainty, or rewrites the user's personality. We created a versioned dataset of 30 invented Bangla, Banglish, and mixed-language examples to evaluate completeness, protected terms, question intent, and unsupported additions.

Accomplishments

  • A working v1.0.0 release candidate for Chrome and Edge.
  • Compatibility work for standard editors, ChatGPT, Gmail, LinkedIn, and embedded website editors.
  • Automatic, manual, and per-site translation controls.
  • Protected vocabulary and explicit English style preferences.
  • Hosted and local provider architecture.
  • No analytics or stored translation history.
  • Settings export and complete local-data deletion.
  • Accessibility, reduced-motion, security, and performance protections.
  • 44 deterministic tests, dataset validation, secret scanning, and GitHub Actions CI.
  • A public Apache-2.0 open-source repository with protected branches and contributor documentation.

What we learned

We learned that a trustworthy writing assistant requires much more than calling a language model. Translation behavior needs a precise contract, reproducible evaluation, privacy boundaries, safe failure handling, and explicit user control.

We also learned how differently modern web editors behave and why browser-extension compatibility must be treated as an adapter and testing problem rather than a single DOM operation.

What's next

After final browser acceptance, we plan to publish the official v1.0.0 release. The next major client will be an Android keyboard designed with password-field exclusion, explicit network indicators, and privacy-first controls.

Although ToneBridge begins with Bangla and Banglish, its translation contract and provider architecture are designed to support more languages in the future.

Built With

Share this project:

Updates