Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/201689
Change subject: Warn users when leaving while a save is in progress ...................................................................... Warn users when leaving while a save is in progress Bug: T94567 Change-Id: I774c944bda0e61e7e74bf694e80a573ff6cb5942 --- M modules/translation/ext.cx.translation.progress.js 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/89/201689/1 diff --git a/modules/translation/ext.cx.translation.progress.js b/modules/translation/ext.cx.translation.progress.js index 88701da..7fe2c07 100644 --- a/modules/translation/ext.cx.translation.progress.js +++ b/modules/translation/ext.cx.translation.progress.js @@ -157,9 +157,12 @@ if ( mw.config.get( 'wgContentTranslationDatabase' ) !== null ) { if ( mw.cx.dirty ) { mw.hook( 'mw.cx.translation.save' ).fire(); + // If we leave the page immediately the above save may not happen. + // So, stay or leave? + return mw.msg( 'cx-warning-unsaved-translation' ); + } else { + return; } - - return; } weights = getTranslationWeights( getSectionsWithContent() ); -- To view, visit https://gerrit.wikimedia.org/r/201689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I774c944bda0e61e7e74bf694e80a573ff6cb5942 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits