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

Hardcoded dismissible Dialog button text #543

Closed
surajeaton opened this issue Feb 1, 2024 · 2 comments · Fixed by #557
Closed

Hardcoded dismissible Dialog button text #543

surajeaton opened this issue Feb 1, 2024 · 2 comments · Fixed by #557
Assignees
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering bug Something not working as expected
Milestone

Comments

@surajeaton
Copy link
Contributor

Describe the bug / expected behavior

Hardcoded dismissible Dialog button text (Okay)

What are the steps to reproduce?

  1. cd login-workflows
  2. yarn start:example
  3. Throw error from login action / Uncomment
  4. Remove error display config in Login screen (currently it is set to use error message box) / Comment this block
  5. Click on Debug button and change the language other than English
  6. Enter email and password in login page
  7. Click Login button
  8. See the error dialog has Okay button still in English

Screenshots / Screen recording

Screenshot 2024-02-01 at 1 42 51 PM

Code snippet / Link to minimum reproduction example

CODE HERE

Your environment information

Suggested fix

Replace hard coded text with internationalization key for Okay

Anything else to add?

@surajeaton surajeaton added bug Something not working as expected needs-review Issues that we would like to revisit/review brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering labels Feb 1, 2024
@surajeaton surajeaton removed the needs-review Issues that we would like to revisit/review label Feb 14, 2024
@surajeaton
Copy link
Contributor Author

surajeaton commented Feb 14, 2024

Pass the translation key from the component, which is using BasicDialog component.
Also remove hardcoded 'Okay' text from the button.
Make dismissButtonText prop as required.

@surajeaton surajeaton added this to the 4.0.3 milestone Feb 14, 2024
@joebochill
Copy link
Collaborator

Let's leave the default, since the Basic Dialog is a base component. We just need to make sure that wherever we are using it we are passing in a value for that prop that uses a key from the translation dictionary so it gets translated.

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
Development

Successfully merging a pull request may close this issue.

3 participants