massenergize / api

Backend Code for Massenergize Portal. This provides the API to the backend database, and is shared by the various front-end portal projects.
MIT License
5 stars 8 forks source link

Feat: add translation middleware #1126

Closed abdullai-t closed 1 month ago

abdullai-t commented 2 months ago

Summary / Highlights

This PR introduces a new translation middleware to the API. The middleware is designed to handle language translation for incoming requests.

Details (Give details about what this PR accomplishes, include any screenshots etc)

Testing Steps (Provide details on how your changes can be tested)

Requirements (place an x in each [ ])

Transparency (Project board)
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 78.46154% with 14 lines in your changes missing coverage. Please review.

Project coverage is 55.74%. Comparing base (1e533e4) to head (93e3916). Report is 7 commits behind head on main.

Files Patch % Lines
.../task_queue/database_tasks/translate_db_content.py 72.22% 5 Missing :warning:
src/_main_/utils/translation/__init__.py 82.35% 3 Missing :warning:
src/api/middlewares/translation_middleware.py 82.35% 3 Missing :warning:
src/api/utils/api_utils.py 33.33% 2 Missing :warning:
src/_main_/utils/common.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1126 +/- ## ========================================== - Coverage 56.01% 55.74% -0.28% ========================================== Files 458 457 -1 Lines 33873 33690 -183 ========================================== - Hits 18975 18779 -196 - Misses 14898 14911 +13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.