Building the BookBrainz Translation Engine (Gsoc 2026)

Project Proposal: Building the BookBrainz Translation Engine (i18n)

Contact Info

  • Name: Prateek singh

  • Discord: prateekiiitg56

  • Mail: Ps332927@gmail.com

  • Github: Prateekiiitg56

  • Project Size: 175 Hours


My Goal:

BookBrainz is an awesome database, but right now it’s basically locked behind an English-only wall. That’s a huge bottleneck for a global community. My goal is to build a solid “engine” that lets the site speak any language.

I’m not just going to “translate words” ,I’m going to build the infrastructure so that when a user from France or India visits, the site automatically knows to show them the French or Hindi version. This means hooking up our React/Node.js stack to the Weblate translation server so the community can start translating right away.


The Technical Roadmap

1. Choosing the Tools (i18next + TypeScript)

I’m going with i18next. Why? Because it’s the GOAT for React apps. It handles things like “namespaces” (so we don’t load one giant file) and it plays nice with TypeScript. Since the project is in TS, I’ll set up “type-safe” keys. This way, if I make a typo in a translation key, the code will literally tell me it’s broken before I even commit it.

2. Fixing the “Language Flash” (Server-Side Logic)

This is the cool part. I noticed in src/server/app.js how we use middleware to pass things like siteRevision to the site. I’m going to do the same for language.

I’ll write a custom middleware that looks at the user’s Accept-Language header. Before the server sends the HTML to the browser, it’ll already have the right language loaded. This stops that annoying “flicker” where the site starts in English and then jumps to another language halfway through.

3. Needs Cleanup:

The code is currently full of hardcoded strings like <h1>Search</h1>. I’m going to use a tool to scan the whole src/client folder and pull all that text out into JSON files.

  • Strategy: I’ll start with the “easy” stuff like the Footer (src/client/components/footer.tsx) and the About page.

  • Hard Part: I’ll then move to the Unified Form (the editor). This is tricky because it has a lot of dynamic messages and tooltips. I’ll make sure these use “interpolation” (like Welcome, {{name}}) so the grammar stays correct in every language.

4. Connecting to Weblate

MetaBrainz already has a Weblate server at translations.metabrainz.org. I’m going to:

  1. Setup a new project for BookBrainz there.

  2. Link our GitHub repo so that whenever I add a new string to the code, it automatically pops up for translators on Weblate.

  3. I will make sure when they finish translating, the site pulls those new files back into the repo.


(Timeline)

Phase 1: Foundation & Backend (Weeks 1-3)

  • Week 1: i will get i18next installed and configured. Setup the TypeScript types so we don’t have “opaque” errors later.

  • Week 2: i will build the Node.js middleware. Get the server-side language detection working try to be 100%(or nearly ).

  • Week 3: i will connect the repo to Weblate and test the “round-trip”.. (Code → Weblate → Code).

Phase 2: The Migration (Weeks 4-6)

  • Week 4: I would start sweeping and Migrate the Header, Footer, and Sidebar strings.

  • Week 5: I would move all the text from the Static pages (About, Help, FAQ, Guidelines).

  • Week 6: I will Tackle the Entity pages and the Search interface.

Phase 3: The Editor & Polish (Weeks 7-8)

  • Week 7: I will focus strictly on the Unified Form. This is the heart of the site, and it needs to be perfect for global editors.

  • Week 8: Final testing. I’ll check how it handles dates (like DD/MM/YYYY vs MM/DD/YYYY) and numbers. Wrap it up with a “How-To” guide for future devs.


Why I’m the Right Choice

I’m already in the trenches with the Edition Table of Contents ticket, so I’ve been reading through the src/client and src/server folders daily. I know how the components talk to each other.

I don’t like over-complicating things. My approach is to keep the code transparent and readable no “black box” magic. I’m comfortable with the React/TS/Node stack and I’m ready to put in the hours to make sure BookBrainz can finally talk to the whole world