jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/284220 )
Change subject: Special:Upload: Use user interface language for error message
......................................................................
Special:Upload: Use user interface language for error message
This change adds the parameters errorformat=html and errorlang with the user
interface language code to the API request.
Bug: T133059
Change-Id: I75b3c9537a8805367d36a4e51453a9f9219c9555
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
Umherirrender: Looks good to me, approved
jenkins-bot: Verified
Anomie: Looks good to me, but someone else must approve
diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 5934278..9bf6255 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -73,7 +73,9 @@
// If title is empty, user input is invalid,
the API call will produce details about why
titles: title ? title.getPrefixedText() :
this.nameToCheck,
prop: 'imageinfo',
- iiprop: 'uploadwarning'
+ iiprop: 'uploadwarning',
+ errorformat: 'html',
+ errorlang: mw.config.get( 'wgUserLanguage' )
} ).done( function ( result ) {
var
resultOut = '',
@@ -81,7 +83,7 @@
if ( page.imageinfo ) {
resultOut = page.imageinfo[ 0 ].html;
} else if ( page.invalidreason ) {
- resultOut = mw.html.escape(
page.invalidreason );
+ resultOut = page.invalidreason.html;
}
uploadWarning.processResult( resultOut,
uploadWarning.nameToCheck );
} ).always( function () {
--
To view, visit https://gerrit.wikimedia.org/r/284220
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I75b3c9537a8805367d36a4e51453a9f9219c9555
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Edokter <[email protected]>
Gerrit-Reviewer: Fomafix <[email protected]>
Gerrit-Reviewer: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Luke081515 <[email protected]>
Gerrit-Reviewer: Ricordisamoa <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits