-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add confirmation dialog when switching target lang with unsaved changes #51
Conversation
d49281a
to
8613a52
Compare
When a user switches the target language but has unsaved changes in the translation form, show a dialog box asking if they're sure they want to lose their work. Bug: https://phabricator.wikimedia.org/T207199
8613a52
to
8685257
Compare
@@ -29,6 +29,8 @@ | |||
"default-language": "Default language", | |||
"source-lang-not-found": "Untranslated. Default: $1", | |||
"source-to-target": "to", | |||
"confirmation-to-switch-target-lang": "You are trying to change the translation language but you have unsaved translations. Changing the language will result in loss of any added translations. Please upload the translations to Commons or download the translated file before proceeding. Do you wish to continue?", | |||
"confirm-change-target-lang": "Change language", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we duplicate the translations in /i18n/ here in /public/assets/i18n?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use a symlink instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, becuase one of the copied dirs is node_modules/jquery.uls/i18n
which doesn't exist in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on my local!
I had a question about duplicating the /i18n/ translations to /public/assets/i18n/, but that's unrelated to this PR.
When a user switches the target language but has unsaved changes in
the translation form, show a dialog box asking if they're sure they
want to lose their work.
Bug: https://phabricator.wikimedia.org/T207199