r108813 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108812‎ | r108813 | r108814 >
Date:15:05, 13 January 2012
Author:siebrand
Status:ok
Tags:
Comment:
Localise a likely error. Ping r108811.
Modified paths:
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/resources/ext.translate.quickedit.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/Translate.php
@@ -15,7 +15,7 @@
1616 /**
1717 * Version number used in extension credits and in other placed where needed.
1818 */
19 -define( 'TRANSLATE_VERSION', '2012-01-09' );
 19+define( 'TRANSLATE_VERSION', '2012-01-13' );
2020
2121 /**
2222 * Extension credits properties.
@@ -180,6 +180,7 @@
181181 'translate-messagereview-failure',
182182 'translate-messagereview-done',
183183 'api-error-badtoken',
 184+ 'api-error-emptypage',
184185 'api-error-fuzzymessage',
185186 'api-error-invalidrevision',
186187 'api-error-owntranslation',
Index: trunk/extensions/Translate/resources/ext.translate.quickedit.js
@@ -164,7 +164,11 @@
165165 dataType: 'json',
166166 success: function(json) {
167167 if ( json.error ) {
168 - alert( json.error.info + ' (' + json.error.code +')' );
 168+ if( json.error.code === 'emptypage') {
 169+ alert( mw.msg( 'api-error-emptypage' ) );
 170+ } else {
 171+ alert( json.error.info + ' (' + json.error.code +')' );
 172+ }
169173 } else if ( json.edit.result === 'Failure' ) {
170174 alert( mw.msg( 'translate-js-save-failed' ) );
171175 } else if ( json.edit.result === 'Success' ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108811Add 'api-error-emptypage'.siebrand14:47, 13 January 2012

Status & tagging log