Matthias Mullie has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/362197 )
Change subject: Use i18n message in core instead of a duplication in UW
......................................................................
Use i18n message in core instead of a duplication in UW
These were UW-only, but also needed in core, so I copied them over.
We should now use those.
Depends-On: I22f26e56e089edad7c423ac8f0007b5439de3e58
Change-Id: Ic784b19d36018b2e646e41e9e837b2efdfce9517
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M resources/mw.UploadWizard.js
4 files changed, 4 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard
refs/changes/97/362197/1
diff --git a/extension.json b/extension.json
index e515738..487704b 100644
--- a/extension.json
+++ b/extension.json
@@ -268,11 +268,11 @@
"mwe-upwiz-step-thanks",
"api-error-aborted",
"api-error-noimageinfo",
- "api-error-offline",
"api-error-parsererror",
- "api-error-timeout",
"api-error-unknown-warning",
"unknown-error",
+ "apierror-offline",
+ "apierror-timeout",
"apierror-unknownerror",
"apierror-stashfailed-complete",
"file-exists-duplicate",
diff --git a/i18n/en.json b/i18n/en.json
index 12b1770..bbb7b72 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -20,8 +20,6 @@
"api-error-parsererror": "The server responded with an invalid JSON
document. This could be a problem with the API, or you could be using a proxy
server that prevents you from uploading files.",
"api-error-aborted": "Upload aborted.",
"api-error-noimageinfo": "The upload succeeded, but the server did not
give us any information about the file.",
- "api-error-offline": "Could not proceed due to network connectivity
issues. Make sure you have a working internet connection and try again.",
- "api-error-timeout": "The server did not respond within the expected
time.",
"mwe-upwiz-unavailable": "Your browser is not compatible with
UploadWizard or has JavaScript turned off, so we are showing you a simple
upload form. ([https://www.mediawiki.org/wiki/UploadWizard#Compatibility View
compatibility requirements].)",
"mwe-upwiz-extension-disabled": "This page has been disabled due to
temporary technical problems. In the meantime try the standard upload form.",
"mwe-upwiz-step-tutorial": "Learn",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 4f8fa73..a6eaa2c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -46,8 +46,6 @@
"api-error-parsererror": "Error message for when, for an unknown
reason, the server sent the client an invalid response.",
"api-error-aborted": "Error message for when an upload was aborted.",
"api-error-noimageinfo": "API error message that can be used for client
side localisation of API errors.",
- "api-error-offline": "Error message for when files could not be
uploaded as a result of bad/lost internet connection.",
- "api-error-timeout": "API error message that can be used for client
side localisation of API errors.",
"mwe-upwiz-unavailable": "Shown if the user visits Special:UploadWizard
using a browser that can't display the wizard due to JavaScript being disabled
or lack of support for modern features.",
"mwe-upwiz-extension-disabled": "Shown if the UploadWizard page has
been disabled.",
"mwe-upwiz-step-tutorial": "{| align=\"right\"\n|
[[file:commons-uw-L524.png|Initial \"{{MediaWiki:mwe-upwiz-step-file/en}}\"
page|thumb|right]]\n| [[file:commons-uw-L521.png|Beginning of
\"{{MediaWiki:mwe-upwiz-step-tutorial/en}}\" page|thumb|right]]\n|
[[file:commons-uw-L522.png|Center of
\"{{MediaWiki:mwe-upwiz-step-tutorial/en}}\" page|thumb|right]]\n|
[[file:commons-uw-L523.png|End of \"{{MediaWiki:mwe-upwiz-step-tutorial/en}}\"
page|thumb|right]]\n|} This is a short greyed or bolded label, in the top bar
of all pages of the [[:mw:Extension:UploadWizard|MediaWiki Upload Wizard]].",
diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 9af12f5..97ca334 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -118,12 +118,12 @@
response = result;
} else if ( result &&
result.textStatus === 'timeout' ) {
// in case of
$.ajax.fail(), there is no response json
- response.errors[ 0
].html = mw.message( 'api-error-timeout' ).parse();
+ response.errors[ 0
].html = mw.message( 'apierror-timeout' ).parse();
} else if ( result &&
result.textStatus === 'parsererror' ) {
response.errors[ 0
].html = mw.message( 'api-error-parsererror' ).parse();
} else if ( code === 'http' &&
result && result.xhr && result.xhr.status === 0 ) {
// failed to even
connect to server
- response.errors[ 0
].html = mw.message( 'api-error-offline' ).parse();
+ response.errors[ 0
].html = mw.message( 'apierror-offline' ).parse();
}
return $.Deferred().reject(
code, response, response );
--
To view, visit https://gerrit.wikimedia.org/r/362197
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic784b19d36018b2e646e41e9e837b2efdfce9517
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits