Misplaced Pages

User talk:Ohconfucius/EngvarB: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User talk:Ohconfucius Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 21:15, 13 November 2024 editOhconfucius (talk | contribs)Autopatrolled, Extended confirmed users, Pending changes reviewers328,947 edits Add IUPAC spelling as an option: r← Previous edit Revision as of 21:18, 13 November 2024 edit undoOhconfucius (talk | contribs)Autopatrolled, Extended confirmed users, Pending changes reviewers328,947 edits removing non-respected archive tagsNext edit →
Line 2: Line 2:


Postings concerning the script but involving minor bug reports – ones that do not result in significant upgrade – will be included if I believe they may be useful for future reference. Postings concerning the script but involving minor bug reports – ones that do not result in significant upgrade – will be included if I believe they may be useful for future reference.

{{Archive top}}


== ENGVAR script == == ENGVAR script ==
Line 451: Line 449:


:::::This is called with the full language name e.g. '''Dl2_EngTag("British")'''. The key is in the '''langvars''' array, which is a list of the full variant names, which are looped through in the first section to check for existing language tags. If a different tag is found that the variant to be applied, the script will prompt to override and change the tag - OK/Cancel. The last part will add a new tag if none was available. Updating a single langvars array should be better to maintain that having to update numerous cases. ] (]) 21:55, 29 October 2011 (UTC) :::::This is called with the full language name e.g. '''Dl2_EngTag("British")'''. The key is in the '''langvars''' array, which is a list of the full variant names, which are looped through in the first section to check for existing language tags. If a different tag is found that the variant to be applied, the script will prompt to override and change the tag - OK/Cancel. The last part will add a new tag if none was available. Updating a single langvars array should be better to maintain that having to update numerous cases. ] (]) 21:55, 29 October 2011 (UTC)

{{archivebottom}}


== Annex/annexe == == Annex/annexe ==

Revision as of 21:18, 13 November 2024

OBJECTIVE: The discussion here concerns any discussion involving the development of the Engvar script. These were originally posted to my talk page but are preserved here as a record of its evolution.

Postings concerning the script but involving minor bug reports – ones that do not result in significant upgrade – will be included if I believe they may be useful for future reference.

ENGVAR script

G'day! Just a quick note: it appears that your script does not recognise "urbanized" when converting to the -ise spelling. Would you be able to correct this? Cheers, Hayden120 (talk) 11:37, 19 July 2010 (UTC)

  • Usually, the word 'urbanized', like '~ized/~ization', will be transformed. I have just tested it, and it seems to work as intended. However, I suspect that the instance where it did not convert was due to its being within a <ref> template, where these conversions are best avoided - we try to keep quotes and their spellings 'verbatim'. I presume you are referring to this text. I ran the code, and indeed 'industrialized' was converted but 'urbanized' apparently missed. For the moment, I cannot explain this inconsistency. I would have to examine the code more precisely, and maybe make a tweak to it based on the findings. Ohconfucius 01:48, 20 July 2010 (UTC)
    • I think that the protection code would treat the whole citation as a single string, and act on one 'z-word' instance only. It would have protected the first instance (ie 'urbanized') and not the second instance (ie 'industrialized'), so that when the conversion code acted, it changed 'industrialized' to 'industrialised', leaving 'urbanized' untouched. I have now modified the code to catch a second instance. Thank you for your feedback. Ohconfucius 02:10, 20 July 2010 (UTC)
Ah, I see. I didn't notice that those words were inside a citation; I would have left them if I did. I'll change them back. Thanks, Hayden120 (talk) 03:01, 20 July 2010 (UTC)
I just had the same problem again, here, for "neutralises". It was the third instance of the spelling in a quotation. Would you please be able to alter the script so it does not modify citations? Many thanks, Hayden120 (talk) 10:25, 30 July 2010 (UTC)

User:Ohconfucius/EngvarB.js

Suggestion I suggest that you make the script ignore text within category names to keep this from happening (scroll to the bottom, of course.) —Justin (koavf)TCM15:26, 24 July 2010 (UTC)

Suggestion: Read the documentation: it is very clear that this sort of thing is going to happen, and any editor who uses the script needs to be vigilant, as I was - I manually reverted the category (scroll to the bottom, of course). Radiopathy •talk• 18:39, 24 July 2010 (UTC)
Thanks...now what does that mean?!? Radiopathy •talk• 22:25, 24 July 2010 (UTC)
  • I don't know whether you're using the new skin or old, or both, but you import 'User:Smith609/toolbox.js' into your vector file (new skin) and 'User:Ohconfucius/EngvarB.js' into your monobook file. To save you from changing to old skin just to use EngvarB, you can import it into your vector file too. Ohconfucius 22:31, 24 July 2010 (UTC)
Responses @Ohconfucius: Thanks. @Radiopathy Why wouldn't he make this change? —Justin (koavf)TCM05:38, 25 July 2010 (UTC)
Addendum @Radiopathy: You did it again; this time, I fixed it. —Justin (koavf)TCM05:46, 25 July 2010 (UTC)
  • I've just checked the script on the John Lennon article, and the problem I was notified of has definitely been fixed. I presume Radiopathy merely forgot to refresh the browser cache. Ohconfucius 01:23, 26 July 2010 (UTC)

Did you change the script?

It makes the changes and tags the article, but I don't get the "difs" so that I can see what changes took place and edit if necessary. Radiopathy •talk• 01:16, 30 July 2010 (UTC)

Yes, I'm sorry I did make a couple of tweaks, and forgot to re-enable the diff-preduction. Now reinstated. Ohconfucius 16:16, 1 August 2010 (UTC)
Glitching again. Radiopathy •talk• 13:58, 2 August 2010 (UTC)
Where's the glitch? Have you got a diff for me? Ohconfucius 03:12, 3 August 2010 (UTC)

Simplifying ENGVAR script

Hi!!!

I was looking at your script and I think you could simplify it a lot if you use an array to store the "substitution rules". I did this in another script I use at pt.wikisource for OCR corrections and it seems that the same principle apply here. You could use something like this for the rules:

	var table = {
		'aluminum':	'$1aluminium',
		'artifact':	'$1artefact',
		...
	};

and then do a loop through it:

	for (var word in table) {
		regex_function1(word, table);
	}

The regex_function1 would be created with the code which is currently used explicitly in each row of your code. For example:

function regex_function1(w1, w2) {
	var regex1 = new RegExp('()' + w1, 'g')
	txt.value=txt.value.replace(regex1, w2);
}

What do you think?

By the way, did you notice my previous comment?

Have a nice week! Helder (talk) 13:56, 2 August 2010 (UTC)

  • Thanks for pinging me again. Indeed, I did miss your last posting, probably because somebody posted at around the same time. I had wondered how I could simplify the script, and will try out the code you suggested, and will feedback to you. Cheers! Ohconfucius 14:03, 2 August 2010 (UTC)
    • I've implemented your suggestion from last time, and it works fine. I would however mention that the strings such as '' are very much needed, and cannot be replaced by '\W' or '\b' as these words often crop up in urls. One possible simplification here that I haven't tried is replacing '' with . Unfortunately, I also found the the '\b' character behaves strangely in this flavour of regex - it seems to be recognised as having a "physical existence" just like any other character, so needs to be in a bracket and retained. As for the above suggestion, I have looked at your portuguese code. I am wondering why the need for several tables within the same function? Thanks in advance for your help. Ohconfucius 04:52, 5 August 2010 (UTC)
      • Hello! I use more than one table at pt.wikisource because I'm testing two kinds of conversions: those which apply only when the string is a "whole word" and those which are always applied. For example, I want to convert 'for' => 'fôr', but not 'forte' => 'fôrte', so I use something similar to your \w (I've set a variable containing all the letters 'A-Za-zÁÀÂÃÇÉÊÍÓÒÔÕÚáàâãçéêíóòôõú' which can be in a word). In other cases, it is not a problem if the string is converted even if it is contained in other word (like 'compreendid' =>'comprehendid', which is useful for conversion of 'compreendido', 'compreendida', 'compreendidos', 'compreendidas'). I'm also trying to implement a way of adding automatically conversion rules for words with first letter in upper case so that I only need to add the lower case rule (for example, 'For' => 'Fôr' doesn't need to be added since the table already contain 'for' => 'fôr'). But this is still a little buggy =/
      • You can move codes like (<.+?>+?), (+?<\/.+?>), (\]*?), etc... (which appears in lots of lines) to outside your table and put it only inside a loop (or a function). This could make the code more understandable and easy to update... =) (note that I did this for () in the example above). This is another reason why I use more than one table... Helder (talk) 21:48, 5 August 2010 (UTC)

∂˚˚•ˆ∆´¬¬®–…¬˚ßg

It missed "color" here and "flavored" here. Radiopathy •talk• 02:55, 5 August 2010 (UTC)

thanks for the feedback. 'color' (as opposed to 'colors' or 'colored') is a word which is often used in html formatting, so conversion is deliberately avoided so as to reduce the incidence of false positives. Similarly, words which are preceded by hypens are deliberately protected because the form '-word' is very frequently used in urls. As the string '-flavored' can be quite typical, I will try and find a work-around for both these cases if I can. Ohconfucius 03:03, 5 August 2010 (UTC)
OK, currently, I cannot see a way of easily transforming 'color' without creating false positives, so I have not done anything about that. However, I have modified the script for the hyphenated words '-colored', '-flavored', '-humored', which should now be transformed. Clear your cache and try it out. Ohconfucius 04:27, 5 August 2010 (UTC)

Rye Toe! I tried it on Flavored liquor (I didn't save it, of course) and it got every instance. Radiopathy •talk• 04:46, 5 August 2010 (UTC)

I think using this version is a better test, because it catches the hyphened variety. The script, before my change just earlier, should have worked on the instances of Flavored liquor. ;-) Ohconfucius 04:50, 5 August 2010 (UTC)

I couldn't get it to do Mother's Little Helper again, but it worked great on 'lemon-flavored' at Lemonade. Radiopathy •talk• 04:57, 5 August 2010 (UTC)

Good. You confirmed my test results. Ta! Ohconfucius 05:01, 5 August 2010 (UTC)
You may like to look on the Runescape Wikia AWB typo list. (Uses British English.) Probably stuff you already have, but FWIW. Rich Farmbrough, 18:02, 22 August 2010 (UTC).

Category:Use British English

Hi, what's your intention with Category:Use British English? It is categorized as a cleanup category (i.e. category of pages that have some kind of a problem that should be fixed), but from the descriptions it seems to me that it should just list articles written in British English. Also, it says that {{EngvarB}} will add an article to that category, but that's not the the case (at least currently). Svick (talk) 08:43, 21 August 2010 (UTC)

Thanks, I've just created Category:Use dmy dates --Ohconfucius 15:37, 23 August 2010 (UTC)

Scripts...

Hi!!!

How is everything?

You probably will like to know that at fr.wikisource they have a script (fr:s: oldwikisource:MediaWiki:Modernisation.js) which is used for modernization of texts written in old dialects. The script allow the reader to click in a menu in the sidebar to see the modernized version of text, based on a table of "old word" : "new word" pairs available at fr:s:Wikisource:Dictionnaire.

You can test it acessing, for example, the page fr:s:La Cigale et la Fourmi and clicking at "Texte modernisé" in the sidebar (then the text of the page will change accordingly to the dictionary - but since there is an image in the beginning of the page, it may be a good idea to see the page in full screen mode to notice the changes happening ;-) ).

I found this when I proposed a similar feature (from MediaWiki) at multilingual wikisource: Using LanguageConverter syntax at Wikisources.

Best regards =) Helder (talk) 22:08, 31 August 2010 (UTC)

  • Thanks for your message. Interesting discussions indeed about Engvar and translations! Unfortanately, I cannot access any demonstration: I tried going to Modernisation.js, and the page is blank. It's rather bizarre as I cannot access it nor see its history. I see the word list (dictionnaire), but see no sidebar buttom to transform (BTW, I have imported the same script as in your vector file). Maybe they have disabled it temporarily. But based on the discussion, I already get a pretty good idea of what they are trying to do there even without the demonstration.
My mistake: the script is here: oldwikisource:MediaWiki:Modernisation.js. Helder (talk) 17:45, 3 September 2010 (UTC)
  • As to your Engvar script modifications, I may have mentioned to you previously that I never succeeded in getting the last module to work. I have played with it a bit, although I shall soon be overwriting the existing EngvarB.js code with test1.js code, which is with the old Function Simple. I presume your version of the script must work for you, and am a bit mystified and frustrated why I cannot get the script to even load once the final module (function Simple) is substituted. Furthermore, because I have been a naughty boy, I have a prohibition from running automation on en.WP, so until I successfully appeal it, this continues to severely limit my ability to fully test the script with tangible results; I cannot save the changes. :-( More on that anon. Regards, --Ohconfucius 08:40, 3 September 2010 (UTC)
I'll try to take a look next week... Helder (talk) 17:45, 3 September 2010 (UTC)
This change seems to be working. I've changed the order of some lines, so that those which starts with "()" can be in a loop. The others are in another loop, and working. Give it a try =) Helder (talk) 23:24, 13 September 2010 (UTC)
  • Thanks for your update. The script is working a lot better now. But I've been experiencing problems with it apparently running out of steam, as it were, before the job is finished. The process seems to grind to a halt prematurely on both British and Oxford buttons, so the unprotect function isn't engaged; no diff, and tagging with {{EngvarB}}. It's about as far as I am technically able to offer to you as a bug report. --Ohconfucius 10:07, 14 September 2010 (UTC)
After you described the problem I remembered that my second test above also didn't had the summary. So, I looked at firefox console and noticed an error was happening in the loops. The problem was the need of double backslashes when defining the regexes inside strings.
In the latest version, it was added also code for try/catch errors in the loops. This way, you'll be notified if it was added some really broken regex to the tables ;-)
Now it is working (I hope!). Helder (talk) 13:04, 14 September 2010 (UTC)
  • Wow, thanks for that. I'll say I would never have found the bug – I was expecting the script to stopped at or close to the point of error, and certainly not after it had done most of the conversion, where the code was already bugged up. I'll report back later, after I've run a few tests on real articles. Cheers, --Ohconfucius 14:00, 14 September 2010 (UTC)

Another script

Hi!

I think you may like to test this script (together with this css). The script will add a menu at the top of pages and let you change the spellings from/to Britsh/American English based in lists of words (which currently are at Dictionary/en-US and /en-GB), editable by anyone.

You can see what happens in the dictionary pages, for example, or accessing articles where there are words in the lists (like Belgium and others). I don't know much of English, so the tables were just an adaptation of this table and may need revision by native English speakers ;-) Helder (talk) 16:32, 27 September 2010 (UTC)

  • Hey, that's a really neat idea of a script. There are a few glitches, though, these are easily detected when looking at, say, Barack Obama. Somehow, I feel that the dictionary list may be too comprehensive for its own good, as it contains many ambiguous words which are probably better off not translated – words like 'Vice President' becoming 'Vise President', and 'pin their hopes' becoming 'prong their hopes'. Thanks also for drawing my attention to Ubuntu project, and Greasemonkey. --Ohconfucius 04:47, 28 September 2010 (UTC)
    Indeed: when I found the script at oldwikisource:MediaWiki:Modernisation.js and the French table at s:fr:Project:Dictionnaire used for modernization of old French texts, I really liked to know that it was possible to do that also with javascript (I was aware of Language Converter from MediaWiki, but it is made in PHP). Since then I've tried to adapt it for a more general use (like conversion to en-GB/en-US variants of English, or pt-PT/pt-BR variants of portuguese, and also modernization of Portuguese texts at s:pt:).
    Don't take those tables very seriously... They are merely illustrative and were not reviewed... (and actually I'm not that good in English to do so... =/) Feel free to update them, removing or adding things in the tables, or to share the idea with anyone which may be interested... I'll probably work with the script only at Portuguese projects, but if it is useful for English too it is just a matter of making the tables good enough (the script is essentially a "parser" for the tables. So, if they are good, the script has good results, but if not... oh well).
    The adapted version of the script has some configuration variables which can be adjusted to fit your specific needs. For example, you can remove the highlight of converted words (or customize it in CSS...)
    BTW, you have added some things which may not be useful to you... The script only needs the part below "var ws_alphabet", as in my diffs. But if you want to add more buttons to your toolbar, there are some tips at usability:Toolbar_customization/Library ;-).
    Best regards, Helder (talk) 12:26, 28 September 2010 (UTC)
