mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 23:33:54 +00:00
Follow-up to 74b5834
: Add language prefix to Readability survey
Changes the language of the preload page based on the wikis content language. Bug: T349232 Change-Id: Ie4233e6e31f57d09c319835c03c427dc7e83aea9
This commit is contained in:
parent
ce5c5dba93
commit
b4fe7c35b9
|
@ -85,10 +85,13 @@ module.exports = exports = {
|
|||
},
|
||||
computed: {
|
||||
feedbackUrl: function () {
|
||||
const contentLang = mw.config.get( 'wgContentLanguage' );
|
||||
const preloadLangSuffix = (contentLang === 'en' ) ? '' : '/' + contentLang;
|
||||
|
||||
const feedbackUrlParams = new URLSearchParams( [
|
||||
[ 'action', 'submit' ],
|
||||
[ 'section', 'new' ],
|
||||
[ 'preload', 'Special:MyLanguage/Reading/Web/Accessibility_for_reading/Community_Prototype_Testing/preload' ],
|
||||
[ 'preload', 'Reading/Web/Accessibility_for_reading/Community_prototype_testing/preload' + preloadLangSuffix ],
|
||||
[ 'preloadparams[]', this.fontSize ],
|
||||
[ 'preloadparams[]', this.lineHeight ],
|
||||
[ 'preloadparams[]', this.verticalMargins ],
|
||||
|
@ -96,7 +99,7 @@ module.exports = exports = {
|
|||
[ 'preloadparams[]', `${window.innerWidth} x ${window.innerHeight}` ],
|
||||
[ 'preloadtitle', ( mw.user.getName() ) ? 'User: ' + mw.user.getName() : '' ]
|
||||
] );
|
||||
return "https://www.mediawiki.org/wiki/Reading/Web/Accessibility_for_reading/Community_Prototype_Testing/Feedback?" + feedbackUrlParams.toString();
|
||||
return "https://www.mediawiki.org/wiki/Reading/Web/Accessibility_for_reading/Community_prototype_testing/Feedback?" + feedbackUrlParams.toString();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in a new issue