Skip to content

Fix: alert handler locale issue

What does this MR do and why?

Our alert_handler binds event with aria-label and CSS selector, but the alert HTML contains aria-label with translations, for example, when the user uses Chinese as preferred language, the aria-label will be 关闭 in Chinese, but the select is still Dismiss, therefore the query selector cannot be used to select element for binding events.

Screenshots

Issued code

CleanShot_2023-01-09_at_10.15.49_2x

Rendering code

CleanShot_2023-01-09_at_10.59.32_2x

You can see that the dismissLabel is using __('Dismiss') to translate.

/cc @prajnamas @icbd @orozot @qk44077907

Describe in detail what your merge request does and why.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports