[10:57:42] (03PS1) 10Urbanecm: Update django.pot [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519615 [10:58:13] (03CR) 10Urbanecm: [C: 03+2] Update django.pot [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519615 (owner: 10Urbanecm) [10:59:12] (03PS3) 10Urbanecm: Revert "Revert "Notify those who can (pre)approve a ticket when it is ready to be (pre)approved"" [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/518978 (https://phabricator.wikimedia.org/T226185) [10:59:24] (03Merged) 10jenkins-bot: Update django.pot [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519615 (owner: 10Urbanecm) [13:17:05] Urbanecm: I found "const urlRegex = /^https:\/\/upload\.wikimedia\.org\/wikipedia\/commons\/([0-9a-f])\/([0-9a-f]{2})\/(.+?\.(.+))$/gmi;" hardcoded in commons-selection.js [13:17:19] how am I supposed to test against my local MW installation [13:19:51] hi tassu [13:19:52] looking [13:20:02] ping shreyasminocha, since he wrote the code in question [13:20:11] line 353 [13:20:42] i can just comment it out, but i know i'll forget to remove that before sending patches to gerrit [13:20:51] yup, i see the regex, just trying to remember the reason why it is hardcoded [13:21:18] oh, also the image url is hardcoded: "return `https://upload.wikimedia.org/wikipedia/commons/thumb/${ hashFirst }/${ hashFirstTwo }/${ fullFilename }/${ pageNumberString }${ thumbSizePx }px-${ fullFilename }.${ thumbExtension }`;" [13:21:24] not fun [13:21:38] ah, got it [13:22:04] it's quite hard to get file url from Commons directly [13:22:21] the MW api doesn't provide this information [13:22:33] for that, it's hardcoded, till somebody finds a better solution [13:22:40] if you have something in mind, feel free to send a patch! [13:22:58] tassu, also, personally, I test it against commons directly [13:23:34] I would prefer to not test writing to commons [13:24:42] ah, you want to test writing [13:24:47] * Urbanecm is thinking [13:25:22] yeah, the ticket (T213173) is about writing the template failing sometimes [13:26:32] tassu, i forgot which task you're working on :) [13:28:33] no prob, just need to be able to test somehow [13:29:11] i understand, thinking about a solution [13:31:00] tassu, what about modifying socialauth.api.mediawiki.put_content method to print the content that's going to be put rather than actually putting it on wiki? [13:31:33] to solve "forgot to change it back before pushing to gerrit" problem, we can introduce a new settings.py variable that'll control that [13:31:35] what do you think? [13:32:24] hmm [13:34:21] i know it's not ideal, but unless mediawiki provides some other way how to get a thumbnail url except one apicall per image (too slow), it's better than nothing [13:35:29] i think I'll just change the hard coded urls and revert those before committing for now, too much hassle [13:35:49] tassu, the problem would be, how to get a thumbnail url for your wiki? [13:36:28] it certainly isn't upload.wikimedia.org/anything, but what is that? this information isn't in the api response and thumbnail url differs from Wikimedia and non-Wikimedia wikis a lot [13:37:51] hmm [13:39:24] there are two ways how to get the url, either call https://commons.wikimedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=imageinfo&titles=File%3ARoof%20of%20a%20heritage%20barn%2C%20Ruckle%20Heritage%20Farm%2C%20Saltspring%20Island%2C%20British%20Columbia%2C%20Canada.jpg&iiprop=timestamp%7Cuser%7Curl&iiurlwidth=20 for each image, or generate it in JS, which - unfortunately - includes hardcoding [13:40:02] the second one is not pretty, but the first one is too slow [13:41:15] "http://dev.wiki.local.wmftest.net:8080/images/thumb/a/ae/Tracker_123.png/20px-Tracker_123.png" [13:41:46] so I could replace "https://upload.wikimedia.org/wikipedia/commons" with "http://dev.wiki.local.wmftest.net:8080/images" locally [13:41:50] that might actually work [13:41:54] that might work [13:42:19] that's the url in mediawiki-vagrant btw [13:43:45] got it [13:45:32] hey, it works! (atleast for now!) [13:48:14] 10WMCZ-Tracker, 10MediaWiki-API: Add image scaling option to list=allimages - https://phabricator.wikimedia.org/T226830 (10Urbanecm) [13:48:47] congrats tassu! [13:49:22] as you can see above, I've filled T226830 to add the parameter, which would allow us to rework the thumb url generation part to look prettier :) [13:50:11] I see [13:50:21] I saw that* [14:01:08] (03PS1) 10Urbanecm: Show real name and username in notification mail [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519633 (https://phabricator.wikimedia.org/T214192) [14:01:19] (03PS2) 10Urbanecm: Show real name and username in comments notification [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519633 (https://phabricator.wikimedia.org/T214192) [14:02:22] (03PS3) 10Urbanecm: Show real name and username in comments notification [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519633 (https://phabricator.wikimedia.org/T214192) [14:03:38] (03CR) 10Urbanecm: [C: 03+2] Show real name and username in comments notification [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519633 (https://phabricator.wikimedia.org/T214192) (owner: 10Urbanecm) [14:04:58] (03Merged) 10jenkins-bot: Show real name and username in comments notification [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519633 (https://phabricator.wikimedia.org/T214192) (owner: 10Urbanecm) [14:05:27] 10WMCZ-Tracker, 10Patch-For-Review, 10User-Urbanecm: Show real name and username in notification mail new comments section - https://phabricator.wikimedia.org/T214192 (10Urbanecm) 05Open→03Resolved a:03Urbanecm [14:31:21] 10WMCZ-Tracker, 10MediaWiki-API: Add information about available scaled images to list=allimages - https://phabricator.wikimedia.org/T226830 (10saper) [14:31:51] (03PS1) 10Majavah: Append template directly under info template [wikimedia-cz/tracker] - 10https://gerrit.wikimedia.org/r/519639 (https://phabricator.wikimedia.org/T213173) [14:32:34] Urbanecm: it's starting to work now, however it's still broken (it sometimes appends inside the info template) [14:32:49] I'll have to leave now, however I'll continue working on it when I have time [14:45:45] thanks tassu [14:46:07] Ä! [14:46:30] can't type on mobile :/ [15:14:48] yeah, sorry for that monster of a regex… i wish there were a better way too.