Glaisher has uploaded a new change for review.
https://gerrit.wikimedia.org/r/303771
Change subject: tux: Use i18n message for unknown errors in save attempts
......................................................................
tux: Use i18n message for unknown errors in save attempts
Change-Id: I6a3bd9f2e9f4c15c08238121095306ca15a91a9c
---
M Resources.php
M i18n/core/en.json
M i18n/core/qqq.json
M resources/js/ext.translate.editor.js
4 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate
refs/changes/71/303771/1
diff --git a/Resources.php b/Resources.php
index d785d74..ee885c1 100644
--- a/Resources.php
+++ b/Resources.php
@@ -109,6 +109,7 @@
'tux-status-saving',
'tux-status-translated',
'tux-status-unsaved',
+ 'tux-save-unknown-error',
'tux-warnings-hide',
'tux-warnings-more',
'spamprotectiontext',
diff --git a/i18n/core/en.json b/i18n/core/en.json
index d8446e2..5f0e514 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -313,6 +313,7 @@
"tux-status-translated": "Translated",
"tux-status-saving": "Saving...",
"tux-status-unsaved": "Unsaved",
+ "tux-save-unknown-error": "Unknown error occurred.",
"tux-editor-placeholder": "Your translation",
"tux-editor-editsummary-placeholder": "Optional summary",
"tux-editor-paste-original-button-label": "Paste source text",
diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json
index 6783ed0..c5929cb 100644
--- a/i18n/core/qqq.json
+++ b/i18n/core/qqq.json
@@ -344,6 +344,7 @@
"tux-status-translated": "Status label in [[Special:Translate]]
indicating that a message is translated. An adjective that refers to a
message.\n{{Identical|Translated}}",
"tux-status-saving": "Status label in [[Special:Translate]] indicating
that the translation is being saved.\n{{Identical|Saving}}",
"tux-status-unsaved": "Status label in [[Special:Translate]] indicating
that the translation is not saved yet.",
+ "tux-save-unknown-error": "Error message shown on [[Special:Translate]]
when an unknown error occurs while attempting to save the translation.",
"tux-editor-placeholder": "Placeholder text for the translation editor
textbox",
"tux-editor-editsummary-placeholder": "Placeholder text for the
translation editor's edit summary box",
"tux-editor-paste-original-button-label": "Label for a button that
pastes the text in the source language to the translation editor.",
diff --git a/resources/js/ext.translate.editor.js
b/resources/js/ext.translate.editor.js
index 6b238a8..2b2ffeb 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -225,11 +225,13 @@
) {
translateEditor.onSaveFail(
editResp.warning );
} else {
- translateEditor.onSaveFail( 'Unknown
error occured.' );
+ translateEditor.onSaveFail( mw.msg(
'tux-save-unknown-error' ) );
mw.log( response, xhr );
}
} ).fail( function ( errorCode, response ) {
- translateEditor.onSaveFail( response.error &&
response.error.info || 'Unknown error' );
+ translateEditor.onSaveFail(
+ response.error && response.error.info
|| mw.msg( 'tux-save-unknown-error' )
+ );
if ( errorCode === 'assertuserfailed' ) {
window.alert( mw.msg(
'tux-session-expired' ) );
}
--
To view, visit https://gerrit.wikimedia.org/r/303771
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a3bd9f2e9f4c15c08238121095306ca15a91a9c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits