User talk:Johnuniq

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

I'll reply to messages here, unless requested otherwise.

Index of stuff[edit]

Check for unknown parameters[edit]

first, thank you for fixing the error from % in the parameter name. it would be amazing if you could make the mangling more robust/less complicated. basically, we want to "nowiki" the result and put it in "_VALUE_" in a way that (1) shows meaningful output, (2) isn't way too long, and (3) works as a category sort key. for positional args, we also show the value in preview mode, since the entire point of the warning is help the editor fix the issue. what I have there right now is using encode to html encode any known problematic characters (e.g., most problematic are probably brackets and newlines and possible pipes, but those would be harder to get in there). I was playing around with mw.text.nowiki instead, but I never really tested it that much to see if that was a better alternative. also, we can somewhat nonsensical output for <ref> in the output since these are "stripped" before we get the parameters. it would be great if we could make these appear as they do in the wikitext. thank you again. Frietjes (talk) 15:32, 26 January 2019 (UTC)

I'll have a look and will ping you when done. Module:Convert has to do something similar. I'll think about it. Johnuniq (talk) 02:39, 27 January 2019 (UTC)
@Frietjes: I'm working out what to do, and you might see that I did some minor refactoring in the sandbox. However, I'm not sure that anything good can be done with tags like <ref>. I would be inclined to use mw.text.killMarkers(s) to remove all strip markers from the displayed text. Or, possibly put in some klunky code to replace them with "...". I don't think it is possible to get the original ref wikitext (short of reading all wikitext from the page and parsing it). Any thoughts about that? I gather there are no testcases? Johnuniq (talk) 09:02, 27 January 2019 (UTC)
your refactoring looks great! thank you for fixing some of the redundant code, and dummy parameter names. I am always learning something new. I made some testcases in User:Frietjes/c4u, but used regular wikilinks instead of category links to avoid polluting category space. if there is some sacrificial sandbox category, we could use that to make sure that's working, but I am assuming that stuff that is bad for link text is the same stuff that is bad for a category sortkey. Frietjes (talk) 15:28, 27 January 2019 (UTC)
Thanks, I'll use that and I added something. Category:Convert tracking is available if wanted although a category is probably not needed. Johnuniq (talk) 09:10, 28 January 2019 (UTC)
(talk page stalker) The subcategories of Category:Xn are made for testing, should you need some. BlackcurrantTea (talk) 11:55, 28 January 2019 (UTC)
BlackcurrantTea, great, thank you, I will use that category in the tests. Frietjes (talk) 14:14, 28 January 2019 (UTC)
Frietjes, glad to help. I think you'll want to use the subcategories - X1, X2, and so on - rather than Xn itself, which is the parent category. Cheers, BlackcurrantTea (talk) 14:24, 28 January 2019 (UTC)

I added an excellent clean function to the sandbox but it's not working! (It's not keeping the refs.) Strange because it seems to work in Module:Sandbox/Johnuniq/temp as seen in the results. I'll have a break from that now but will be back. Johnuniq (talk) 09:45, 29 January 2019 (UTC)

@Frietjes: I fixed a simple problem and the sandbox module now appears to be working well, see User:Frietjes/c4u#Test 6. In that, parameter 12 is |abc<math>x=12</math> which is displayed as abc.... That is, the invalid parameter is displayed after truncating it at the first strip marker that is not a reference (or sooner, if over 25 characters). You will see that ref tags are retained and are displayed as working references.

Now that I've got that working I'm thinking of another approach. How about not displaying references, and not truncating at non-reference strip markers. Instead, replace each strip marker with wikitext to show the idea, for example:

Johnuniq (talk) 06:29, 30 January 2019 (UTC)
Johnuniq, awesome. anything that makes it easier to both (1) generate a meaningful category sort key and (2) find the offending wikitext to fix it would be amazing. thank you again. Frietjes (talk) 13:33, 30 January 2019 (UTC)
@Frietjes: I reworked the clean function in accord with my last comment. It could be misleading in that an invalid parameter might be
abc<ref name="hello"></ref>"
and that would be displayed as "abc<ref>...</ref>" because there is no way to get the original wikitext. It does similar for all strip markers and will show something reasonable for example with "abc<nowiki>[[Example]]</nowiki>". After you have had a chance to think about that, it might be time to update the main module. Johnuniq (talk) 09:07, 31 January 2019 (UTC)
Johnuniq, what you have in there right now looks great. I would update the main module, but it's currently admin-only cascade protected due to transclusion on one of the main pages. whether or not I can edit it fluctuates day-to-day, so I was able to edit five days ago, but not today :) Frietjes (talk) 19:41, 31 January 2019 (UTC)


