Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | /** |
17 | 17 | * Version number used in extension credits and in other placed where needed. |
18 | 18 | */ |
19 | | -define( 'TRANSLATE_VERSION', '2012-01-09' ); |
| 19 | +define( 'TRANSLATE_VERSION', '2012-01-13' ); |
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Extension credits properties. |
— | — | @@ -180,6 +180,7 @@ |
181 | 181 | 'translate-messagereview-failure', |
182 | 182 | 'translate-messagereview-done', |
183 | 183 | 'api-error-badtoken', |
| 184 | + 'api-error-emptypage', |
184 | 185 | 'api-error-fuzzymessage', |
185 | 186 | 'api-error-invalidrevision', |
186 | 187 | 'api-error-owntranslation', |
Index: trunk/extensions/Translate/resources/ext.translate.quickedit.js |
— | — | @@ -164,7 +164,11 @@ |
165 | 165 | dataType: 'json', |
166 | 166 | success: function(json) { |
167 | 167 | 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 | + } |
169 | 173 | } else if ( json.edit.result === 'Failure' ) { |
170 | 174 | alert( mw.msg( 'translate-js-save-failed' ) ); |
171 | 175 | } else if ( json.edit.result === 'Success' ) { |