mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
Merge "i18n for error messages"
This commit is contained in:
commit
f529c5ebbe
|
@ -40,6 +40,8 @@ $messages['en'] = array(
|
|||
'visualeditor-historybutton-undo-tooltip' => 'Undo',
|
||||
'visualeditor-historybutton-redo-tooltip' => 'Redo',
|
||||
'visualeditor-viewpage-savewarning' => 'Are you sure you want to go back to view mode without saving first?',
|
||||
'visualeditor-loadwarning' => 'Error loading data from server: $1. Would you like to retry?',
|
||||
'visualeditor-saveerror' => 'Error saving data to server: $1.',
|
||||
);
|
||||
|
||||
/** Message documentation (Message documentation)
|
||||
|
@ -76,6 +78,8 @@ $messages['qqq'] = array(
|
|||
'visualeditor-historybutton-undo-tooltip' => 'Tooltip for the undo button',
|
||||
'visualeditor-historybutton-redo-tooltip' => 'Tooltip for the redo button',
|
||||
'visualeditor-viewpage-savewarning' => 'Text shown when the user tries to leave the editor without saving their changes',
|
||||
'visualeditor-loadwarning' => 'Text shown when the editor fails to load properly. $1 is the error message from the server, in English.',
|
||||
'visualeditor-saveerror' => 'Text shown when the editor fails to save properly.',
|
||||
);
|
||||
|
||||
/** Asturian (asturianu)
|
||||
|
|
|
@ -275,6 +275,8 @@ $wgResourceModules += array(
|
|||
'visualeditor-historybutton-undo-tooltip',
|
||||
'visualeditor-historybutton-redo-tooltip',
|
||||
'visualeditor-viewpage-savewarning',
|
||||
'visualeditor-loadwarning',
|
||||
'visualeditor-saveerror',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
|
|
@ -168,7 +168,7 @@ ve.init.ViewPageTarget.prototype.onLoad = function( dom ) {
|
|||
* @param {Mixed} error Thrown exception or HTTP error string
|
||||
*/
|
||||
ve.init.ViewPageTarget.prototype.onLoadError = function( response, status, error ) {
|
||||
if ( confirm( 'Error loading data from server: ' + status + '. Would you like to retry?' ) ) {
|
||||
if ( confirm( ve.msg( 'visualeditor-loadwarning', status ) ) ) {
|
||||
this.load();
|
||||
} else {
|
||||
this.activating = false;
|
||||
|
@ -218,7 +218,7 @@ ve.init.ViewPageTarget.prototype.onSave = function( html ) {
|
|||
* @param {Mixed} error Thrown exception or HTTP error string
|
||||
*/
|
||||
ve.init.ViewPageTarget.prototype.onSaveError = function( response, status, error ) {
|
||||
alert( 'Error saving data to server: ' + status );
|
||||
alert( ve.msg( 'visualeditor-saveerror', status ) );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue