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

Set the UI language cookie #1717

Merged
merged 14 commits into from
Dec 12, 2024
Merged

Set the UI language cookie #1717

merged 14 commits into from
Dec 12, 2024

Conversation

joelit
Copy link
Contributor

@joelit joelit commented Dec 11, 2024

Reasons for creating this PR

Link to relevant issue(s), if any

Description of the changes in this PR

  • Fixed the navbar language menu
  • Added functionality for setting the language cookie
  • Added tests for setting and reading the language cookie

Known problems or uncertainties in this PR

  • The functionality in index.php and web controller seemed to be OK, they might need a tweak in this

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@joelit joelit self-assigned this Dec 11, 2024
@joelit joelit added this to the 3.0 milestone Dec 11, 2024
@joelit joelit requested review from osma and removed request for osma December 11, 2024 11:32
@joelit joelit marked this pull request as ready for review December 11, 2024 11:40
@joelit joelit requested a review from osma December 11, 2024 11:40
Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

I added some notes. At least the TTL of the cookie needs to be changed.

resource/js/navbar-ui-languages.js Outdated Show resolved Hide resolved
tests/cypress/template/navbar-languages.cy.js Show resolved Hide resolved
tests/cypress/template/navbar-languages.cy.js Show resolved Hide resolved
@joelit joelit requested a review from osma December 11, 2024 13:09
Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

Looks good now. I made a couple of minor additional suggestions for you to consider.

resource/js/navbar.js Outdated Show resolved Hide resolved
tests/cypress/template/navbar-languages.cy.js Show resolved Hide resolved
Copy link

sonarcloud bot commented Dec 12, 2024

@joelit joelit merged commit b44d677 into main Dec 12, 2024
10 of 11 checks passed
@joelit joelit deleted the issue1696-language-cookie branch December 12, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Issue/PR closed
Development

Successfully merging this pull request may close these issues.

Skosmos 3: Remember UI language using a SKOSMOS_LANGUAGE cookie
2 participants