LivePreview: Add uselang parameter to API diff request
authorFomafix <fomafix@googlemail.com>
Thu, 25 Jan 2018 18:30:55 +0000 (19:30 +0100)
committerFomafix <fomafix@googlemail.com>
Thu, 25 Jan 2018 18:30:55 +0000 (19:30 +0100)
Some elements like the line numbers of a diff depends on the user
interface language. This change ensures that the language of the user
interface is used of live preview diffs, too.

Bug: T185683
Change-Id: I438e19028700fb2d5bcd57d214e1134d656fb7b2

resources/src/mediawiki.action/mediawiki.action.edit.preview.js

index b86f5c8..b87fba7 100644 (file)
@@ -99,7 +99,8 @@
                                rvdifftotext: $textbox.textSelection( 'getContents' ),
                                rvdifftotextpst: true,
                                rvprop: '',
-                               rvsection: section === '' ? undefined : section
+                               rvsection: section === '' ? undefined : section,
+                               uselang: mw.config.get( 'wgUserLanguage' )
                        } );
 
                        // Wait for the summary before showing the diff so the page doesn't jump twice