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

IA-3892: Add a link to login page + better handling back-end translations #1956

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

beygorghor
Copy link
Collaborator

@beygorghor beygorghor commented Feb 5, 2025

We need to add a learn more link on login page (linking to https://www.openiaso.com/).
This link should be customizable and not be displayed if unset.

Also Django translations are not well translated.
As used now in python files to return results to the frontend and not only in templates and text, we should improve the translation process and block CI if a translation is missing.

Related JIRA tickets : IA-3892

Self proofreading checklist

  • Did I use eslint and black formatters
  • Is my code clear enough and well documented
  • Are my typescript files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Doc

Changes

  • adapt settings.py to avoid errors with LOCALE_PATHS
  • wrote a script to make and test messages, using ignored path from a constant
  • adding some check on generated .PO files to check if a translation is missing
  • checking .po files using output of makemessage
  • wrote a script to compile messages using same ignored path as before
  • added a new ENV variable LEARN_MORE_URL
  • use this var to display or not a learn more link (also logo is a link) on the login page
  • modify automated tests to use those new scripts and fail if a translation is issing
  • adapt scss to make it pretty
  • adapt cypress tests

How to test

  • run python manage.py make_translations to generate .po files locally and run checks, it should pass

  • run python manage.py compile_translations to compile message

  • add LEARN_MORE_URL="https://www.openiaso.com/" to your .env file

  • go to login page, the link at the bottom should be visible and translated

  • logo should be clickable

  • remove the var, no more link or clickable logo

Edit ne of the .po file and delete one translation. Rerun python manage.py make_translations, it should fail

Same is happening on the CI, it's failing with missing translations : https://github.com/BLSQ/iaso/actions/runs/13163991120/job/36739556593

Print screen / video

Screenshot 2025-02-06 at 11 09 18

Notes

Things that the reviewers should know:

  • known bugs that are out of the scope of the PR
  • other trade-offs that were made
  • does the PR depends on a PR in bluesquare-components?
  • should the PR be merged into another PR?

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

@beygorghor beygorghor marked this pull request as draft February 5, 2025 13:49
@beygorghor beygorghor marked this pull request as ready for review February 6, 2025 10:31
@beygorghor beygorghor requested a review from mathvdh February 7, 2025 12:49
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.

1 participant