Introduction
Greetings, everyone!
I am Garv Thakre (@garvthakre:matrix.org on Matrix), an Agentic-AI FullStack Developer . This summer, I had the opportunity to participate in Google Summer of Code 2026 with MetaBrainz, where I worked on the internationalization (i18n) for BookBrainz.
I was mentored by Nicolas Pelletier (@monkey:chatbrainz.org on Matrix). This post summarizes my project, its outcomes, and my experience over the course of the program.
Project Overview
BookBrainz aims to collect information about every book ever written, but until now, the interface was only in English. Since books exist in thousands of languages, having an English-only UI made it tough for non-English contributors to navigate, read, or add metadata.
My main goal this summer was to get BookBrainz ready for translation and set up the foundation so the community can actually start localizing it. Here is what that involved:
- Client-side setup: Integrated
react-i18nextto handle translations dynamically across the UI. - Locale detection: Built middleware to detect the user’s language based on browser headers, URL paths (like
/es/), or cookies. - Automate the workflow: Set up
i18next-parserto automatically extract translatable strings from TSX and JSX components and update JSON translation keys. - Weblate Integration: Configured the pipeline to sync our translation keys with the MetaBrainz Weblate instance, enabling the community to easily translate BookBrainz into multiple languages.
- Secure the codebase: Integrates a CI check to prevent hardcoded untranslated strings from being committed.
- Migrate key interfaces: Systematically refactored all core pages from user registration and search to detailed entity views and the complex Unified Form editor to make them translatable.
Project Deliverables & Milestones
1. Setting up the i18n infrastructure & automation
Before migrating pages, I needed an automated pipeline so developers wouldn’t have to manage translation keys manually or worry about breaking localized strings.
react-i18nextintegration: Addedi18nextandreact-i18nextto the frontend, utilizing theuseTranslationhook for dynamic strings and the<Trans>component to handle inline formatting without chopping up sentences.- Automated string extraction: Configured
i18next-parserto scan our TypeScript and JavaScript files. It searches for translation keys (e.g.,t('key')) and automatically extracts them into our primary translation template (en/translation.json), sorting them alphabetically to avoid merge conflicts. - Locale detection middleware: Wrote middleware to determine the user’s language preference by checking request headers, URL subdirectories (like
/es/), or cookies. - CI pipeline integration: Added a custom workflow in GitHub Actions that runs tests to ensure no translated keys are missing. If any raw, untranslated text is found in newly modified files, the CI build fails, protecting the codebase from future translation regression.
2. Migrating Core Layouts & Auth Pages
After completing the foundation, the next phase was migrating the most visible static content, navigation layouts, and user authentication components:
- Header & footer layouts: Refactored the main header, nav links, button bars, and footer so the base app shell pulls strings dynamically from our translation files and integrated i18next pluralization rules for active button bars.
- Static informational pages: Ported static informational pages like guidelines and “About” sections. Because these had long paragraphs, I broke them into clean, logical key structures rather than huge walls of text.
- User account workflows & error pages: Migrated login/registration pages, user profile edit pages, and core application error pages (like 404 and 500 errors), including localized validation checks.
3. Refactoring Entity Pages & Dynamic Relationships
BookBrainz revolves around connected metadata for various entities: Author, Work, Edition, Publisher, and Series. Migrating these details pages required refactoring complex dynamic structures:
- Entity display pages: Refactored the display components and metadata tables for all core entity types. This ensures fields like publisher details, release dates, and medium descriptions translate seamlessly based on the user’s selected language.
- Relationship view components: Refactored how relationships are displayed (e.g., showing that a Work is “written by” an Author or an Edition is a “translation of” another).
- Dynamic content interpolation: Solved challenges around injecting variable metadata (like entity names, dates, or external identifier badges) into translated sentences without breaking grammatical order across different languages.
- Entity merge & comparison views: Localized the complex side-by-side metadata comparisons shown when merging duplicate works, editions, or author profiles.
- Search pages & search admin: Refactored search result displays, search input fields, filters, and the search administration interface.
- User annotations & identifiers: Migrated sections displaying user-submitted annotations and external identifiers (like Wikidata and MusicBrainz links).
4. Localizing the Unified Form Editor
The Unified Form Editor is BookBrainz’s heaviest component—it handles multi-entity creation and editing across multiple tabs, making it the most complex part of the migration.
- Multi-tab interface: Refactored the entire editing flow, covering the Cover tab, Content tab, and the final Submission Summary screen.
- Interactive dynamic fields: Refactored complex interactive features, such as the dynamic ISBN input field validation, work-row additions, and author credit selectors.
- Create-entity modals: Localized helper modals (like the entity quick-creation popups and search-entity-create-select dropdowns) to guide contributors seamlessly as they input metadata.
- Deduplicating keys: Cleaned up overlapping translation keys across similar form inputs (like “Name”, “Title”, and “Role”) to avoid redundant translation work on Weblate.
Next Steps
With the core internationalization architecture now mostly integrated into the codebase, these are the immediate next steps to complete:
- Completing Weblate integration: Fully sync the extracted
translation.jsonfile with the MetaBrainz Weblate platform. This will allow community translators to translate BookBrainz via Weblate. - Migrating remaining pages: Finish migrating the few remaining pages and older legacy components that haven’t been fully refactored to use the translation pipeline yet
Pull Requests and Commits
You can view the full list of my pull requests, code contributions, and commits made during Google Summer of Code 2026 here:
- GitHub Link: My GSoC 2026 Pull Requests and Commits
Final Thoughts & Acknowledgements
This summer has been an incredibly rewarding journey. Working on Google Summer of Code with MetaBrainz has allowed me to dive deep into a large-scale React and TypeScript codebase, learn the complexities of designing and automating localization workflows, and participate in active open-source collaboration.
I want to extend my deepest gratitude to my mentor, Nicolas Pelletier aka Monkey , for his invaluable support, constructive feedback on my PRs, and patient guidance during our chats and code reviews. and really thankful for always answering my silly questions.
I would also like to thank the entire MetaBrainz community for creating such a welcoming and collaborative environment. I am excited to see BookBrainz support multiple languages soon and look forward to continuing my contributions to the project in the future!
REALLY THANKFUL AND WISHING GOOD LUCK TO THE WHOLE METABRAINZ TEAM.