Information icon There is currently a discussion at Wikipedia:Administrators' noticeboard/Incidents regarding an issue with which you may have been involved. --Cards84664 (talk) 18:55, 30 January 2019 (UTC)

Thanks. I'll record some relevant links here. I think I was watching some of the pages after giving advice a couple of years ago.
Template:Adjacent stations
Template talk:Adjacent stations
Template:Rail color
Module:Adjacent stations
Module talk:Adjacent stations (redirect to Template talk:Adjacent stations)
Module:Rail (proposed new module)
Module talk:Rail
Johnuniq (talk) 06:29, 31 January 2019 (UTC)

Need your help with Module:Age[edit]

Hey John, I was wondering if you could help me. I'm in the process of copying date and age calculation templates and modules to the Dutch Wikipedia, and it hasn't been too much of an effort thus far. However, I'm struggling with telling Module:Age to use dmy instead of mdy by default when called on by {{death date and age}}, since I feel an additional parameter (df=y) shouldn't be required when a country's default is dmy.

I usually manage to stumble my way through intricate syntax by scavenging or trial and error, but this one I'm having trouble with. It's definitely clear to me that something needs to be changed in both instances of these lines, but what?

local df = stripToNil(args.df)  -- day first (dmy); default is month first (mdy)
local result = df and
	'%-d %B %-Y' or
	'%B %-d, %-Y'
result = '(<span class="bday">%-Y-%m-%d</span>) </span>' .. result
result = '<span style="display:none"> ' ..

Take care. Jay D. Easy (talk) 01:32, 13 February 2019 (UTC)

