From c505b92254616df99c0a58065365ae893675027e Mon Sep 17 00:00:00 2001 From: ac-mmi Date: Wed, 17 Sep 2025 22:19:21 +0530 Subject: [PATCH 1/2] Add Week 12 Report by Aman Chadha --- .../posts/dmp-25-AmanChadha-week12.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 src/constants/MarkdownFiles/posts/dmp-25-AmanChadha-week12.md diff --git a/src/constants/MarkdownFiles/posts/dmp-25-AmanChadha-week12.md b/src/constants/MarkdownFiles/posts/dmp-25-AmanChadha-week12.md new file mode 100644 index 00000000..4de6590a --- /dev/null +++ b/src/constants/MarkdownFiles/posts/dmp-25-AmanChadha-week12.md @@ -0,0 +1,93 @@ +--- +title: "DMP '25 Week-12 Report by Aman Chadha" +excerpt: "Concluding my DMP '25 project: Migrating Music Blocks’ localization from webL10n.js to i18next and building an AI-assisted translation system with contextual support." +category: "DEVELOPER NEWS" +date: "2025-09-08" +slug: "2025-09-08-dmp-25-aman-chadha-week12" +author: "@/constants/MarkdownFiles/authors/aman-chadha.md" +tags: "dmp25,sugarlabs,finalreport,aman-chadha" +image: "assets/Images/c4gt_DMP.png" +--- + + + +# Final Report by Aman Chadha + +Project: [JS Internationalization with AI Translation Support](https://github.com/sugarlabs/musicblocks/pull/4731) +Mentors: [Walter Bender](https://github.com/walterbender), [Devin Ulibarri](https://github.com/devinulibarri) +Duration: July – September 2025 + +--- + +## Project Overview + +The aim of this project was to modernize the internationalization (i18n) system of Music Blocks by migrating from the legacy `webL10n.js` framework to i18next, and to introduce an AI-assisted translation workflow to reduce the burden on human translators. + +Key goals included: +- Making the i18n workflow cleaner, modular, and maintainable. +- Automating missing translations with AI + context-awareness. +- Supporting community-driven refinements of translations. + +--- + +## Achievements + +1. Migration from webL10n.js to i18next + - Replaced outdated framework with i18next for modern i18n support. + - Added flexible fallback strategies (cleaned text, lowercase, title case, hyphenated). + - Enabled JSON-based translation files for better maintainability. + +2. AI-Assisted Translation System + - Designed a pipeline to parse `.po` files and extract `msgid`s. + - Generated context automatically by analyzing where each string occurs in the codebase. + - Built a RAG (Retrieval-Augmented Generation) model to store these contexts. + - Integrated Google Translate API to auto-fill missing translations using this context. + +3. Contributor-Friendly Workflow + - Human translators can review AI-generated suggestions instead of starting from scratch. + - New language files can be created or updated automatically. + - Significantly lowers the barrier for contributors to help Music Blocks reach more learners. + +--- + +## Challenges & Solutions + +- Challenge: Extracting meaningful context for each translation key. + Solution: Implemented a RAG approach that links `msgid`s to their source code usage. + +- Challenge: Ensuring migration didn’t break existing functionality. + Solution: Incremental testing with sample `.json` files and stepwise replacement of webL10n. + +--- + +## Key Learnings + +- Infrastructure-level improvements (like i18n) may not be flashy, but they unlock global accessibility. +- Context is essential for high-quality translations — raw machine translation alone isn’t enough. +- Clean migration strategy + thorough testing makes adoption smoother for the community. + +--- + +## Future Work + +- Add support for more AI translation providers (e.g., DeepL, OpenAI). +- Build a simple web-based review UI for translators to accept/refine AI suggestions. +- Automate detection of new/changed strings via GitHub Actions and update translation files dynamically. + +--- + +## Closing Thoughts + +This project was a unique opportunity to contribute infrastructure that strengthens Music Blocks for a global user base. By combining modern i18n practices with AI translation support, I hope this work helps learners worldwide access Music Blocks in their own languages with greater ease. + +I’m deeply grateful to my mentors Walter and Devin, and to the Sugar Labs community, for their support and guidance throughout this journey. + +--- + +## Resources & References + +- Music Blocks Repository: [github.com/sugarlabs/musicblocks](https://github.com/sugarlabs/musicblocks) +- GitHub PR: [#4731](https://github.com/sugarlabs/musicblocks/pull/4731) +- i18next Documentation: [i18next.com](https://www.i18next.com/) + +--- From 5b6e6f91c3ed3afd135cfafe6d682ef4205b00a6 Mon Sep 17 00:00:00 2001 From: "Aman Chadha(IVIXMMI)" <79802170+ac-mmi@users.noreply.github.com> Date: Thu, 16 Oct 2025 22:52:21 +0530 Subject: [PATCH 2/2] Revise DMP '25 Week-12 Report by Aman Chadha Updated the week-12 report with project details, achievements, challenges, and future work. --- .../MarkdownFiles/posts/dmp-25-AmanChadha-week12.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/constants/MarkdownFiles/posts/dmp-25-AmanChadha-week12.md b/src/constants/MarkdownFiles/posts/dmp-25-AmanChadha-week12.md index 4de6590a..cc96be7e 100644 --- a/src/constants/MarkdownFiles/posts/dmp-25-AmanChadha-week12.md +++ b/src/constants/MarkdownFiles/posts/dmp-25-AmanChadha-week12.md @@ -6,7 +6,7 @@ date: "2025-09-08" slug: "2025-09-08-dmp-25-aman-chadha-week12" author: "@/constants/MarkdownFiles/authors/aman-chadha.md" tags: "dmp25,sugarlabs,finalreport,aman-chadha" -image: "assets/Images/c4gt_DMP.png" +image: "assets/Images/c4gt_DMP.webp" --- @@ -62,7 +62,7 @@ Key goals included: ## Key Learnings -- Infrastructure-level improvements (like i18n) may not be flashy, but they unlock global accessibility. +- Infrastructure-level improvements (like i18n) may not be flashy, but they unlock the potential for users from around the world to have access to the program. - Context is essential for high-quality translations — raw machine translation alone isn’t enough. - Clean migration strategy + thorough testing makes adoption smoother for the community. @@ -91,3 +91,4 @@ I’m deeply grateful to my mentors Walter and Devin, and to the Sugar Labs comm - i18next Documentation: [i18next.com](https://www.i18next.com/) --- +