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

Error in the dialog / message box does not translate #510

Closed
surajeaton opened this issue Nov 3, 2023 · 3 comments
Closed

Error in the dialog / message box does not translate #510

surajeaton opened this issue Nov 3, 2023 · 3 comments
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering bug Something not working as expected user-reported This was reported by a user outside the maintainers team.

Comments

@surajeaton
Copy link
Contributor

surajeaton commented Nov 3, 2023

Describe the bug / expected behavior

Server side error thrown is getting displayed in dialog or message box.
If the language other than English is selected, then the error message is not translating.

What are the steps to reproduce?

  1. cd login-workflows
  2. yarn start:example
  3. Change the language other than English using Debug button
  4. Throw error from login action (Uncomment this line )
  5. Enter any valid email id and password
  6. Click on login button
  7. The error thrown is still in English

Screenshots / Screen recording

Screenshot 2023-11-03 at 12 24 12 PM Screenshot 2023-11-03 at 12 23 10 PM

Code snippet / Link to minimum reproduction example

CODE HERE

Your environment information

Suggested fix

Anything else to add?

@surajeaton surajeaton added bug Something not working as expected needs-review Issues that we would like to revisit/review user-reported This was reported by a user outside the maintainers team. brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering labels Nov 3, 2023
@surajeaton surajeaton changed the title Error Dialog / Message Box Does not translate Error in the dialog / message box does not translate Nov 3, 2023
@surajeaton surajeaton added high-priority Issues that should be fixed sooner than later and removed high-priority Issues that should be fixed sooner than later labels Nov 3, 2023
@joebochill
Copy link
Collaborator

If the error is passed in English, we will display it in English. We are not doing dynamic real-time translations for unknown strings of text (everything we have translations for is pre-defined). If they want their error messages translated, they will need to translate their own error messages and pass them to us, e.g, throw(t('My Custom Error Message')).

I think we should be able to translate the button label though if they are using the default and not overriding it.

@joebochill
Copy link
Collaborator

We can also translate the default message and title on our side if we are not doing that.

@JeffGreiner-eaton
Copy link
Collaborator

completed in #516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering bug Something not working as expected user-reported This was reported by a user outside the maintainers team.
Development

No branches or pull requests

3 participants