Me too ;-) Helder (talk) 11:44, 30 September 2010 (UTC)

Protect words

I noticed this amongst my scripts, but I have no idea what it is. Radiopathy •talk• 03:16, 29 September 2010 (UTC)

  • Thanks for pointing that out. I'm sorry for the confusion it may have caused. I had upgraded the script, and that was a button I use to test proper functioning of the protect mechanism, to make sure that certain words, or words inside Categories, quotations etc, don't get acted upon by the script. As it is no longer mentioned in the documentation, I have now disabled it. --Ohconfucius 03:28, 29 September 2010 (UTC)

What key is this in?

Look at this! It actually looked this way in the article, too! Radiopathy •talk• 19:44, 5 October 2010 (UTC)

  • OK, thanks for the clarification. No wonder I couldn't replicate the problem. However, it does look like the ENgvar missed a few words. Need to get to the bottom of it. --Ohconfucius 02:55, 6 October 2010 (UTC)
  • I immediately assumed it was the ENgvar script because of the way the music note appeared in 'surprised' which I have to protect from conversion. The appearance must be because the MOSNUM script somehow interacted with the Engvar script. So far, I cannot see why or how it would have done so – none of the functions share the same name. Anyway, sorry to bore you with the detail... I have made a patch which should deal with the problem for now. --Ohconfucius 03:15, 6 October 2010 (UTC)

Watch this

The ENGVAR script is 'unwatching' pages that I run it on! Radiopathy •talk• 14:15, 13 November 2010 (UTC)

  • I'll get onto it... d'you know if is this recent?

BTW, I've been informed elsewhere that the Mediawiki software occasionally drops watchlisted items. --Ohconfucius 14:27, 13 November 2010 (UTC)

I noticed that some of my watched articles were no longer on my watchlist, so I ran the script on Golden Slumbers today, and the page was unwatched after I saved. Radiopathy •talk• 14:30, 13 November 2010 (UTC)
  • Tx. I'll run some diagnostics. Ohconfucius 14:31, 13 November 2010 (UTC)
  • I am please to inform you that the problem has now been addressed. You were absolutely correct that the code un-watchlists since I know not when. So please check to see what other articles it may have delisted.

Musical notes

Hello. I was testing your EngvarB script for the first time on Humour and something surprising happened. I'm not sure if I'm doing something wrong but nothing was changed except those two instances of "surprise". Please help! Thank you. McLerristarr | Mclay1 05:41, 15 November 2010 (UTC)

Also, I was wondering where I could find a complete list of the changes as I'm not particularly good at reading code. Thanks. McLerristarr | Mclay1 06:05, 15 November 2010 (UTC)

One more thing, I recently created the page Misplaced Pages:Manual of Style (spelling)/Words ending with "-ise" or "-ize" and I was wondering if you could tell me if I've missed any exceptions. Thanks. McLerristarr | Mclay1 06:07, 15 November 2010 (UTC)

  • Thanks for your query. I had this problem reported to me by Radiopathy a while back, and thought I had fixed the problem. I know what it is due to, but the problem does not replicate when I run the script on the article you cited. I need to dig further. My initial guess was that the script may have stalled in the protection loop, before the conversions actually take place. If the browser allows the script to execute properly, you should see the diff of the changes appear once it has finished. Can you please confirm that this was the case, to help with diagnostics? I am also baffled as to why it didn't convert the instance of humor in the opening sentence when I executed it just now, but that's a problem unrelated to yours.

    I was in the process of creating a proper and comprehensive test page, but I got sidetracked. The closest I have to one is at the bottom of my script documentation here. More anon. --Ohconfucius 06:18, 15 November 2010 (UTC)

    • When I click "BRITISH spelling", it appears to do nothing. It says "Error on page" in the status bar at the bottom of the browser. When I manually view the diff, all it's done is added musical notes in the two instances of "surprise". I also tried it on The Beatles and it added a musical note in compromise. It appears to be doing it in words that end in "-ise" in American English too. By the way, I'm using Internet Explorer 8.0.7600.16385 (the latest version) on Windows 7. McLerristarr | Mclay1 06:29, 15 November 2010 (UTC)
      • OK, thanks. That confirmed my suspicion that the script stalled. It does appear to do so with some browsers that execute javascript slowly, and sometimes crash, like yours appeared to do. I have never tried it on IE. The only way to be sure the script has executed properly is if you see that the {{EngvarB}} tag (or {{EngvarOx}}) tag has been inserted. The diff is the last step which confirms its completion. When using Firefox on my Mac, I sometimes get a 'script stalled' message, but it asks me whether to continue; it gets there eventually. I also use FF and Chrome on Windows, and the script generally works fine. Safari seems to execute the script the fastest, though. SO I would recommend you try that. --Ohconfucius 06:36, 15 November 2010 (UTC)
        • Thank you. I will download Safari. I'm getting sick of Internet Explorer anyway. The drop down menu for recent edit summaries works better but other than that, Safari is a lot better for editing Misplaced Pages (I use it on my other computer). McLerristarr | Mclay1 06:50, 15 November 2010 (UTC)
      • Just a supplementary to your list, I presume you have seen this. A table similar to yours exists somewhere, but I have yet to relocate it. Furthermore, I'm not sure it is possible to create a complete list of -ize words. I have come across many variants where the American-created word (or so I believe) out of any given noun does not enjoy any degree of common usage in British English... I have never seen British write words like 'journalize', burglarize', 'routinize', as they generally prefer to use 'to make a journal entry', or 'to have been burgled' --Ohconfucius 06:36, 15 November 2010 (UTC)
        • Yes, I am aware that Americans tend to make up a lot of words so I was planning on keeping the list small. It is the lists of exceptions that I want to be exhaustive because I don't thin kthere are too many. I have read spelling differences page but as far as I'm aware there's no lists of words ending in "-ise" or "-our", just a few examples and a list of other miscellaneous spelling differences. McLerristarr | Mclay1 06:48, 15 November 2010 (UTC)

I tried it using Safari and it worked but it did not correct "humor" in the first sentence of Humour. It also wanted to add the EngvarB template even though it already had one. By the way, wouldn't it be best if it added {{Use British English}} instead? That way it avoids the redirect that bots and AWB will waste time correcting and it may be of benefit to unaware editors. McLerristarr | Mclay1 07:49, 15 November 2010 (UTC)

  • Great! I'm glad the most significant problem has been solved. I'll work on the other two you mentioned. Cheers, --Ohconfucius 07:56, 15 November 2010 (UTC)
    • Well, not really solved, just avoided by not using Internet Explorer. I tried it again on Humour and it got every instance of "humor" except the first one. However, some of the changed instances were in wikilinks and another in a citation template. Is it possible to avoid those? McLerristarr | Mclay1 11:06, 15 November 2010 (UTC)
      • It should be avoiding the instance within the citation template; also I thought I had a fix for the one inside the piped links, so those need to be investigated. IN my view, it's not desirable to ignore instances within wikilinks. In most cases, it's a problem which redirects were put into place to solve. As for the one in the external links, it's a very ordinary text string, so it's unavoidable, I'm afraid - the only way I know to avoid those for the moment would be potentially to put them inside a citation template; another solution may be for me to write an extra chunk of code to protect url strings of the type '' - something I'm hoping to avoid because it already enormously slows down script execution. --Ohconfucius 11:13, 15 November 2010 (UTC)
      • Update:
        1. The code does not convert the bolded 'honor' because the single quote marks render it into a protected string. I don't propose to change that to avoid false positives.
        2. I have now revised the code, which should now protect instances of words within citation templates, within the title field viz: '|titie= this is any string containing the non-British variant |'
        3. As said above, I do not propose to protect the ordinary string of the 'Further reading' references. I would suggest that in order to avoid conversion, one could substitute the quote marks with {{q}}, so anything within the template will be protected; alternatively, simply substitute the space preceding the word to be protected by a nbsp. Ohconfucius 15:53, 15 November 2010 (UTC)

I hate to be a pain but it's correcting words in URLs and file names. Try it on Airplane! – it's a good one for testing. McLerristarr | Mclay1 03:15, 16 November 2010 (UTC)

  • Not at all. Thanks for the help in pointing out the problems. I trust that you are deliberately finding articles to test the script on, and not actually trying to convert Airplane! to British English!

    After trying for the last hour or so, I haven't yet managed to cure the problem of the changes to 'image=airplane!.jpg'. I may have to go deeper into the code. I haven't yet tried to cure the problem of {{rottentomatoes|airplane}} although I'm tempted to say that latter one is probably better dealt with by capitalisation. --Ohconfucius 05:00, 16 November 2010 (UTC)

Airplane ->aeroplaneaeroplane-Musical_notes-2010-11-16T07:05:00.000Z">

I think I've now resolved that particular issue, as well as instances within {{sic}}, and as image parameters within infoboxes. --Ohconfucius 07:05, 16 November 2010 (UTC)aeroplane"> aeroplane">

Hoorah!. It's not getting the URLs or the Rotten Tomatoes template either. Excellent! However, it also needs to avoid language templates, mainly {{Lang}} and {{Lang-en-US}}. McLerristarr | Mclay1 07:10, 16 November 2010 (UTC)
  • {{lang-en-US}} and {{lang-en-GB}} are not used often because they look awkward really and, in fact, I don't support their use. But {{lang}} is used a lot, or at least should be. It should be used anywhere a foreign word is used and on pages where American or British variants are given so definitely needs to be implemented on pages such as American and British English spelling differences if it is not already. I noticed when testing the script on humour that several of the foreign language interwiki links spelt "humour" as "humor". Correcting foreign languages which spell the same as American could be avoid if the words were in a language template like they should be (interwiki links will be avoided anyway though). McLerristarr | Mclay1 15:21, 16 November 2010 (UTC)

You may wish to see this. I have no idea what it did, but apparently the script now removes non-existant musical notes. McLerristarr | Mclay1 15:29, 16 November 2010 (UTC)aeroplane"> aeroplane">

  • The notes are used as a unique protection string, and I have never seen urls using the musical notes. Seeing that these are positioned within words which are subject to script action, and in the exact places of insertion, I suspect they may have been left by a previous incomplete script execution possibly by my friend Radiopathy, who frequently uses the script. As a unique character was chosen for protect, the removal relies on a very simple line of code. Checking the urls confirms that the correct urls are indeed without the notes, so I don't think this is a problem within articles. --Ohconfucius 15:40, 16 November 2010 (UTC)

Aircraft

I'm not sure I agree on changing "aeroplane" and "airplane" to "aircraft". Aircraft is a much broader term that also includes zeppelins and the like. Fixed-wing aircraft is the compromise but that sounds awkward in general text, but so does just "aircraft". "They travelled by aircraft to America", "He caught an aircraft at noon" etc. If a page is written entirely in British English, I see no reason why "aeroplane" can't be used. McLerristarr | Mclay1 12:28, 15 November 2010 (UTC)

Suggestion for adding templates

Instead of adding {{EngvarB}} or {{EngvarOx}}, should the script add {{Use British English}} or {{Use British (Oxford) English}} instead? GoingBatty (talk) 02:38, 16 November 2010 (UTC)

Oxford English

Hey, I was using the Oxford script on The Hobbit and it wanted to covert a few words ending in "-ise" to "-ize" which should end in "-ise" in Oxford English. Is there a way around this problem? I noticed you mentioned it in the script documentation. If it's just a matter of listing all the exceptions, then Misplaced Pages:Manual of Style (spelling)/Words ending with "-ise" or "-ize"#Words never ending with "-ize" maybe of some help, otherwise sorry for telling you about something you already know. McLerristarr | Mclay1 01:47, 17 November 2010 (UTC)

  • I have been concentrating on 'standard' British English spellings, and the Oxford spelling is admittedly a poor cousin (actually stemming from my own preference for s-words in general). Unlike the conversion to -ise, which is more refined (more lines to distinguish the different cases), the code which converts to -ize is a bit crude. I would gladly add more words to the protected list, and make more refinements with your help. --Ohconfucius 01:59, 17 November 2010 (UTC)
  • I've just looked at the code again. Right now, it will convert to -ization only if the stem is five letters or more; to -ize only if preceded by vowel+consonant(not-s). Thus, of the words on your above list, only 'compromise', 'devise'/revise', 'improvise', premise/promise', 'televise' will be converted. The code has been adjusted accordingly for these. --Ohconfucius 02:57, 17 November 2010 (UTC)

British English categories

I've created two more sub-categories: Category:All Misplaced Pages articles written in British English and Category:All Misplaced Pages articles written in British (Oxford) English. I've updated the templates and progress boxes. The categories do not have many items in them yet according to my Misplaced Pages, could be to do something to do with the cache or it could be Misplaced Pages being slow. Eventually though, every article tagged with one of the templates will be added to the respective category as well as the dated category. McLerristarr | Mclay1 05:34, 17 November 2010 (UTC)

Clean-up

