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

Translate 404, 500, 422 errors pages #9532

Conversation

jibees
Copy link
Contributor

@jibees jibees commented Aug 8, 2022

What? Why?

Closes #9492

What should we test?

  • The aim is to test the errors page, they should be the same as previous by default, and can now be translated via keys:
    • .errors.(not_found|internal_server_error|unprocessable_entity).title for the title,
    • .errors.(not_found|internal_server_error|unprocessable_entity).message_html for the content of the page
  • Errors pages can be access via /404, /500 and /422 and I can imagine that they should be displayed if any errors (type 404, 500, 422) occurs.

Release notes

Changelog Category: User facing changes

@jibees jibees self-assigned this Aug 8, 2022
Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

Great! I just thought of one little issue.

public/500.html Outdated Show resolved Hide resolved
in case of critical problems when application cannot respond
@jibees jibees force-pushed the 9492-translate-404,-500,-422-errors-pages branch from 94eb9e8 to f474947 Compare August 11, 2022 09:41
@jibees jibees requested a review from mkllnk August 11, 2022 09:42
@filipefurtad0 filipefurtad0 self-assigned this Aug 17, 2022
@filipefurtad0 filipefurtad0 added the pr-staged-uk staging.openfoodnetwork.org.uk label Aug 17, 2022
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Aug 17, 2022

Yaayy the 😸 is back!

On the pics below:

  • left staging-FR, master staged
  • right staging-UK this PR staged

image

image

image

Some comments

  • from the pics above, it can be seen that before staging the URLs /500 /404 /422 all trigger a 404 error in the console;

  • after staging we can see that the URLs /500 /404 /422 trigger the respective error in the console ✔️

  • The pages render correctly so think these can be translated into other languages once the locales have been updated ✔️

  • It was also verified that these files are correctly displayed, when the respective errors are triggered in the app ✔️

    • 404 - OK
    • 500 - OK
    • 422 - err I'm not sure how to catch this one any more...

This all looks good to me - thanks @jibees ! 🎉

@filipefurtad0 filipefurtad0 merged commit f28c523 into openfoodfoundation:master Aug 17, 2022
@filipefurtad0 filipefurtad0 removed the pr-staged-uk staging.openfoodnetwork.org.uk label Aug 17, 2022
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.

[Missing translation] OFN's error page aka the snail
3 participants