Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilingual: List multilingual content #138

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

lickem22
Copy link
Contributor

Reviewer: @sidravi1

Estimate: 1h30


Ticket

AAQ-427:

Description, Motivation and Context

Goal

The goal of this PR is to update the frontend and the backend to be able to list multilingual contents.

Changes

The following changes have been made to the frontend:

  • Added language list to the content card
  • Added a dropdown list to "filter" contents by language. I put filter in quote because changing the language triggers a new call to the API rather than a frontend filtering.
  • Updated the landing page to look like the wireframe.

The following changes have been made to the backend:

  • Updated the database to support multilingual contents. I added in the languages migration file a query to create a first default language. Since adding a frontend for language management is out of scope for this feature, I did this temporary fix so the app don't crash.
  • Updated the models and different db connections to support multilingual support
  • Refactor the endpoints to support the new changes to the DB. I added all the CRUD endpoints to make testing easier since we cannot add a content using the frontend yet. These endpoints are subject to change and should be discarded for now ( appart from the endpoints relevant to this PR)
  • We agreed to create a view of the landing to make querying faster but I suggest we leave that for another ticket to have time to design the view properly.

How has this been tested?

I added different languages first then added content in different languages. Tested how they are listed on the frontend. Also tried filtering for different languages and searching for contents.
I disabled tests that will not work due to DB changes. I will updated them in a latter PR.

Checklist

Fill with x for completed. Delete any lines that are not relevant

  • My code follows the style guidelines of this project
  • I have reviewed my own code to ensure good quality
  • I have tested the functionality of my code to ensure it works as intended
  • I have resolved merge conflicts
  • I have updated the automated tests (if applicable)
  • I have updated the requirements (if applicable)
  • I have updated the README file (if applicable)
  • I have updated affected documentation (if applicable)

@lickem22 lickem22 changed the title Multilingual/list content Multilingual: List multilingual content Mar 26, 2024
Copy link
Collaborator

@suzinyou suzinyou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the APIs seem to work and tests ran.

@lickem22 lickem22 merged commit e963a1b into feature-multilingual Mar 27, 2024
3 checks passed
@amiraliemami amiraliemami deleted the multilingual/list-content branch April 24, 2024 19:58
@amiraliemami amiraliemami restored the multilingual/list-content branch April 24, 2024 19:58
@amiraliemami amiraliemami deleted the multilingual/list-content branch April 27, 2024 08:15
@amiraliemami amiraliemami restored the multilingual/list-content branch April 27, 2024 08:16
@amiraliemami amiraliemami deleted the multilingual/list-content branch April 27, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants