-
Notifications
You must be signed in to change notification settings - Fork 4
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 db update #132
Conversation
core_backend/migrations/versions/1ff08438751b_add_language_table.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this - really nice code and logic and tests!
Two points re. default language:
- Check out the comment on the "edit_language" router - I think that should be fixed to avoid causing a situation where there is no default language.
- Maybe we also add some logic onto the "create_language" endpoint to ensure there is always a default language?
…le.py Co-authored-by: Amir Emami <[email protected]>
Co-authored-by: Amir Emami <[email protected]>
Co-authored-by: Amir Emami <[email protected]>
About checking for a default language, we are already adding a default language in the migrations, so it shouldn't be an issue. So I suggest we keep it like this now and when we will build the language for frontend we will add the logic, by for example creating the language at launch if there is no language in the DB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
* Add language table and routes as well as tests * Add english as default language in migration * Fix typos * Update core_backend/migrations/versions/1ff08438751b_add_language_table.py Co-authored-by: Amir Emami <[email protected]> * Update core_backend/app/languages/models.py Co-authored-by: Amir Emami <[email protected]> * Update core_backend/app/languages/schemas.py Co-authored-by: Amir Emami <[email protected]> * Fix comments * Fix typos --------- Co-authored-by: Amir Emami <[email protected]>
Reviewer: @amiraliemami
Estimate: 1h
Ticket
Fixes: AAQ-382
Description, Motivation and Context
Goal
This PR is the first official PR as part of the multilingual support. The goal is to add the language table as well as the routes to be able to run CRUD operations.
Changes
Added a language submodule with the following files:
Added tests for languages
Also, since we are not planning on building a frontend for the languages yet, added english as the default language in the migration script.
How has this been tested?
This has been tested by manually testing the endpoints one by one and updating the tests.
Checklist
Fill with
x
for completed. Delete any lines that are not relevant