Skip to content
New issue

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

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

Already on GitHub? # to your account

Localize additional Problem messages #489

Open
1 of 3 tasks
matthew-white opened this issue Sep 20, 2023 · 0 comments
Open
1 of 3 tasks

Localize additional Problem messages #489

matthew-white opened this issue Sep 20, 2023 · 0 comments
Labels
frontend Requires a change to the UI i18n Internationalization

Comments

@matthew-white
Copy link
Member

matthew-white commented Sep 20, 2023

Many Backend Problems aren't shown in Frontend or are extreme edge cases. However, we want to localize Problem messages that are more likely to be shown in Frontend. That localization will be done in Frontend. From a quick look at lib/util/problem.js in Backend, I see a few messages that I think would be worth localizing:

  • 400.17. "The form you have uploaded attempts to change the type of the field at ${path}. …"
    • I this is only shown in the FormNew component in Frontend, so we could add an i18n message there.
  • 400.12. "Could not perform decryption. Double check your passphrase and your data and try again."
    • This is only shown in the SubmissionDownload component, so we could add an i18n message there.
  • 404.1. "Could not find the resource you were looking for."
    • This is shown if the user navigates to a resource that used to exist, but has since been deleted. Maybe the user bookmarked a page. This message is not specific to any particular component. Maybe we should handle it specially in requestAlertMessage() in Frontend.
    • Done in Show custom alert message for 404.1 Problem central-frontend#952

Whoever works on this issue should take another look at lib/util/problem.js for other Problems that would be worth localizing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
frontend Requires a change to the UI i18n Internationalization
Projects
None yet
Development

No branches or pull requests

1 participant