Hi Jay. The code is emulating the over-simplified technique used in many templates where any non-blank value for df is regarded as "yes". At enwiki, mf is ignored while any non-blank value for df gives dmy. You want the opposite:
local mf = stripToNil(  -- month first (mdy); default is day first (dmy)
local result = mf and
	'%B %-d, %-Y' or
	'%-d %B %-Y'
result = '(<span class="bday">%-Y-%m-%d</span>) </span>' .. result
result = '<span style="display:none"> ' ..
If there is a problem, link to a module I can edit. Johnuniq (talk) 02:21, 13 February 2019 (UTC)
Got it! I changed df to mf before already, but I'd neglected to swap the local results. Thanks for your help! Jay D. Easy (talk) 17:18, 13 February 2019 (UTC)

Module:Age for bnwiki[edit]

Hi, Johnuniq. We would like to use this module for bnwiki (bn:মডিউল:Age). But module does not support Bengali digit as input and gives result in english. Can you help? Could you implement something like you did here? or something like Trappist the monk did here (line 374-381) & here (2730-2733). I know you are busy and i don't need right now. but please do when you can. Thank you. --আফতাবুজ্জামান (talk) 16:40, 16 February 2019 (UTC)

I wondered about internationalization while writing Module:Date and Module:Age but I gave up because it's just too hard for the intricacies of what they do. The correct way to handle dates for other wikis is with things like mw.language:formatDate but I found it not quite right for what I wanted. I forget the details but I don't think it allowed the control I was after. I could think about it for a while. Johnuniq (talk) 04:35, 17 February 2019 (UTC)

@আফতাবুজ্জামান: I was hoping that some parser or Lua function would interpret local dates and provide a simple way for the module to translate a bn date to en. Then the module would process the en date as normal, and translate it to bn for output. It appears translating en dates to bn is easy, but I do not see a way to translate bn to en. I tried the following at bnwiki:

*{{#time:Y-m-d|9 February 2018|en}}
*{{#time:Y-m-d|৯ ফেব্রুয়ারি ২০১৮|en}}

The first two do what I hope, but the second two give "ত্রুটি: অবৈধ সময়" which I assume is an error message saying the input is not a valid date. Is that what the message says? Do you know of any method of accepting a bn date at bnwiki? How are dates normally formatted there? Is there any confusion such as the dmy/mdy usage which occurs here? Johnuniq (talk) 06:47, 20 February 2019 (UTC)

Unfortunately #time parser does not understand bn date (not only bn, any date other than en), dmy/mdy isn't problem here . Yes, "ত্রুটি: অবৈধ সময়" means "Error: Invalid time". To fix this problem, we use bn:Module:ConvertTime. I added some examples here. --আফতাবুজ্জামান (talk) 19:09, 20 February 2019 (UTC)
This is being continued at bn:Module talk:বয়স (Age). Johnuniq (talk) 05:54, 24 February 2019 (UTC)

Talk pages consultation 2019[edit]

The Wikimedia Foundation has invited the various Wikimedia communities, including the English Wikipedia, to participate in a consultation on improving communication methods within the Wikimedia projects. As such, a request for comment has been created at Wikipedia:Talk pages consultation 2019. You are invited to express your views and/or to add new topics in the discussion. WBGconverse 04:11, 24 February 2019 (UTC)

Yeah, I saw that. It is WP:Flow struggling out of its coffin as the WMF finds more junk to justify an expanding workforce. It's a shame they don't listen to the right people who could tell them what software developments are needed. It's more fun trying to beat Facebook. I know you are just the messenger. Johnuniq (talk) 05:59, 24 February 2019 (UTC)

No need to template me again with Gamergate DS[edit]

You already did so three years ago. -Starke Hathaway (talk) 05:59, 1 March 2019 (UTC)

@Starke Hathaway: I know it's annoying, sorry. However, you are incorrect about "No need" because it is necessary for alerts to be renewed every 12 months (search WP:ACDS for "twelve months" to confirm that). The same documentation mentions somewhere that alerts for the same topic must not be issued more frequently than once every twelve months. Therefore it is necessary to search for them in the history of the talk page ([1]) so I saw the old alert. Johnuniq (talk) 06:07, 1 March 2019 (UTC)

Control of fire by early humans[edit]

You reverted my one-word edit 'dubious'. You seem to justify your revision by implying the cited reference supports the claim made in the sentence in question, that ". . . humans are most awake during the early evening hours . . .".

Where in the reference is this claim supported? Where does it state that humans are most awake during early evening?

I trust you will undo your reversion if the assertion is not supported in the reference.Gaussgauss (talk) —Preceding undated comment added 20:51, 3 March 2019 (UTC)

Bishzilla Lucia Looking Right.gif
Hi Gaussgauss. This concerns my revert at Control of fire by early humans. Articles should be discussed at their talk page, in this case, Talk:Control of fire by early humans. Did you look at the reference? Its abstract verifies the information in the article. Johnuniq (talk) 05:59, 4 March 2019 (UTC)

Weatherbox and Modules[edit]

Are we allowed to use/translate code from these (modules) to use on other Wikipedias? Namely asking for Occitan since I'be been doing towns and noticed it doesn't include any type of way to show weather. I know things here seem to be public domain, I'm just new and nervous about toe-spepping by copying code over. Thanks for reading, and have a good one. BrennodAloisi (talk) 12:17, 8 March 2019 (UTC)

@BrennodAloisi: Sure, copy any template or module. You are supposed to use an edit summary that includes an attribution. For example, if copying Module:Weather box your edit summary would be (in your local language), with any other note wanted:
copy from [[:en:Module:Weather box]]
The weather box templates/modules are undergoing some major changes at the moment (see recent comments at Template talk:Weather box) and I'm fixing a couple of things which will take a day or two. After that I would be happy to help with any problems. It might be a good idea to wait in case some last-minute updates occur here. Johnuniq (talk) 23:37, 8 March 2019 (UTC)

Thank you, Johnuniq, and for getting back to me so quickly. In the meantime I've tried copying over a smaller model (climate diagram/(in Occitan)'diagrama climatic'), to see if I've got the basics of this down. Aside from a small bug with decimals, everything appears to work. I'm giving you time to work, though I'm eager to get started. Still getting used to Wikipedia and how the various knobs and switches for adding and testing things work. Kind regards, BrennodAloisi (talk) 19:30, 10 March 2019 (UTC)

Unfortunately you need a lot of stuff to make it work. The weather box code is:
However, the weather box template uses a system to check parameters and output a warning category if required. That means the following is also needed:
Also, the weather box module uses Module:Math which requires the following:
No one has raised any problems with regard to the major changes that I mentioned so it is probably ok to copy whenever wanted. Johnuniq (talk) 06:45, 11 March 2019 (UTC)

Got everything in,I'm just not sure how to handle the final part, which is setting up a WeatherBox with the localization. The Catalan version (nearest language, localisation in the Template code, updated early this year) uses a "buildRow" function, which the Occitan version doesn't seem to have (hence a line of errors for not having it.oops). Copying either one, English or Catalan, seems to leave a box with three things when I test it: - "Climate data at..." - Month - Jan, Feb, Mar, etc - The sources at the bottom. If you know how to help, pretty please. Catalan page (Clicking the translate link from 'weather box' takes you to 'Clima', a similar but different box) : My page (Occitan; currently has the Catalan text from my last test): kind regards, BrennodAloisi (talk) 17:04, 11 March 2019 (UTC)

EDIT::Someone smarter than me figured it out. Everything is fine. BrennodAloisi (talk) 03:43, 12 March 2019 (UTC)


@Johnuniq: Just to let you know User:Goldenshimmer improved the general articles section for Portal:Cotingas. It's showing alot more articles, thank heaven.Catfurball (talk) 20:17, 11 March 2019 (UTC)


Yes, a -2 value instead of 0 would probably be fine, although uses a precise value. It was necessary to make an amendment though since the previous value being rounded off to -5 places was completely inaccurate since it is not possible for the moon to be that close to the earth, so it was confusing. Roy Batty (talk) 23:44, 14 March 2019 (UTC)

@Roy Batty: Yes, the way convert was rounding those values gave a misleading result, thanks. Johnuniq (talk) 02:53, 15 March 2019 (UTC)

Wikipedia:Talk page guidelines[edit]

I don't see why "WP:OWNTALK" is acceptable as a shortcut whereas "WP:OTHERTALK" isn't. That section already has four shortcuts, twice as many as any other on that page, yet five is one too many? Maybe if there are too many shortcuts, some of the others should be deleted to make room for "WP:OTHERTALK", which is after all far clearer and easier to remember than any of the others. "WP:TPO" was created by an indefinitely banned user and its meaning is pretty much completely opaque. Why don't we drop that? Citizen Canine (talk) 09:25, 16 March 2019 (UTC)

Please start a discussion at Wikipedia:Talk page guidelines with a proposal to change the shortcuts. Any discussion here is likely to be missed by others who might have an opinion, and definitely would be missed by anyone in the future trying to work out the background regarding the guideline. Johnuniq (talk) 09:52, 16 March 2019 (UTC)

DYK nomination of Lutheran Trinity Church, East Melbourne[edit]

Symbol question.svg Hello! Your submission of Lutheran Trinity Church, East Melbourne at the Did You Know nominations page has been reviewed, and some issues with it may need to be clarified. Please review the comment(s) underneath your nomination's entry and respond there as soon as possible. Thank you for contributing to Did You Know! Dahn (talk) 06:53, 21 March 2019 (UTC)

Thanks, I have responded there. Johnuniq (talk) 07:05, 21 March 2019 (UTC)


Wikipedia:Administrators' noticeboard/Incidents#RealScienceGeek --Guy Macon (talk) 13:40, 27 March 2019 (UTC)

Wow they were indeffed quickly. Johnuniq (talk) 01:47, 28 March 2019 (UTC)

Please provide your input on urination at Human Penis[edit]

Hi! You reverted me, as did 2 other editors, so I have opened a discussion. Please contribute! Thank you!♥ L'Origine du monde ♥ Talk 20:14, 27 March 2019 (UTC)

There is too much drama associated with your account with undue use of Wikipedia to tell the world about sex stuff. We get it, in fact most of us are human and understand about sex but we don't need to make a fuss by hosting sex images on our user page or listing every bodily function in as many articles as possible. Johnuniq (talk) 00:38, 28 March 2019 (UTC)

DYK for Lutheran Trinity Church, East Melbourne[edit]

Updated DYK query.svgOn 28 March 2019, Did you know was updated with a fact from the article Lutheran Trinity Church, East Melbourne, which you recently created, substantially expanded, or brought to good article status. The nomination discussion and review may be seen at Template:Did you know nominations/Lutheran Trinity Church, East Melbourne. You are welcome to check how many page hits the article got while on the front page (here's how, Lutheran Trinity Church, East Melbourne), and it may be added to the statistics page if the total is over 5,000. Finally, if you know of an interesting fact from another recently created article, then please feel free to suggest it on the Did you know talk page.

Materialscientist (talk) 01:50, 28 March 2019 (UTC)


autonomy / mastery / purpose

Cornflower blue Yogo sapphire.jpg

Thank you for quality articles such as Lutheran Trinity Church, East Melbourne and Hermann Herlitz, for help with Lua modules, for welcoming new users, for service from 2008, for the autonomy / mastery / purpose of your user page, - John, you are an awesome Wikipedian!

--Gerda Arendt (talk) 18:31, 29 March 2019 (UTC)

Thanks Gerda, much appreciated! Johnuniq (talk) 01:34, 30 March 2019 (UTC)

Notice of noticeboard discussion[edit]

Information icon There is currently a discussion at Wikipedia:Administrators' noticeboard regarding an issue with which you may have been involved. The thread is "Concerns Regarding User:Bbb23 and Possible Misuse of Admin/CU Abilities". Thank you. Notifying you as I mentioned your name. Nil Einne (talk) 10:26, 10 April 2019 (UTC)


Since you aren't responding over at the talk page, I am taking this opportunity to tell you I plan to take a second stab at the documentation issue soon, Johnuniq. Please therefore tell me if you'd rather move directly to dispute arbitration and save me the trouble of coming up with efforts you will never accept. Remember, so far you have provided exactly zero useful suggestions as to what additions you might like. This is your chance of rectifying this.

If I don't hear from you a day or so after your edit history shows activity (meaning you have been alerted to this message) I will assume you won't object and that you will not waste my time. Let me be very clear: You are more than welcome to constructively improve on my effort. However, merely reverting is not an improvement and is not constructive. CapnZapp (talk) 08:39, 29 April 2019 (UTC)

I responded at Template talk:Age#MOS:RELTIME. Johnuniq (talk) 09:45, 29 April 2019 (UTC)

A barnstar for you![edit]

Tireless Contributor Barnstar Hires.gif The Tireless Contributor Barnstar
For your longstanding maintenance of {{convert}} and friends. Wonderful job! — JFG talk 07:18, 30 April 2019 (UTC)
Many thanks! As a matter of fact, I'm puzzling over a convert bug at the moment... Johnuniq (talk) 07:39, 30 April 2019 (UTC)

DYK for Hermann Herlitz[edit]

Updated DYK query.svgOn 2 May 2019, Did you know was updated with a fact from the article Hermann Herlitz, which you recently created, substantially expanded, or brought to good article status. The fact was ... that Hermann Herlitz (pictured), born to Jewish parents in Prussia in 1834, was pastor of the Lutheran Trinity Church in East Melbourne, Australia, for 46 years? The nomination discussion and review may be seen at Template:Did you know nominations/Hermann Herlitz. You are welcome to check how many page hits the article got while on the front page (here's how, Hermann Herlitz), and it may be added to the statistics page if the total is over 5,000. Finally, if you know of an interesting fact from another recently created article, then please feel free to suggest it on the Did you know talk page.

— Maile (talk) 00:01, 2 May 2019 (UTC)

More Cardarelli[edit]

Hello again! I just tried to AfD Stuck (unit), after User:Reyk pointed out it is almost certainly a corruption from the German "Stück", a counter word for commercial items. Unfortunately I don't practice much, and forgot that you have to have everything ready to paste in; I took too long, and Twinkle aborted partway through. I pasted the text into Wikipedia:Articles for deletion/Stuck (unit), but I'm not sure if this is enough - the format certainly doesn't "look" right - and have no idea how to correct it. Please help! Do you also have a neat list of previous contributors to notify? Imaginatorium (talk) 04:25, 14 May 2019 (UTC)

@Imaginatorium: Thanks for continuing with this. I did what I think is needed to fix the AfD and will join in later. I'll also think about previous contributors. Johnuniq (talk) 04:50, 14 May 2019 (UTC)