[00:54:19] This is my new favorite video! https://mediawiki.org/wiki/File:Making_Multilingual_Wikis_a_Reality_-_Niklas_Laxstr%C3%B6m_and_Claus_Christensen.ogv [01:06:03] * M3RELATIVISM[m] checks it out [01:06:10] Seams interesting [01:06:29] Dokuwiki has the deepl plugin [01:06:48] That could be a way to go as well for mediawiki [04:20:15] [[Special:MyLanguage/Seagull|seagulls]] as mentioned in https://mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration "However, to achieve a constant behavior the syntax must be used for all links." -- Is it possible for all [[Segaull]] normal links to be processed through Special:MyLanguage/* by default? [04:31:45] I'm not sure if this is outdated or I'm just dumb, at https://mediawiki.org/wiki/Extension:UniversalLanguageSelector "In case you want to update it, install Extension:CLDR and update the data with the following command." I ran the php script, and I can't find any files named "langnames.ser" nor do I see any file changes [04:37:49] I see this file gets overwritten instead: ./extensions/UniversalLanguageSelector/data/LanguageNameSearchData.php [04:41:20] and comparing a month old version of the file to the overwrite, I see some lines are missing in the updated one. e.g. this is gone -> 'af noorwiijiyaan' => 'no', [04:41:26] even though the new file is larger [05:54:30] In https://mediawiki.org/wiki/Extension:UniversalLanguageSelector the text below "Position of ULS trigger" section is stated above a few lines too, exactly the same wording. [06:07:32] https://mediawiki.org/wiki/Extension:UniversalLanguageSelector#Caching_configuration "For a full example see the caching configuration update done for the Wikimedia cluster." --> "Not Found" [06:12:28] RIP! https://gerrit.wikimedia.org/r/c/operations/puppet/+/137883 [06:13:49] but maybe the link can be updated to https://gerrit.wikimedia.org/r/c/operations/puppet/+/137883/2/files/apache/apache2.conf.appserver ? [06:16:29] I edited the page! This is how I die, lol. [06:29:25] Hmmmm `grep -r "woff" vendor/guzzlehttp/psr7/src/MimeType.php vendor/wikimedia/less.php/lib/Less/Mime.php includes/libs/mime/MimeMap.php` shows "application/font-woff" and "application/x-font-woff" [06:34:33] Aha! `grep -r "application/x-woff" mediawiki-1.37.1/` shows nothing! So maybe https://mediawiki.org/wiki/Extension:UniversalLanguageSelector is outdated, or at least that part of the page referencing "x-woff" cuz above I see "application/x-font-woff" which suggests that one of them is wrong [06:37:33] https://en.wikipedia.org/wiki/Web_Open_Font_Format#Vendor_support "Since February 2017, the proper MIME type is font/woff for WOFF 1.0 and font/woff2 for WOFF 2.0." [06:37:52] so not just one of them are wrong, but both of them are wrong! [06:40:26] I'm daringly gonna edit that page too! [06:43:14] oh, it's the same page I edited before [07:21:37] ryzendar: no, we don't do such link rewriting automatically [07:44:38] ryzendar: woff was only added to the mine mapping recently iirc [07:49:29] oh no, that was sfnt i was thinking of [08:39:25] https://github.com/wikimedia/puppet/blob/e1e13a59de3021afaa43c31745abbe348a93017d/modules/mediawiki/files/apache/modules/mime.conf#L49 [09:04:38] do you have a page about converting from php to python ? [09:04:52] I mean the whole mediawiki codebase. [09:05:39] estimated work, schedule, components, implications etc [09:05:51] I don't think there are any serious plans for rewriting all of mediawiki to another language [09:05:54] and what tools etc are already done [09:06:13] taavi: not another per se, but to other. :) [09:06:25] I'm talking about dropping the php. [09:07:01] s/another/other/ then [09:07:33] https://www.mediawiki.org/wiki/Python [09:08:17] This came up again when I found myself modifying php extension and I could spend that time to rewrite it in python. [09:08:23] That page has nothing to do with rewriting MW in Phython [09:08:44] Reedy: indeed, let's make one page for that. How it would be named? [09:08:48] Basically it exists for tools that interact with MW that are written in Python [09:09:04] I think you're wasting your time doing so [09:09:38] We have talked about this here before and even then it was not outright shot down. [09:10:23] If we were to rewrite MW in something else, there's nothing to suggest that Python would be the best or popular choice [09:10:48] So let's make more pages about that this topic then. [09:10:56] Why? [09:11:01] To what end? [09:11:06] What problem are you solving? [09:11:13] https://www.openhub.net/p/mediawiki [09:11:19] >took an estimated 687 years of effort (COCOMO model) [09:11:23] So that next guy thinking this same thing, can read your opinion from those pages. [09:11:38] I know that number isn't really accurate due to i18n/l10n and stuff... [09:12:26] Reedy: I'm solving my context-switch problem, I'm not fluent in php and have hard time becoming so. [09:12:40] So we should rewrite it in Phython for your benefit? [09:12:46] Ignoring all the people that work in PHP currently? [09:12:46] I actually used it back -90's and converted myself to python. [09:12:56] *Python [09:13:20] Reedy: I wouldn't even suggest this if those cli python tools wouldn't exist. But they do and it tells something. [09:13:38] Well, MediaWiki provides JSON (etc) APIs [09:13:48] People can then write stuff in whatever language you want [09:14:04] Looking at that page... [09:14:15] But i still find myself fixing those php extensions that don't work. [09:14:20] The first are 3rd party tools on toolforge [09:14:31] Second is coding styles for our wider use of Python [09:14:36] Third is API clients [09:15:12] And the third... Well, yeah [09:15:15] Parsers [09:15:21] 4th [09:15:23] even [09:17:10] would it be called converting or porting? [09:20:11] Porting is not generally applied to the process of adapting software to run with less memory on the same CPU and operating system, nor is it applied to the rewriting of source code in a different language (i.e. language conversion or translation). [09:23:42] Not sure [09:23:58] But if we were going to do that, we'd probably do it from the ground up in many different ways [09:25:06] agreed [09:25:44] and if not going to do it, I think the whole architectural brainstorming is academically interesting. [09:26:16] for example from web middleware and ORM point of view. [09:54:14] https://stackoverflow.com/questions/14366750/mediawiki-python-port [10:37:02] Reedy: what different ways / parts were in your mind? [11:44:16] i still -really- want a mediawiki frontend that outputs gopher only :P [11:51:52] buZz: there was a gopher endpoint for the wmf wikis are one point [11:52:16] zomg [11:52:24] through a modified mediawiki.php ? [11:52:41] or just some live translator? [12:02:19] I may be imagining it, I can't find any documentation about it [12:08:44] Hi, what are common reasons why RelatedArticles extension won't work? [12:09:40] Everything is fine with CirrusSearch. [12:11:10] I placed wgRelatedArticlesFooterWhitelistedSkins in LocalSettings.php as well. [12:11:52] Full configuration related to them is here: https://dpaste.org/kawO [17:53:46] hello everyone! so i have a hook an onArticleSave, and I want to cancel saving and show a message. How can i do that? [17:53:57] I'm writing an extension [17:56:34] set $hookStatus and return false [17:57:16] the ArticleSave hook was removed in 1.29 (September 2018), the current equivalent is https://www.mediawiki.org/wiki/Manual:Hooks/MultiContentSave [17:59:41] thanks! [22:34:26] Hello, I'm trying to create a hook. I'm getting the error "Error: Interface 'MediaWiki\Hook\MultiContentSave' not found" This is my code: https://dpaste.org/jT5J [22:35:37] what MediaWiki version are you running? [22:35:57] the latest one [22:36:30] The latest one isn't a helpful answer [22:37:00] 1.37.1 [22:37:11] The interface is called MultiContentSaveHook not MultiContentSave [22:37:27] And in master, it's in MediaWiki\Storage\Hook [22:37:58] Same in 1.37 [22:37:59] https://github.com/wikimedia/mediawiki/blob/REL1_37/includes/Storage/Hook/MultiContentSaveHook.php#L3 [22:38:54] So now I get "Fatal error: Cannot make non static method MediaWiki\Storage\Hook\MultiContentSaveHook::onMultiContentSave() static in class MediaWiki\Extension\Reconstructie\Hooks" [22:39:08] Don't make it static then [22:40:06] now i get "Fatal error: Declaration of MediaWiki\Extension\Reconstructie\Hooks::onMultiContentSave(MediaWiki\Extension\Reconstructie\MediaWiki\Revision\RenderedRevision $renderedRevision, MediaWiki\Extension\Reconstructie\MediaWiki\User\UserIdentity $user, MediaWiki\Extension\Reconstructie\CommentStoreComment $summary, $flags, [22:40:07] MediaWiki\Extension\Reconstructie\Status $hookStatus) must be compatible with MediaWiki\Storage\Hook\MultiContentSaveHook::onMultiContentSave($renderedRevision, $user, $summary, $flags, $status) " [22:40:40] Remove the type hints [22:43:02] Now i get "Error: Class 'MediaWiki\Extension\Reconstructie\RawMessage' not found" [22:43:51] You need to import RawMessage [22:44:40] I figured, thanks! it works [22:46:02] is it possible to add multiple hooks in one PHP file? [22:47:50] Yes [22:49:41] And is there a hook that precedes the edit article page? I mean, so you want to edit a page but it there's a hook before the form is showed? [22:51:47] https://www.mediawiki.org/wiki/Manual:Hooks/EditPage::showEditForm:initial [22:52:17] thanks a lot! [22:59:48] I changed EditPage::showEditForm:initial to \MediaWiki\Storage\Hook\EditPage__showEditForm_initial but cannot find the class [23:00:02] in code it's like this: "class BeforeSave implements \MediaWiki\Storage\Hook\EditPage__showEditForm_initial " [23:02:17] Wrong namespace again [23:02:26] I found the answer [23:02:31] https://github.com/wikimedia/mediawiki/blob/master/includes/Hook/EditPage__showEditForm_initialHook.php [23:02:39] but now i get "contains 1 abstract method and must therefore be declared abstract or implement the remaining methods" [23:03:23] You probably didn't use the right name for the function [23:05:20] then I get "Cannot make non static method MediaWiki\Hook\EditPage__showEditForm_initialHook::onEditPage__showEditForm_initial() static i" [23:05:34] Don't use the static keyword [23:05:40] Same answer as the last time [23:05:55] allright! thanks, slowly getting the hang of it [23:18:15] with the EditPage::showEditForm:initial hook, how can i cancel the edit form, and just show an error? [23:31:03] Read the docs? ;) [23:31:03] https://github.com/wikimedia/mediawiki/blob/master/includes/Hook/EditPage__showEditForm_initialHook.php#L24-L27 [23:35:17] Reading the docs right now, but not finding it: how would I access the title of a page from a $renderedRevision in onMultiContentSave() [23:38:14] I'm trying $renderedRevision->getTitleText() [23:40:19] You'd probably need to do $renderedRevision->getRevision()->getPage()->getDBkey() [23:40:33] Try searching for the class names in https://doc.wikimedia.org/mediawiki-core/master/php/ for the nicer PHP docs [23:42:00] thanks [23:53:09] Something does not seem right about https://mediawiki.org/wiki/Template:BlueSpiceExtensionInfobox because when I try to export a single page at https://mediawiki.org/wiki/Special:Export -- I try to export only "Template:BlueSpiceExtensionInfobox" but checking the box for "include templates" then the resulting 1.7 gigabyte XML file is incomplete, malformed, not ending with last line "" but even besides that, [23:53:09] does that template really need to have 1.7 gigabytes of dependencies? [23:54:25] I get 2.4M file [23:54:47] Are you unchecking "Include only the current revision, not the full history" ? [23:55:20] if I do... it's done 300MB and keeps going [23:55:26] * Reedy cancels [23:56:09] I see 48 pages in there [23:56:20] It's quite possible some of those templates have 10-15+ years worth of history [23:57:34] Reedy, yes, I unchecked that, for the full history [23:57:44] * Reedy shrugs [23:57:49] Causing your own problems then :) [23:59:51] https://www.mediawiki.org/wiki/Module:ExtensionJson [23:59:55] >This is a data table of all the extension.json files from MediaWiki extensions in Wikimedia's Gerrit repositories as well as repositories listed in MWStake/nonwmf-extensions. [23:59:56] ok then