Work Report: My Google Summer of Code Experience with Drupal

Organization: Drupal Association

Azhar Khan
6 min readAug 24, 2024

Project Repository & Demo:

Drupal @GSoC

Introduction

Participating in Google Summer of Code 2024 has been a transformative experience, giving me the opportunity to dive deep into the Drupal ecosystem and make meaningful contributions to the Drupal Localization Client project. This journey has been filled with learning, challenges, and significant milestones, all supported by the guidance of my mentors.

In this article, I will provide a comprehensive overview of my project, the work I completed, the challenges I encountered, and the skills I developed. Whether you’re familiar with Drupal or just curious about the Google Summer of Code process, I hope this report offers valuable insights.

What is the Localization Client Module?

The Localization Client module (l10n_client) is a vital component within Drupal that simplifies the process of translating website interfaces. Its key features include:

  • AJAX On-Page Editor: This feature allows contributors to translate interface strings directly on the web pages they are viewing, making the process more intuitive and efficient.
  • String Management: The module offers a centralized overview of all interface strings, which helps in managing and tracking translations across the entire site.
  • l10nSeamless Server Integration: One of the most significant aspects of this project was establishing a reliable connection between the client and server. This integration enables translated strings to be submitted directly from the client to the server, streamlining the workflow for contributors and ensuring that translations are consistently updated across the site.
Translation Interface

During my Google Summer of Code project, my primary focus was on enhancing this module by setting up REST endpoints on the localization server and adapting the Localization Client module for compatibility with Drupal 10. A key objective was to ensure that the client-side application could communicate seamlessly with the server, enabling real-time translation submissions.

My Journey with Drupal: From Novice to Developer

When I first encountered Drupal, I was a complete beginner. I didn’t know anything about the platform, but thanks to the guidance of my mentor, Aastha Shrivastava, I quickly started learning. I began by developing basic modules and gradually advanced to more complex tasks like building a fully functional Blog site with CRUD operations. The learning curve was steep, and I faced numerous challenges along the way.

One of the biggest hurdles was dealing with errors and issues. In the beginning, whenever I encountered a problem, I would often delete the entire site and start from scratch. I created more than five different sites during this process! Although it was frustrating at times, this trial-and-error approach helped me gain a deep understanding of how Drupal works. Now, I’m confident in my ability to troubleshoot and resolve issues without needing to start over.

Throughout this journey, I learned how to create custom modules, develop plugins, and install third-party modules. More importantly, I developed a strong foundation in PHP, CRUD operations, database management, Drupal standards, JavaScript, version control, and Postman — all of which were crucial for my work on the localization project.

Week 1–2: Diving into Drupal and Understanding the Localization Project

Setup and Initial Understanding:

  • Introduced to the project goals and familiarized myself with the Localization Client module.
  • Began setting up REST endpoints on the localization server, replacing the outdated XML-RPC system.

Week 3–4: My Journey Begins — Setting Up Localization and Exploring Drupal

Environment Setup and Early Contributions:

  • Set up the localization environment and began contributing to novice issues within the Drupal community.
  • Built a blog website in Drupal to solidify my understanding of the platform.
  • Developed a custom clock page module, which further enhanced my Drupal skills.
Real Time Clock Module

Week 5–6: Advancing My Journey — REST APIs, Localization, and Issue Resolution

REST API Integration:

  • Deepened my understanding of REST APIs through hands-on projects, including building a blog site with full CRUD operations.
  • Focused on resolving Issue #3395508: Init l10n_remote REST Endpoint, successfully implementing and testing the REST endpoint that would enable better client-server communication.

Week 7–8: Deepening My Drupal Journey — REST Endpoints and String Submission Challenges

  • Implemented the l10n_remote REST endpoint and learned to use Postman for testing and validating API requests.
  • Overcame challenges related to string submission by setting up and configuring authentication in Postman, ensuring that translations could be successfully submitted to the server.

Week 9–10: Finalizing the Project — Connecting the Client and Server Modules

Client-Server Integration:

  • The most significant achievement of my project was establishing a seamless connection between the client module and the server. Initially, the client was saving translations locally instead of submitting them to the server due to an authentication issue. After switching from OAuth to Basic Authentication and analyzing the code, I discovered that there was no existing logic for submitting translations to the server.
  • I implemented this logic by calling the sendTranslation function whenever a translation was saved locally. This solution ensured that translations were consistently submitted to the server, completing the key objective of my GSoC proposal.

Obstacles and Growth

  • Complexity of REST Endpoint Implementation: Transitioning from the outdated XML-RPC system to a modern REST/JSON approach posed significant technical challenges. Overcoming these hurdles deepened my understanding of API design and modern web services.
  • Client-Server Synchronization: Ensuring reliable client-server communication was a significant challenge, especially in maintaining data consistency. Successfully addressing these issues sharpened my problem-solving skills and expanded my knowledge of server-client interactions.
  • Enhanced Skill Set: Over the course of the project, I enhanced my skills in PHP, CRUD operations, databases, Drupal standards, JavaScript, version control, Postman, and Drupal module development, all of which were essential for completing the project.

Future Plans

Implement Single Sign-On (SSO): Moving forward, I plan to integrate an SSO system to streamline user authentication and enhance the contributor experience. This will allow users to access multiple Drupal services with a single set of credentials, improving both security and usability. This will be a critical enhancement for the Localization Client module, aligning it with modern standards and optimizing workflows.

SSO Integration workflow

Acknowledgments

I am deeply grateful to my mentors, Felip Manyer i Ballester (FMB), Thomas (TeeBeeCoder), and Aastha Shrivastava (Shriaas), for their unwavering support and guidance throughout my Google Summer of Code journey. Their expertise and encouragement were instrumental in helping me overcome challenges and achieve key milestones.

I also want to thank the Drupal community for fostering a collaborative and supportive environment, which greatly influenced the progress of the Localization Client project. Lastly, I appreciate the opportunity provided by Google Summer of Code to contribute to an open-source project like Drupal, which has been a pivotal experience in my growth as a developer.

--

--

Azhar Khan

Software Developer | GSoC'24 @Drupal | Actively pursuing mastery of the MERN stack