The British English script currently changes "cleanup" to "clean-up" in {{Cleanup}} and as a parameter of {{Multiple issues}}. Could this be avoided? McLerristarr | Mclay1 07:31, 22 November 2010 (UTC)

  • I've just protected the string. Try now. --Ohconfucius 07:50, 22 November 2010 (UTC)
    • Works perfectly. Thank you. Although, by testing it I noticed that the rules do not work when preceded by * or # so listed items are not corrected. McLerristarr | Mclay1 08:03, 22 November 2010 (UTC)
      • Thanks for the feedback. As I don't quite understand what you mean, please could you give me the exact strings/situations still causing the problems? I need to have this to create the most precise protection without giving rise to false positives. Cheers, --Ohconfucius 08:07, 22 November 2010 (UTC)
        • Try using the script on this page. It doesn't correct list items unless the there is a space between the bullet point and the text. McLerristarr | Mclay1 08:33, 22 November 2010 (UTC)
          • Yes, at present, the words need to be preceded by a space or an opening square bracket to be converted. I wrote those cases to avoid false positives. The hash character (#) could cause problems, as it is used within wikilinks to denote sections, so I need to have a think how to deal with these examples. --Ohconfucius 08:39, 22 November 2010 (UTC)

Missing rules and incorrect changes

Hey, just a few things I've discovered through using your great script. Currently, the Oxford script is incorrectly changing "arise" but is not changing "bastardise", "philosophise", "standardise" or "synthesise". Both scripts do not correct "aging" ("ageing"), "counterclockwise" ("anticlockwise" – make sure Oxford doesn't catch the ending), "breathalyze" ("breathalyse"), "cataloged" ("catalogued"), "cataloging" ("cataloguing"), "encyclopedia" ("encyclopaedia"), "encyclopedic" ("encyclopaedic" – but not in maintenance templates), "aerie" ("eyrie"), "gotten" ("got"), "licorice" ("liquorice"), "louver" ("louvre"), "math" ("maths"), "molt" ("moult"), "mollusk" ("mollusc"), "ocher" ("ochre"), "omelette" ("omelet"), "phony" ("phoney") and "specialty" ("speciality"). They're the main ones but not all of them. I've complied a (currently incomplete) list of British and American terms and spellings at User:Mclay1/Britishisms. It's useful for testing the scripts, although not all the list items can be corrected due to ambiguity. In some cases, an American spelling is more common in British English (e.g. "gramme"/"gram") or vice versa but in those cases I've only listed one spelling. Feel free to add to or correct the list if you want. McLerristarr | Mclay1 16:18, 22 November 2010 (UTC)

  • Thanks for your comprehensive test notes. Enhancements dealt with as follows:

    changing "arise" but is not changing "bastardise", "philosophise", "standardise" or "synthesise". Both scripts do not correct "aging" ("ageing"), "counterclockwise" ("anticlockwise" – make sure Oxford doesn't catch the ending), "breathalyze" ("breathalyse"), "cataloged" ("catalogued"), "cataloging" ("cataloguing"), "encyclopedia" ("encyclopaedia"), "encyclopedic" ("encyclopaedic" – but not in maintenance templates), "aerie" ("eyrie"), "gotten" ("got"), "licorice" ("liquorice"), "louver" ("louvre"), "math" ("maths"), "molt" ("moult"), "mollusk" ("mollusc"), "ocher" ("ochre"), "omelet" ("omelette"), "phony" ("phoney") and "specialty" ("speciality").

    I figured that words like "math", "phony" and "gotten" are vernacular and likely to be used only in quotes, and conversion risks creating false positives; "Licorice" appears to be an acceptable British spelling, so I will not treat this. --Ohconfucius 17:34, 22 November 2010 (UTC)

    • Thanks a lot. According to Oxford Dictionaries Online, which is where I'm getting a lot of the words from, "licorice" is the US spelling. McLerristarr | Mclay1 00:06, 23 November 2010 (UTC)
      • I have now tweaked the code. You now have 'liquorice'; instances preceded by '*' will also now be converted- we just need to be on the lookout for false positives... --Ohconfucius 02:30, 23 November 2010 (UTC)
        • I should point out that I have not added contexts to my list yet so in some cases, nouns and verbs are spelt differently in British English. For example annex (verb) and annexe (noun), which you seem to have added to your script. McLerristarr | Mclay1 16:04, 23 November 2010 (UTC)
          • While I have tried to build in context in some instances (ie practice vs practising, color vs coloured), I was not aware of any issues with annexe, as I have been accustomed to seeing it in all contexts. So I'm glad I have the assistance of somebody more scholarly in refining the script spellings ;-) --Ohconfucius 01:34, 24 November 2010 (UTC)

Suggestion for adding templates

I originally (maybe improperly) posted this question on User talk:Ohconfucius/EngvarB but didn't receive an answer. Instead of adding {{EngvarB}} or {{EngvarOx}}, should the script add {{Use British English}} or {{Use British (Oxford) English}} instead to avoid template redirects? GoingBatty (talk) 03:21, 1 December 2010 (UTC)

  • Thanks for the reminder. I did indeed see it and apologise for not responding. The change involves a piece of code I borrowed, and I am seeking assistance how to adapt it to do the job you suggested. In the meantime, you may be aware that Smackbot passes by regularly and replaces the redirects, which include {{cn}}, with the proper dated maintenance template. --Ohconfucius 03:45, 1 December 2010 (UTC)

User:Ohconfucius/EngvarB.js

I fixed some bugs in your script, per your request. Hopefully it is now working as you desire. By the way, it looks like you have hard-coded the date in the script. Would you like to make this automatic based on the current month and year? Hopefully I didn't make a mess of anything. Thanks! Plastikspork ―Œ 01:42, 7 December 2010 (UTC)

To see how you can get the current month name, see . To get the current year, you can use . Plastikspork ―Œ 01:50, 7 December 2010 (UTC)
  • The script is now tagging once again. What it does now:
    on clicking the 'British English' button in an article without any tag, the script task is performed and the tag {{EngvarB|date=December 2010}} is inserted.
    on clicking the 'British (Oxford)' button in an article without any tag, the script task is performed and the tag {{EngvarOx|date=December 2010}} is inserted.
    on clicking the 'British English' button repeatedly, the tag {{EngvarB|date=December 2010}} is inserted repeatedly.
    on clicking the 'British (Oxford)' button repeatedly, the tag {{EngvarOx|date=December 2010}} is inserted repeatedly.
  • What I would like it to do:
    on clicking the 'British English' button, insert the tag {{Use British English|date=December 2010}}.
    on clicking the 'British English' button repeatedly, there should only be a single {{EngvarB|date=December 2010}} tag at the end of the operation.
    on clicking the 'British (Oxford)' button repeatedly, there should only be a single {{EngvarOx|date=December 2010}} tag at the end of the operation.
    on clicking the 'British (Oxford)' button in an article already tagged with {{EngvarB|date=Month Year}}, {{EngvarOx|date=Month Year}} or {{Use British English|date=Month Year}} or similar permutations, the sole tag is updated to {{Use British (Oxford) English|date=Newmonth Newyear}}.
    on clicking the 'British English' button in an article already tagged with {{EngvarB|date=Month Year}}, {{EngvarOx|date=Month Year}} or {{Use British English|date=Month Year}}, the tag is updated to {{Use British English|date=Newmonth Newyear}}.

It doesn't matter so much if it inserts EngvarB or EngvarOx, but I would like it not to keep reinserting tags when they already exist; also it is undesirable to have (both) contradictory tags on the same article. Thanks in advance for your help. --Ohconfucius 02:49, 7 December 2010 (UTC)

I believe I see what you mean. There are a couple solutions. (1) You can check for the tag before inserting one, or (2) you can remove duplicate tags, or (3) you can do both. I will think about it, and see if I can code something up. Plastikspork ―Œ 02:58, 7 December 2010 (UTC)
Okay, try it now. Plastikspork ―Œ 03:55, 7 December 2010 (UTC)
  • Seems to work fine now. Many thanks.

    I have a side question: for some reason, some (and only some) of my script buttons -particularly the British English buttons (which are in their own little 'Script' section in the sidebar along with 'Custom regex'), and some others - disappear intermittently, although the script remains callable through a hook (Ohc_ENGVARplus) I placed in my vector file. I wouldn't say this is 'normal' or expected, but have you noticed similar behaviour? Could it perhaps be due to an error in the script somewhere? Ohconfucius 04:25, 7 December 2010 (UTC)

Hello! Sorry for delay in answering your comment. If I understood correctly what was said above, the script is already working as desired. Is it needed anything else?

I have a suggestion about this edit: it seems possible to simplify the code using for example {{Use British English|{{subst:DATE}}}} (see for example Template:Clarify). The result would be this. Helder 18:34, 7 December 2010 (UTC)

  • Thanks, I will try that on my other scripts.

    I have noticed that scripts do sometimes work even when there are syntax errors, and have a query/problem OF intermittent faulty loading (above) which is leading me to suspect there may be a bug in one of my scripts. What ways do you use to test? Someone suggested I tried using Firefly to test/debug the code, but I don't find it very intuitive to use, so I didn't bother. --Ohconfucius 01:38, 8 December 2010 (UTC)

    You can try Firebug for debugging. Helder 09:47, 8 December 2010 (UTC)
    Thanks. --Ohconfucius 09:51, 8 December 2010 (UTC)

'Paradize'

Hello, this new scripting all seems to be working fine for me. Can you please edit the Oxford script to prevent it from changing "paradise" to "paradize"? McLerristarr | Mclay1 07:03, 7 December 2010 (UTC)

Robbie Robertson

When tagging something Oxford English, could you provide your reasons? I'm not sure a Canadian-Native American born musician who had his big break backing a very American singer and thereafter spent most of his time in the States deserves the privilege! --John (User:Jwy/talk) 13:19, 21 December 2010 (UTC)

  • I was intending on running my script, which merely changes spelling but not the vernacular, on all Canadian articles; you must excuse the tagging. The 'Oxford' label may seem counter-intuitive at first glance, but according to my reading, Canadian English spelling is identical in most respects to Oxford English, so applying this particular WP:ENGVAR fix seemed appropriate to me. I hope this is a satisfactory explanation. your further feedback would be most welcome. --Ohconfucius 15:04, 21 December 2010 (UTC)
According to the Canadian English page, "Words such as realize and paralyze are usually spelled with -ize or -yze rather than -ise or -yse." Isn't that contrary to the a key Oxford distinction? And I haven't looked, but would suggest if you haven't your run this by the Wikiproject_canada. There is probably more subtlety required. --John (User:Jwy/talk) 15:22, 21 December 2010 (UTC)
It appears that z-words in Oxford and Canadian English are spelt the same. --Ohconfucius 15:48, 21 December 2010 (UTC)
Oh sorry, I thought Oxford was in the -ise camp. Cheers. --John (User:Jwy/talk) 16:06, 21 December 2010 (UTC)
Just for your FYI U.S. Spelling versus British and Canadian Spellings See also :Misplaced Pages talk:Canadian Wikipedians' notice board#WP:ENGVAR.Moxy (talk) 03:51, 22 December 2010 (UTC)

Engvar script - adding functions

from Plastikspork's talk page Hi Plastikspork,

I could once again do with your expert help in adding functionalities to my Engvar script, the test version of which is here. I am attempting to add functionality for Canadian English, consisting of two additional functions. I have separately tested the two modules, and find that they work as intended. I lost the sidebar buttons since going to the latest version. The current version lacks the menu buttons, but still can be called. Note that function insert_Engvar(v1) has not yet been updated for the Canadian code. Cheers, --Ohconfucius 03:13, 23 December 2010 (UTC)

You caught me just as I was packing for holiday. I may have some time, depending on how the packing goes. Plastikspork ―Œ 03:41, 23 December 2010 (UTC)
This can wait till after the hols. Have a good one! --Ohconfucius 03:43, 23 December 2010 (UTC)
Happy New Year! Hope you had a good break. It seems that I have the sidebar buttons. However, the Canadian button currently sits in the middle and displays as 'British spelling'; the article is tagged {{Use British English|etc after activation although the underlying changes are as per Canadian, as written in the regex rules. --Ohconfucius 08:14, 3 January 2011 (UTC)
So this is for the test version? I will see if it does the same thing for me. Plastikspork ―Œ 01:41, 4 January 2011 (UTC)
Yes, this is the test version. The 'main version' does not yet incorporate the rules for Canadian English. Once it is working, I will copy it over. --Ohconfucius 02:06, 4 January 2011 (UTC)
Okay, did my change work? It looked like the link to case "C" was using "BRITISH" for the text. Plastikspork ―Œ 02:22, 4 January 2011 (UTC)
Try it now. It seems to be working. The only oddity is what it does to the edit summary if you repeatedly push the various buttons. I could fix that as well, but it would require removing prior edit summary before adding a new one. Plastikspork ―Œ 05:13, 4 January 2011 (UTC)

Engvar script notes

Haven't tried a full modification to the script yet, but to implement Australian English tagging, a good approach seems to be in updating function rmflinks() to add a regexTool line for Australia, which would call with a new "A" (Australian) parameter (SetEnglish("A")). The SetEnglish() function would add a case like this:

case 'A': Ohc_ENGVARprotectwords(); Ohc_ENGVARSimple(); zwords(); Ohc_ENGVARAedit_summary(); break;

Then add a case in function insert_Engvar(v) under the switch (v):

        case 'A':
           // Replace British/British (Oxford)/Canadian with Australian
           txt = txt.replace( reB, '');
           txt = txt.replace( reOx, '');
           txt = txt.replace( reC, '');
           // Prepend Australian template if not already tagged
           if( txt.search(reB) == -1 ) {
               txt = '\r\n' + txt;
           }
           break;

(You will likely need to add a "reA" for Aus Eng, and txt.replace that in the other cases)

Also note the call to a new edit summary function for Australia:

function Ohc_ENGVARAedit_summary(){
       //Add a tag to the summary box
	setoptions(minor='true');
	setreason('] by ]', 'append');
      // doaction('diff');
}


That involves a few updates, but shouldn't be excessively complicated to expand to add an Australian update, which could initially just call the British spelling fixes until some Aus-specific spelling differences emerge. Dl2000 (talk) 20:57, 11 September 2011 (UTC)

Script bug report

Seems it's adding BrEng tags on top of AusEng's Dl2000 (talk) 00:15, 29 October 2011 (UTC)

OK, just took a look at the routine in question, though I haven't had a chance to try any script tests yet. However, I noticed that you assigned reB first to the Australian regexp, but then wrote that over with the British one. What is needed is a separate reA variable for the Australian regexp. Then it would be applied to cases other than itself. Also, in each case, all other variants should be substituted. The coding could be changed to something like this (though I haven't tested this yet, and it may be subject to formatting issues, suggested changes in blue):
function insert_Engvar(v){
	// Add a template to the article identifying English variant
	var box = document.editform.wpTextbox1;
	var txt = box.value;
        // Build a string with "Month YYYY"
       var dateobj=new Date();
       var month=new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
       var datestr= month + ' ' + dateobj.getFullYear();
       // Matches Use Australian English or EngvarA
       var reA = new RegExp('{{*(?:se+Australian+English|ngvarA)*(?:|\\|*date*=*)*}}', 'gi');
       // Matches Use British English or EngvarB
       var reB = new RegExp('{{*(?:se+British+English|ngvarB)*(?:|\\|*date*=*)*}}', 'gi');
       // Matches Use British (Oxford) English or EngvarOx
       var reOx = new RegExp('{{*(?:se+British+\\(Oxford\\)+English|ngvarOx)*(?:|\\|*date*=*)*}}', 'gi');
       // Matches Use Canadian English or EngvarC
       var reC = new RegExp('{{*(?:se+Canadian+English|ngvarC)*(?:|\\|*date*=*)*}}', 'gi');
       switch (v) {
           case 'A':
           // Replace existing variants with Australian
           txt = txt.replace( reOx, '{{Use Australian English|date=' + datestr + '}}');
           txt = txt.replace( reB, '{{Use Australian English|date=' + datestr + '}}');
           txt = txt.replace( reC, '{{Use Australian English|date=' + datestr + '}}');
           // Prepend Australian template if not already tagged
           if( txt.search(reA) == -1 ) {
               txt = '{{Use Australian English|date=' + datestr + '}}\r\n' + txt;
           }
           break;
	  case 'Ox':
           // Replace with British (Oxford)
           txt = txt.replace( reA, '{{Use British (Oxford) English|date=' + datestr + '}}');
           txt = txt.replace( reB, '{{Use British (Oxford) English|date=' + datestr + '}}');
           txt = txt.replace( reC, '{{Use British (Oxford) English|date=' + datestr + '}}');
           // Prepend British (Oxford) template if not already tagged
           if( txt.search(reOx) == -1 ) {
               txt = '{{Use British (Oxford) English|date=' + datestr + '}}\r\n' + txt;
           }
           break;
        case 'B':
           // Replace with British
           txt = txt.replace( reA, '{{Use British English|date=' + datestr + '}}');
           txt = txt.replace( reOx, '{{Use British English|date=' + datestr + '}}');
           txt = txt.replace( reC, '{{Use British English|date=' + datestr + '}}');
           // Prepend British template if not already tagged
           if( txt.search(reB) == -1 ) {
               txt = '{{Use British English|date=' + datestr + '}}\r\n' + txt;
           }
           break;
        case 'C':
           // Replace with Canadian
           txt = txt.replace( reA, '{{Use British English|date=' + datestr + '}}');
           txt = txt.replace( reB, '{{Use Canadian English|date=' + datestr + '}}');
           txt = txt.replace( reOx, '{{Use Canadian English|date=' + datestr + '}}');
           // Prepend Canadian template if not already tagged
           if( txt.search(reC) == -1 ) {
               txt = '{{Use Canadian English|date=' + datestr + '}}\r\n' + txt;
           }
           break;
       }
	box.value = txt;
}

Dl2000 (talk) 03:52, 29 October 2011 (UTC)

  • Ah yes, silly me. I had meant to create 'ReA' and not a second 'ReB'. Ohconfucius 04:12, 29 October 2011 (UTC)
    • I have now created a button for Australian English. The vocabulary engine for this is identical to British English. My question is that, when I run the 'British' script button on an article you processed using Australian, how can I get the script recognise the Aus template and update it, and not to insert British template? --Ohconfucius 05:05, 29 October 2011 (UTC)
      • Hmmm... seems the script is designed to override existing templates. Sometimes that may come in handy e.g. to fix British articles mistagged as another variant. However, to have the script respect an existing variant tag, you'd likely need separate button, one to stop if an existing format is applied, and another to override. One way might be to add an override parameter to the function (insert_Engvar(v, override)) - a 1/true override value would run the function as it does now; 0/false on a variant would check if another variant tag exists in the article, and if so, stop the conversion e.g. run British without override, first test if reA, reC or reOx are present, if so return out of the function; otherwise, proceed to tidy up for British English. Not sure how to signal that the function stopped on an existing tag, though, other than not to make any changes (perhaps append an edit summary code?). I haven't had a chance to work on scripting the concept out yet, though. Dl2000 (talk) 14:50, 29 October 2011 (UTC)
          • Check this function out:
// type - the full word of the English variant type to be tagged to
function Dl2_EngTag(type) {
    var txt=document.editform.wpTextbox1;
    // If there's an existing tag, prompt to override
    langvars = new Array("American", "Australian", "British (Oxford)", "British", "Canadian", "Indian", "Irish", "Pakistani" );
    var curryyyymm = Dl2_CurrMY();
    for (i = 0; i < langvars.length; i++)
    {
        var rxTemp = new RegExp('{{*(?:se+' + langvars + '+English|ngvarB)*(?:|\\|*date*=*)*}}', 'gi');
        if ((langvars != type) && (txt.value.search(rxTemp) >= 0))
        {
            if (confirm(langvars + ' English tag already exists - override?'))
            {
                var newtag='{{Use ' + type + ' English|date='+curryyyymm+'}}';
                txt.value=txt.value.replace(rxTemp, newtag);
            }
            else
            {
                return;
            }
        }
    }
    // add tag if not already present (or changed above)
    var rxpdd = new RegExp("{{Use " + type + " English", "gi");
    var dflagfound = txt.value.search(rxpdd);
    if (dflagfound == -1)
    {
        txt.value='{{Use ' + type + ' English|date='+curryyyymm+'}}\r\n'+txt.value;
    }
}
This is called with the full language name e.g. Dl2_EngTag("British"). The key is in the langvars array, which is a list of the full variant names, which are looped through in the first section to check for existing language tags. If a different tag is found that the variant to be applied, the script will prompt to override and change the tag - OK/Cancel. The last part will add a new tag if none was available. Updating a single langvars array should be better to maintain that having to update numerous cases. Dl2000 (talk) 21:55, 29 October 2011 (UTC)

Annex/annexe

EngvarB (Oxford) is correcting annex to annexe. However international standards (ISO/IEC) written in British Oxford English use the annex spelling, furthermore the Oxford dictionary suggests both are correct. However annexe is listed as chiefly British, I suggest we always use annex per MOS:COMMONALITY. Lmatt (talk) 20:20, 2 January 2012 (UTC)

Part of policy?

I thought this was part of MOS. If it works as a subpage of Ohconfucius, why complain? It just seems "unusual." Student7 (talk) 16:26, 11 January 2014 (UTC)

Words to avoid

The policy mentions ise vs ize compromises. I would think that a list of "words to avoid" might be in order. Americans/Canadians should be careful about using the word "napkin" for example, meaning an article of hygiene in British, but they should use "serviette" (or whatever) instead.

British should really avoid using words with an unnecessary "st" at the end, like "amongst," "whilst," for example. These sound "funny/humorous" to an American (and probably Canadian) ear. It's hard to take the article seriously after encountering these words. "Among" and "while" are equally valid and don't put off an American audience. When I've tried to get editors to change in the past, they became quite annoyed! Even though this would improve readability. I'm sure there are many other words on all sides. Student7 (talk) 16:26, 11 January 2014 (UTC)

Default operation – Oxford or non-Oxford?

My understanding is that if you run the tool in its default mode without providing specific guidance, it will apply the non-Oxford ("-ise") spelling convention. Is that correct? —BarrelProof (talk) 18:40, 3 May 2014 (UTC)

Oxford-style script

The script isn't picking up the word 'tire'. A minor thing, but I thought I'd make mention. RGloucester 16:44, 8 May 2014 (UTC)

Script error

Seems your script is making incorrect changes - Mlpearc (open channel) 17:21, 4 November 2016 (UTC)

For British English with Oxford Spelling the script is changing 'unrevised' (correct) to 'unrevized' (incorrect). The script is inconstent as it leaves 'revised' alone. Please see this page for an explanation as to why the spelling should be 'unrevised'. Deagol2 (talk) 21:57, 4 November 2016 (UTC)

Sometimes Color shouldn't be replaced

Is there a way to avoid changes like these "timeline" changes here ? - Mlpearc (open channel) 17:41, 19 March 2017 (UTC)

Also have a similar issue with "Centre" within tables. Is there a way to first test to determine if it's within a table and then not change it ? - Mlpearc (open channel) 14:10, 11 May 2017 (UTC)

Added Commonwealth English

I've created templates and categories for Commonwealth English, to address the ENGVAR need to account for "EngvarB" stuff that is not specifically British, Australian, or another major dialect for which dialect-specific style guides and a codified, formal written register exist. This is to both forestall creation of junk like "Use Trinidadian English" or "Use Zimbabwean English" templates, and to provide a merge-and-redirect target for various existing templates we do not actually need.

So, please add Commonwealth English to the list your scripting and documentation account for.  — SMcCandlish ¢ 😼  19:11, 22 June 2018 (UTC)

Make sure the script does not override any local variety of English. If there is a {{Use British English}} or {{Use Australian English}} template, they must never be changed by the script. Hawkeye7 (discuss) 14:01, 30 July 2019 (UTC)
the tags mean nothing and get in the way. I don't understand why they started appearing. -- Ohc  16:23, 8 June 2024 (UTC)

More incorrect changes

"Overrule" should not be changed to "Over-rule" Hawkeye7 (discuss) 14:01, 30 July 2019 (UTC)

Also, in American English, it should not change "vice president" to "vice-president". --- Coffeeandcrumbs 12:38, 10 November 2019 (UTC)

Improvisation

Is improvization proper spelling in any form of English? See this edit. A cursory look online did not show it as an American v British English variation. Kees08 (Talk) 14:38, 25 December 2019 (UTC)

European Union instructions

Thanks for this script! I've found it very useful. I noticed however the following in the documentation, added here :

according to the EU style guide for publications, British English is the official code of English to be employed for the European Union. This appears to imply that the relevant code for en.WP articles about the EU and its member states ought to be in British English.

This is a reasonable opinion, but doesn't reflect the Manual of Style and long-standing consensus at Misplaced Pages talk:Manual of Style. British English should be used for institutions of the EU, but not necessarily for articles about member states etc. I'm concerned that people installing this script might take it as an instruction that it should be used in this way, and be misled to believe that this is the accepted Misplaced Pages custom. Consensus has been consistently to the contrary: MOS:TIES applies only to majority Engish-speaking nations such as Ireland. Maybe removing those two sentences would be a good idea. Thanks for considering this... --IamNotU (talk) 14:21, 22 August 2020 (UTC)

Interaction with Short Description

The action of prepending an instance of {{EngvarB}}, when there are already certain other leading items, conflicts with MOS:ORDER (as here where it demoted the {{short description}}). I fixed that instance. David Brooks (talk) 18:44, 2 November 2022 (UTC)

@Ohconfucius and DavidBrooks: This has been bothering me as well if you could develop a fix. Thanks. — voidxor 19:31, 7 April 2023 (UTC)

Balk / Baulk

Thank you for this marvelous tool! I was reading an article and saw "baulk" and thought it was a typo, but, after running it down, it appears that Brits write "baulk", while we Americans write "balk". Maybe this could be added to the script? Thanks, again! -Bryan Rutherford (talk) 12:34, 14 March 2023 (UTC)

American script removes US spelling option from Convert template

See this edit, in which I clicked the AMERICAN link and made no manual changes. For some reason, your script removed |sp=us from the {{Convert}} templates, which resulted in "kilometers" then rendering as "kilometres". Surely this is a bug, right? — voidxor 17:46, 22 March 2023 (UTC)

American script misspells 'derailment'

See this edit, in which I clicked the AMERICAN link and made no manual changes. Your script is misspelling "derailment" as "deraillment", and ditto in the plural form. It's still spelled "derailment" in American English.

Is anybody still watching this talk page? The bug reports are piling up. — voidxor 18:30, 23 May 2023 (UTC)

UPDATE: This is still an issue, as seen here. — voidxor 16:46, 17 February 2024 (UTC)

Deleted template

Is this script still using the deleted {{EngvarU}} listed in the last paragraph of the documentation in the Scope section as one of the parameters, or does the documentation need to be updated? Huggums537 (talk) 03:44, 13 June 2023 (UTC)

EngvarB instead of Use British English

The following discussion has been moved from Misplaced Pages:Date formattings/script/MOSNUM dates/bugs § EngvarB.

Why does this script change {{Use British English}} to {{EngvarB}}, as seen here? XAM2175  21:52, 18 June 2023 (UTC)

@Voidxor; drawing your attention to this. XAM2175  17:34, 19 June 2023 (UTC)
I moved this discussion because it's actually the EngvarB script that I was using, not the MOSNUM one.
Note to everybody: I directed XAM2175 here with his concerns about this, with which I fully agree.
@XAM2175: To give you some context here, installation of this script puts four links in the editor's sidebar; they are labeled "American", "Commonwealth", "Oxford", and "Canadian". These are a one-click way of fixing spelling discrepancies in an article. Obviously the script can only fix spelling as of yet, and is not smart enough to fix other English variations such as grammar or turn-of-phrase. I believe the {{EngvarB}} template predates the {{Use British English}} one, which is clearly more specific. Conversely, saying "Use British English" doesn't actually tell editors what spellings to use because it could still be Commonwealth or Oxford.
I'm not sure what the solution is here. Should the {{EngvarB}} template coexist alongside {{Use British English}} on certain articles? — voidxor 19:52, 19 June 2023 (UTC)

American spelling "analyses"

When using "analyses" as the plural of "analysis," your script changes it to "analyzes" when selecting American English. Rusty4321  15:52, 7 January 2024 (UTC)

Wikilinks

Good day Ohconfucius, I was wondering, when using the script for EngvarA, is there a way for the script to not change anything inside ] the brackets, most times it's a name or title with a "S" it obviously changes it to "Z". - FlightTime (open channel) 20:24, 7 January 2024 (UTC)

Sorry, I don't remember a specific instance, but the script changes wording inside wikilinks brackets, which breaks that link. I'll look for an instance, but that's the nutshell. - FlightTime (open channel) 16:28, 8 June 2024 (UTC)

Australian English

I keep seeing {{Use Australian English|date=}} in articles, is there a version I'm missing? - FlightTime (open channel) 00:42, 30 August 2024 (UTC)

@FlightTime:: No, there's no script for that, nor the similar ones for New Zealand, British, South African. The script only checks spelling, not word differences or other dialect differences like phrases. So those tags are applied manually. Spelling would still be Commonwealth or Oxford. — voidxor 01:52, 2 September 2024 (UTC)
Thank you, - FlightTime (open channel) 03:20, 2 September 2024 (UTC)

Add IUPAC spelling as an option

Per Misplaced Pages:Naming conventions (chemistry)#Element names, IUPAC spelling should be dominant for chemistry-related articles. A few excerpts from the guideline say

aluminium not aluminum
sulfur not sulphur
caesium not cesium

These spellings should be used in all chemistry-related articles on English Misplaced Pages, even if they conflict with the other national spelling varieties used in the article.


This convention should also be applied to all compounds and derivative names of these chemicals: sulfate not sulphate; sulfuric not sulphuric; etc.

Since some of the chemical articles definitely need their spelling checked, I request to add an IUPAC option to change the names of chemical elements, compounds, and their derivatives to their IUPAC spelling variants so this tool can be used on more articles, especially chemistry-related topics. For example, I want to use this script in Aluminium, which uses American English. However, the IUPAC spelling is different from the American spelling, so running the script makes the spelling consistency off. Such an addition would benefit the chemistry community and I really wish you'd add this feature. Thank you in advance. ZZ'S 08:18, 15 October 2024 (UTC)

Courtesy ping: Ohconfucius in case you weren't aware of it. ZZ'S 19:39, 21 October 2024 (UTC)
OK, thanks. This issue is under consideration, I will revert soon.  Ohc  20:45, 7 November 2024 (UTC)
Many non-US chemists use the "ph" (the "f" is US). But I'm happy for that if we can ban "aluminum". Just check that IUPAC wants "caesium", not "cesium". Tony (talk) 00:57, 8 November 2024 (UTC)
The appropriate chemical elements have been listed above. Don't forget the "compounds and derivative names of these chemicals". Also, it does not matter if many non-US chemists use "ph". If the article is related to chemistry, then sulfur should be used instead of sulphur per the above quote. ZZ'S 01:17, 8 November 2024 (UTC)
@Zzzs:I wasn't sure that such a change belongs in the ENGVAR script, but as I have a section on making changes for WP:COMMONALITY in my formatting script, I decided to write the regex lines for sulphur -> sulfur, aluminum -> aluminium and cesium -> caesium there. Let me know if there are any more that need this, or if you feel it belongs elsewhere. Regards, -- Ohc  21:15, 13 November 2024 (UTC)

2017 Wikitext editor

Does this script not work with the 2017 Wikitext editor? Ifly6 (talk) 17:39, 6 November 2024 (UTC)