You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It should only change the language and reload the window when the OK button was pressed, since done only means that the dialog was closed, and not that was accepted.
The reason will be displayed to describe this comment to others. Learn more.
I don't think you want to use the localized OK string to compare. Dialogs.DIALOG_BTN_OK is translated for each language so just compare to the non-localized version: "ok".
The reason will be displayed to describe this comment to others. Learn more.
Yep. I was thinking that Dialogs.DIALOG_BTN_OK was a translated string but it doesn't look like it is used consistently for the button ID. Some dialog templates use this value while others just use "ok" and the extension manager dialog checks against "ok" instead of the constant.
The reason will be displayed to describe this comment to others. Learn more.
Yes, Dialogs.DIALOG_BTN_OK = "ok" and is the constant that we should use for ok. The only problem I see with our code is that inside the templates we use "ok" instead of the constant. We should start changing this by passing the Dialogs constants to Mustache, so that it also renders that instead. But that should be part of a bigger cleanup.
The reason will be displayed to describe this comment to others. Learn more.
I don't see it as an issue in using data-button-id="ok" in the template. It is a non-localizable string used as an id for the element and not to be rendered in the UI.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #4750.
It should only change the language and reload the window when the OK button was pressed, since done only means that the dialog was closed, and not that was accepted.