Skip to content
Extraits de code Groupes Projets
Valider 5f088d21 rédigé par Kilian Ury's avatar Kilian Ury
Parcourir les fichiers

Projet report- Kilian Ury

parent 96721b6c
Branches master
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# **LINFO2401 project report - Contributing to an Open Source project: Opsdroid**
| **Author** | Kilian Ury |
| ----------------------- | -----------------------------------------------------------------------------------------------|
| **Date** | 01/12/2024 |
| **NOMA** | 12291800 |
| **Academic Year** | 2024-2025 |
| **Open Source Project** | [opsdroid](https://github.com/opsdroid/opsdroid) |
| **Pull request made** | [Update French translations in opsdroid.po](https://github.com/opsdroid/opsdroid/pull/2047) |
| **License** | [Apache License 2.0](https://github.com/opsdroid/opsdroid/blob/main/LICENSE) |
## Project: Opsdroid
Opsdroid is an open-source chatbot framework written in Python that allows developers to create, deploy, and manage conversational bots. The framework provides:
- Connectors to integrate bots with various messaging platforms like Slack, Telegram, Matrix, and Microsoft Teams.
- Modules to add functionality, including integration with external APIs (e.g., weather services) and natural language processing (NLP) tools like Rasa NLU or Dialogflow.
- Flexibility to extend bots for handling tasks like interacting with databases (MySQL), CMS systems (WordPress), and custom APIs.
Opsdroid's modular architecture and welcoming community made it a perfect choice for my first open-source contribution.
## Why I Chose Opsdroid
I chose Opsdroid because:
- Ease of Extensibility: It offers modular design, making it easy to add new skills or connectors.
- Well-Documented: The project includes extensive documentation and tutorials, which simplified the onboarding process.
- Community: The maintainers are responsive and open to new contributors.
Additionally, Opsdroid provides a practical environment for experimenting with Python and APIs, a combination I was eager to explore.
## Exploring Opsdroid Locally
I began by cloning the Opsdroid repository and setting up the project locally.
Following the official documentation, I installed the necessary dependencies and ran Opsdroid locally. This allowed me to experiment with various skills and connectors:
[opsdroid documentation](https://docs.opsdroid.dev/en/stable/quickstart.html)
- Weather API Skill: I added a skill to fetch weather updates using the OpenWeatherMap API.
- Currency Conversion API: Another skill I added provided real-time currency exchange rates.
These experiments helped me understand how Opsdroid interacts with APIs and responds to user inputs.
## Contribution: Improving French Translations
### Identifying Translation Issues
While exploring Opsdroid, I noticed that some French translations were either missing or incorrect in the opsdroid.po file located in locale/fr/LC_MESSAGES/.
Examples:
- Incorrect translations of technical terms.
- Missing translations for newly added features.
- Outdated line references in the .po file.
### Tools Used
- Poedit: A user-friendly software that simplifies managing and updating .po files.
- Gettext: I used this tool to extract translatable strings and generate updated .pot templates.
Extract translatable strings from Python files :
find . -name '*.py' -printf '%P\n' > listfile.txt
Generate a POT template file from Python files
xgettext -d messages -o locale/messages.pot --language=Python --from-code=UTF-8 -f listfile.txt
### Updating Translations
- Loaded the opsdroid.po file in Poedit.
- Updated the file with accurate translations for missing and incorrect entries.
- Ensured the file was synchronized with the latest .pot template to reflect accurate line numbers.
## Submitting a Pull Request
Once the translations were completed, I:
- Forked the original Opsdroid repository and committed my changes.
- Created a pull request (PR) with a detailed explanation of the changes and referenced relevant issues.
I ensured that the PR description was clear to facilitate review by the maintainers.
## Journal
Week 1: Discovering Opsdroid
- Discovered Opsdroid through GitHub’s “Good First Issues” section.
- Explored the documentation and understood the project’s architecture.
Week 2: Local Setup & Experimentation
- Set up Opsdroid locally.
- Added custom skills and connected to external APIs.
Week 3: Translation Contribution
- Identified and fixed issues in the French translations using Poedit and Gettext.
- Submitted a pull request for review.
## Conclusion
Contributing to Opsdroid has been a rewarding experience. It taught me:
- How to navigate open-source projects and follow community guidelines.
- The importance of communication when interacting with maintainers and fellow contributors.
- Technical skills like managing localization files and using translation tools like Poedit and Gettext.
This experience has inspired me to continue contributing to open-source projects and improving my skills in collaborative software development.
This journey has been invaluable, and I look forward to making more contributions to the open-source community.
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter