mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Merge "Show notification when document is recovered (or fails)"
This commit is contained in:
commit
b3adaa5fc1
|
@ -577,6 +577,10 @@
|
|||
"parentheses",
|
||||
"tooltip-minoredit",
|
||||
"tooltip-watch",
|
||||
"visualeditor-autosave-not-recovered-text",
|
||||
"visualeditor-autosave-not-recovered-title",
|
||||
"visualeditor-autosave-recovered-text",
|
||||
"visualeditor-autosave-recovered-title",
|
||||
"visualeditor-diff-no-changes"
|
||||
],
|
||||
"targets": [
|
||||
|
|
|
@ -69,6 +69,10 @@
|
|||
"tooltip-ca-editsource": "Edit the source code of this page",
|
||||
"tooltip-ca-ve-edit": "Edit this page",
|
||||
"visualeditor-advancedsettings-tool": "Advanced settings",
|
||||
"visualeditor-autosave-not-recovered-text": "Your unsaved changes could not be recovered.",
|
||||
"visualeditor-autosave-not-recovered-title": "Change recovery failed",
|
||||
"visualeditor-autosave-recovered-text": "Your unsaved changes have been automatically recovered.",
|
||||
"visualeditor-autosave-recovered-title": "Changes recovered",
|
||||
"visualeditor-backbutton-tooltip": "Go back",
|
||||
"visualeditor-beta-label": "beta",
|
||||
"visualeditor-beta-warning": "If you encounter any technical issues as you edit, please report them.",
|
||||
|
|
|
@ -82,6 +82,10 @@
|
|||
"tooltip-ca-editsource": "Tooltip of the {{msg-mw|Visualeditor-ca-editsource}} tab, used if the page already exists.\n\nSee also:\n* {{msg-mw|Tooltip-ca-createsource}} - tooltip of the {{msg-mw|Visualeditor-ca-createsource}} tab, used if the page does not exist",
|
||||
"tooltip-ca-ve-edit": "Tooltip of the dedicated VisualEditor \"Edit\" tab.\n{{Identical|Edit this page}}",
|
||||
"visualeditor-advancedsettings-tool": "Tool for opening the advanced settings section of the meta dialog.\n{{Identical|Advanced settings}}",
|
||||
"visualeditor-autosave-not-recovered-text": "Text shown when document recovery fails",
|
||||
"visualeditor-autosave-not-recovered-title": "Title shown when document recovery fails",
|
||||
"visualeditor-autosave-recovered-text": "Text shown when document recovery is successful",
|
||||
"visualeditor-autosave-recovered-title": "Title shown when document recovery is successful",
|
||||
"visualeditor-backbutton-tooltip": "Tooltip text for back button taking user to reading mode and closing the editor.\n{{Identical|Go back}}",
|
||||
"visualeditor-beta-label": "Text of tool in the toolbar that highlights that VisualEditor is still in beta.\n{{Identical|Beta}}",
|
||||
"visualeditor-beta-warning": "Note shown when user clicks on the 'help' label in the editor, asking users to report any technical issues they encounter in the software.",
|
||||
|
|
|
@ -469,9 +469,15 @@ ve.init.mw.ArticleTarget.prototype.surfaceReady = function () {
|
|||
change.applyTo( surfaceModel );
|
||||
surfaceModel.breakpoint();
|
||||
} );
|
||||
mw.notify( ve.msg( 'visualeditor-autosave-recovered-text' ), {
|
||||
title: ve.msg( 'visualeditor-autosave-recovered-title' )
|
||||
} );
|
||||
} catch ( e ) {
|
||||
// TODO: Something went wrong re-applying the transactions - tell the user
|
||||
mw.log.warn( 'Failed to restore auto-saved session: ' + e );
|
||||
mw.notify( ve.msg( 'visualeditor-autosave-not-recovered-text' ), {
|
||||
title: ve.msg( 'visualeditor-autosave-not-recovered-title' ),
|
||||
type: 'error'
|
||||
} );
|
||||
}
|
||||
} else {
|
||||
// ...otherwise store this document state for later recovery
|
||||
|
|
Loading…
Reference in a new issue