MediaWiki talk:RegexpButton.js

From Wikisource
Jump to navigation Jump to search

TODO list[edit]

  • Multilingual support for "Repl. ", " par ", "go!", "Expression régulière".
  • Catalan: "Canvia ", " per ", "Vés!", "Expressió regular".

-Aleator 19:24, 26 February 2011 (UTC)[reply]

WikiEditor question[edit]

@Phe, per jquery.wikiEditor.toolbar.config.js , the 'section' is merely labeled 'advanced' and the possible groups that exist by default that you can add to are: 'heading', 'format', 'size' or 'insert'. I would assume 'other' as a group would need to be created prior to adding a button to it (but I've been wrong before). -- George Orwell III (talk) 00:40, 31 August 2014 (UTC)[reply]

I tried in multiple way, but there is no way to insert it in another menu than proofread-tools. https://bugzilla.wikimedia.org/show_bug.cgi?id=69447 talk only about the old toolbar but I think this bug also break partly the wikieditor tool bar. What we have actually in Page: namespace is not the most recent wikieditor toolbar but something else (the add internal button does not behave as the one from the wikieditor). When it's fixed I'll move the OCR/Regexp buttons back to the advanced menu. If people complain, please explain to them the position of button is a temporary hack just to get them in the Page: namespace. — Phe 11:31, 31 August 2014 (UTC)[reply]
@Phe, 'tools': can't be set to 'tools' can it?

Shouldn't the addToToolbar part be something like...

 
	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
		'section': 'advanced',
		'group': 'insert',
		'tools': {
			'regexp': {
				'labelMsg': 'wikieditor-toolbar-tool-regexp',
				'label': 'RegExp button',
				'id': 'regexp',
//				'filters': [ 'body:ns-104' ],
				'type': 'button',
				'icon': '//upload.wikimedia.org/wikipedia/commons/a/a0/Button_references_alt.png',
				'action': {
					'type': 'callback',
					'execute': b.onClick
					}
				}
			}
		} );
Then again, I'm just going by other scripts I've seen and who knows if those are correct/working either. -- George Orwell III (talk) 12:05, 31 August 2014 (UTC)[reply]
Update: You might be on to something - I was unable to add even a faux button to any of the advanced menu groups and when I tried to add the above to the main section, it wouldn't generate there either (plus it "broke codeEditor on .js & .css page edits in the process).

How can we escalate the reversion of that stupid "generate wikieditor on content pages only" bug? -- George Orwell III (talk) 13:17, 31 August 2014 (UTC)[reply]

I tried to increase the severity but was reverted, unsure if it'll go fast as Tpt prefer another solution than a simple revert of the patch causing the bug, but it'll need a second patch in the proofread code and I can't retrieve it, perhaps Tpt wait for the first patch to be applied to provide the second, as the second can't work w/o its first patch. — Phe 13:45, 31 August 2014 (UTC)[reply]
<sigh> I figured as much but there are so many 'see also' &/or 'blocks' that touch upon one bug while messing around with another, I can't keep them all straight anymore. The priority should always be to revert back to a known good & working version whenever possible (and that's definitely not Tpt's fault in this case) then patch from that reversion point forward but to each his own applies here I suppose. -- George Orwell III (talk) 14:05, 31 August 2014 (UTC)[reply]