User talk:Trappist the monk/Archive 23

Latest comment: 2 years ago by Klein Muçi in topic Regex and dates


CS1 - Miscellaneous

edit

The update is finally complete for us. I had some points I wanted to mention in the end which may or may not require an answer.

First of all, thank you for your patience and dedication. You have been helping me personally and us as a community for years now.

Secondly, when we started the update this time, we talked about taking notes that could be added in a help page here in regard to that. If you'd please take another look at the link of my sandbox above, you'll see that its content is "precisely" that. Those are the changes that SqWiki needs to do: Add the code for the missing language parameter category in main, translate 1 line in ~/COinS, switch 3 lines to "True" in ~/Configuration, Exports section and add the code for the d.m.y date format in ~/Date validation (this will be the hardest to achieve during each update when compared with the other 3 changes). Beside that, everything else is copy-pasting. At least, so far. Should I add these notes somewhere? How exactly do I add them? Have we chosen a certain "style" about adding directions? Can I just say what I just said here (copy-paste + these 4 changes + localization at ~/Configuration)?

Speaking of that page, where exactly is that page? I've forgotten its name. And, have there been any more changes in regard to the info table we were setting up some days ago?

And lastly, returning to the date subject, I sure hope we can provide better automatic date formatting by the Mediawiki side in the future. I believe that would help make the CS1 code more elegant in general, remove the need for "local quirky code", like we just added for d.m.y, and also make Smallem's life easier overall. I'd be willing to make some active attempts to help in this direction (as I tried by locating all the date formatting related files in Mediawiki) but I don't know who/where exactly to ask for what. If you can provide any more insight on this problem whatsoever, I'd be interested in knowing.

To end it, I do have 2 other naive questions: When we talked about Smallem's latest regexes there was a moment when you said that you had a vague memory of me saying to you that coupling different parameters together wasn't good for a specific reason. I did couple them (as you saw) and, as I said above, it worked fine. But right after the first edit was made I remembered what that "bad thing" might have been: Take a look at Smallem's contributions and see its summaries. You'll see that most of the messages are gigantic and hard to read and that's because the regex lines are the same way. Having said that, I'd still write them coupled because manually writing ~1300 lines was very tiresome and if they weren't coupled the number would have been much bigger, most likely making me drop the task along the way. But given that we currently have the complete list, is there any find and replace command(s) I can apply to it to make it separate (semi)automatically? I believe there isn't. Also, is there any way to make something like this for generating global date regexes? The benefits would be many and diverse but considering all we said above about Mediawiki's date formatting support, I believe even stronger there isn't. - Klein Muçi (talk) 01:07, 14 February 2022 (UTC)Reply

Module:Citation/CS1/doc/Importing the Module:Citation/CS1 suite to your wiki – I have no real opinion about the format or content of that page. As I understand its intent, it is to be a guide to other-language wikis so that it eases their transition from whatever it is that they have to the current version. Because each other-language wiki is different and has different configuration requirements, including specific detail about what sq.wiki does vs what da.wiki does may be a case of too much information.
Huge edit summaries was not the issue. There are cases where coupled regexes will match one thing but not another in the same citation template. Depending on the regex, it is possible that the other never gets matched because it is 'blocked' or 'overlooked' by the first match. See the first edited template here – smallem changed |accessdate=June 1, 2015|accessdate=1 qershor 2015 but did not change |date=June 1, 2015 so the citation is still marked as Mirëmbajtja CS1: Datë e përkthyer automatikisht.
Trappist the monk (talk) 16:09, 14 February 2022 (UTC)Reply
Can you add the proposed table there and allow me to add everything I mentioned above as a comment for SqWiki/SqQuote? We can keep that page in a chaotic manner purposely and see how it will evolve, if it ever does.
So that's why that category was changing so slowly... I see. You say "never gets matched" but I suppose it eventually will, no? The next run. Or maybe the run after that. Anyway, that's a problem. What are my options at the current state? What would be the most efficient way to separate the regexes? - Klein Muçi (talk) 23:57, 14 February 2022 (UTC)Reply
It depends of the regex and on the replace. For this set of regexes, smallem revisiting a page will catch the overlooked match so nothing to do.
I don't think that the tables (one for each module in the suite) belong at Module:Citation/CS1/doc/Importing the Module:Citation/CS1 suite to your wiki. Nor do I recall the purpose of the table to be a place to add everything [you] mentioned above as a comment for SqWiki/SqQuote. The table for Module:Citation/CS1 is currently in my sandbox so you can remember what it looks like.
Trappist the monk (talk) 01:09, 15 February 2022 (UTC)Reply
Yes but it's still a problem from the summary aspect so I guess I'd have to deal with it at some point either way. Supposing it is doable. Writing everything by hand wouldn't be doable but modifying the current list working with patterns, copy-pasting some stuff while Find and Replacing some other stuff could be considered doable. That's the kind of solution I was looking for.
Oh, we have multiple tables. Well, even better. Example: In the comment cell for COinS for SqWiki/SqQuote we can write something like: Module:Citation/CS1/COinS#L-139: MATH RENDER ERROR → GABIM ME PËRPUNIMIN MATEMATIKOR
Of course what we actually write will be shorter but just to give an idea. Good? Bad? - Klein Muçi (talk) 01:24, 15 February 2022 (UTC)Reply
Just to give an idea of what I'm thinking: Example - Klein Muçi (talk) 01:36, 15 February 2022 (UTC)Reply
Yes but ... I was looking for. I have no idea what you are talking about...
It was your idea to create some sort of table(s) that collect some sort of information about the status of various cs1|2 installations. If those tables meet your needs then you can say that it was a good idea. Since I won't be using those table(s), I have no opinion.
Trappist the monk (talk) 12:49, 15 February 2022 (UTC)Reply
Check the list I sent you above here. I was looking for a way to modify that list so that the regexes in it become separated. This way shouldn't be to write every regex by hand. This way should be by finding specific patterns in that list, copying them, pasting them (thus replicating them) and then adding by hand only a minimal part of text. That was the way I was looking for to add "the missing" regexes. It's just a matter of efficiency. I asked you if you had any advice on how I can do that job in the most efficient way, without having to write everything manually from scratch.
As for the tables, I'll go on and use them but they're currently static. Can they be made dynamic somehow? That is, be able to add new entries (wiki projects) automatically when they're connected to Wikidata? (Or remove them.) - Klein Muçi (talk) 13:05, 15 February 2022 (UTC)Reply
Why do you want to modify the list of date regexes? It's done and complete is it not? It is doubtful that the list will ever need to change unless sq.wiki adopts some other date format that we have not yet contemplated.
Once data have been manually added to tables then cannot be made to automatically add or remove entries.
Trappist the monk (talk) 13:49, 15 February 2022 (UTC)Reply
Yes but the summaries...
That's sad. Alright then, I'll add them as subpages to the page we discussed above and start putting up information on them. The whole thing (tables + the guide itself) seems a bit "primitive" and chaotic but maybe it evolves to something nice in the future. - Klein Muçi (talk) 14:06, 15 February 2022 (UTC)Reply
Other problems (which I vaguely remember I've also mentioned in the past):
Check the 2 citations in my sandbox. The first one says (bot. illustrated). Where do I translate the illustrated part?
The second one has Kopje e arkivuar as a title, which is Albanian for Archived copy. Should I change the error Archived copy as a title so it also detects these values? Is the problem global? Should the error be changed so it detects locally set values (maybe in the translation table) for archived copy?
Finally, check the article link in there (Hysen Ibrahimi). Check its categories. You may be able to understand that one is related to sources in American English, not yet created. How many categories are like this (different kinds of English), given that I can't get that info from here since you don't track articles with English sources? Should I create them? I very vaguely remember that've talked something about codes like En-US that should be changed to En or that Smallem would do it but maybe it's a false memory. Any added information on this subject would be appreciated. - Klein Muçi (talk) 14:31, 15 February 2022 (UTC)Reply
|edition=illustrated
sq:Moduli:Citation/CS1/Configuration#L-433
MediaWiki supports four English language variants: en-AU (Australian), en-CA (Canadian) en-GB (British), and en-US (American). Because that abomination that is ve adds IETF-like language tags to |language=, cs1|2 now accepts those and categorizes accordingly. Other forms of English not recognized by MediaWiki, for example en-IN (Indian), are recognized only by the language subtag. A better example might be Portuguese. en.wiki has three categories: Brazilian Portuguese (pt-BR), European Portuguese (pt-PT), and Portuguese (pt)‎.
Trappist the monk (talk) 14:58, 15 February 2022 (UTC)Reply
Ah!
sq:Moduli:Citation/CS1/Configuration#L-433 - Have I made the change correctly? I'm not sure if I should follow the format above of "archive copy".
Do we have categories for those three variants of Portuguese here? Can you show them here? I want to see if we have created them or not.
Can I let Smallem deal with this category by checking for the PMC parameter and removing PMC from its value if it exists? - Klein Muçi (talk) 15:38, 15 February 2022 (UTC)Reply
PS: How common is |edition=illustrated as a problem? Should we have a specific error for that? - Klein Muçi (talk) 15:43, 15 February 2022 (UTC)Reply
Why would you think that |edition=illustrated is a problem? You should fix this though: sq:Moduli:Citation/CS1/Configuration#L-37.
Trappist the monk (talk) 16:16, 15 February 2022 (UTC)Reply
If 'Kopje e arkivuar' is the only form that IABot uses at sq.wiki, the only change to make is to make the string lowercase: ['local'] = 'kopje e arkivuar',
These two pages suggest that you don't: sq:Festivali_Evropian_i_Këngës_2021 sq:Pashmina.com.
Trappist the monk (talk) 16:16, 15 February 2022 (UTC)Reply
Because |edition= only accepts values similar to 1, second or 3rd. (Apparently no. :P )
Why would you think that sq:Moduli:Citation/CS1/Configuration#L-37 is wrong?
How can I be sure of the forms IABot uses for "archived copy"?
Thank you! :) - Klein Muçi (talk) 22:54, 15 February 2022 (UTC)Reply
Nope, |edition= accepts anything except something that looks like 'edition' or an abbreviation threreof
Because it is.
Without you ask the bot op, I suppose you can't. We have found 'Archive copy' and 'Archived copy' so we test for both.
Trappist the monk (talk) 23:39, 15 February 2022 (UTC)Reply
Apparently there are many language categories that we're missing. Any way we can have a full list of what's missing so I know what to create? - Klein Muçi (talk) 23:03, 15 February 2022 (UTC)Reply
You can try this: {{#tag: categorytree|CS1 foreign language sources}} (at sq.wiki, this: {{#tag: categorytree|Vetitë CS1: Burime në gjuhë të huaj |depth=}}
and compare sq.wiki against en.wiki.
This cannot be automated. This tag doesn't return anything usable by lua – I tried. It is possible to copy the sq and en lists, paste them into a text file, and then massage them into separate lua tables. Then a simple lua function can compare the two tables and render a list of differences – but they are all different:
Vetitë CS1: Burime në abkazisht (ab) ≠ CS1 Abkhazian-language sources (ab)
Trappist the monk (talk) 23:39, 15 February 2022 (UTC)Reply
But why is wrong? In Albanian we use the abbreviation "bot." for "botimi", which is a literal translation for "edition". For example, "first edition" would be "botimi i parë" ose "bot. I". That only works for those cases though. It would be strange to use the abbreviation for cases like "illustrated edition" so you're probably right but why do YOU think it is wrong? I doubt it is because of what I just said.
Thanks for trying! I was thinking that maybe we could compare the codes in brackets En vs Sq. Or maybe we could do something with Wikidata. Can we extract a list of entries of all those that exist in SqWiki but aren't connected to EnWiki and the opposite? Don't worry too much though. I've already started checking and comparing them manually. I suppose it won't take long.
Question:
Why is the code here (de) instead of (de-AT)? The same question for the other similar cases. - Klein Muçi (talk) 23:58, 15 February 2022 (UTC)Reply
Not because of what you said. Look more closely.
Because de-AT etc is a complexity that I haven't yet felt like dealing with.
Trappist the monk (talk) 00:04, 16 February 2022 (UTC)Reply
Hah! x2
Last question (at least for now):
In the past days, me and, I suppose, some other editors, used to spoof the usage of trans-title parameter by translating the title inside the title parameter itself. We would put the translation in square brackets beside the original title. Now I and, hopefully, other editors know better. Is there a way to detect cases like these so we can fix them? Maybe just by creating a temporary maint. category that looks for all titles that have square brackets in their values? - Klein Muçi (talk) 00:12, 16 February 2022 (UTC)Reply
Oops! I started creating the missing categories but I was suddenly made aware of something: What guarantees me that the name I'm using for the languages in the categories is the name CS1 will use for categorization? Nothing, right? :/ - Klein Muçi (talk) 00:27, 16 February 2022 (UTC)Reply
Somewhere at sq.wiki you do have the sq version of Template:Citation_Style_documentation/language/doc, right? There is your list of names.
Failing that, you can always fall back on {{#language:<language tag>|sq}}
Trappist the monk (talk) 00:52, 16 February 2022 (UTC)Reply
You might try this search (for what it's worth).
Trappist the monk (talk) 00:52, 16 February 2022 (UTC)Reply
Thank you! - Klein Muçi (talk) 00:56, 16 February 2022 (UTC)Reply
(r"(\{\{\s*cit[aeio][^\}]*\|\s*pmc\s*=\s*)pmc(\d*\s*[\|\}])", r"\1\2"),
This pattern for solving PMC format errors. Anything that I'm not taking into consideration that can make it malfunction? - Klein Muçi (talk) 02:54, 16 February 2022 (UTC)Reply
Case? |pmc= and |PMC= are allowed. No guarantee that the assigned value will have pmc; could be PMC; could be some combination of cases.
Trappist the monk (talk) 11:59, 16 February 2022 (UTC)Reply
And how about this for fixing date format errors?
(r"(\{\{\s*cit[aeio][^\}]*\|\s*date\s*=\s*.*)-(.*\s*[\|\}])", r"\1–\2"),
Any foreseeable false positives? - Klein Muçi (talk) 03:48, 16 February 2022 (UTC)Reply
2022-02-16
Trappist the monk (talk) 11:59, 16 February 2022 (UTC)Reply
Smallem is insensitive to many things, especially cases. Sometimes it's insensitive even to my wishes. It does something completely different.
Any way I can fine-tune that to escape non-range dates? - Klein Muçi (talk) 12:24, 16 February 2022 (UTC)Reply
One regex per date-range format. Use the date translation regexes as a model.
Trappist the monk (talk) 12:39, 16 February 2022 (UTC)Reply
So that means another ~1k lines right? Not ~10 lines. If it's the first case, I think that will wait for the next update when most likely I will have forgotten about this and you'll have to repeat that advice again. - Klein Muçi (talk) 12:51, 16 February 2022 (UTC)Reply
Ten regexes if you are willing to assume that whatever month-, named-, quarter-, season-names appear in a date are valid. 1k+ regexes if you are unwilling to make that assumption.
Trappist the monk (talk) 13:00, 16 February 2022 (UTC)Reply
Oh... Well, I guess I can make that assumption because the worse it could happen is that the date will get unrecognizable as a date and end up in another maintenance category.
I'll be back with a regex example. - Klein Muçi (talk) 13:03, 16 February 2022 (UTC)Reply
Turns out I can't. I'm lost. Can you give me 1 example and then maybe I can build the other 9 in resemblance to it? - Klein Muçi (talk) 13:09, 16 February 2022 (UTC)Reply
(r"(\{\{\s*cit[aeio][^\}]*\|\s*(?:access\-?|archive\-?|doi\-broken\-|lay\-|pmc\-embargo\-|publication\-|air\-?)?date\s*=\s*\d{1,2})\-(\d{1,2} +[A-Za-z]+ +\d{4})", r"\1–\2"),
If these are run after the date translation/reformat regexes then Md-dy, Md-Mdy, and Mdy-Mdy can be ignored.
Trappist the monk (talk) 14:10, 16 February 2022 (UTC)Reply

Also, just found out that we have deprecated the lay parameters. The problem is that I find the deprecation notice unexplanatory enough. What were lay parameters and what was their function? What exactly would mean building a new template for them? Something like {{Cite lay....}}? We don't have a lot articles using them anyway but I don't know what I should do with the information in those parameters. Can I safely remove them or not. - Klein Muçi (talk) 13:13, 16 February 2022 (UTC)Reply

The |lay-date=, |lay-format=, |lay-source=, and |lay-url= parameters were intended to provide a method of joining a lay source to a specialist source where the lay source is purportedly more easily understood by the general reader. The problem is that the lay source is missing most of the important bibliographic detail that is expected from a proper citation. These parameters are often used as a way to shoehorn two citations into a template designed to properly render one citation at a time. It was a poor design choice that should never have been implemented.
The current advice is to remove those parameters from the cs1|2 template and, if the lay source is important to the article, then choose a cs1|2 template to hold the information from the lay parameters and create a proper citation with all of the usual bibliographic detail. This citation can be a stand-alone in its own <ref>...</ref> tags or can be bundled with the other cs1|2 template inside the same <ref>...</ref> tags. I wrote {{lay source}} as one possible way to implement this. Here is a diff from Altruism where I used {{lay source}}.
Trappist the monk (talk) 14:10, 16 February 2022 (UTC)Reply
Oh I understand now. The problem with me was that I didn't know the meaning of the word "lay" but the context your provided gave full insight. I believe importing that template will be a good thing to do even though we have only 5 articles or so that were in the deprecated parameters category because of that parameter. Maybe for future times? I got to say though that my first instinct was to ask why not merge the code of this template inside the CS1 module's code and maybe have it behave as a parameter for easier usage and... Oh. :P
As for the regexes we discussed above, would it be possible to also provide the other lines? I tried to do the adaptation myself but I couldn't. (Hence why I'm answering 1 day later.) Date formats overall are a new concept for me in regard to practically working with them. Creating regexes to fix them overloads me, apparently. :P - Klein Muçi (talk) 12:13, 17 February 2022 (UTC)Reply
Have you tried regex101.com? From the left menus choose Python and Substitution. Create a simple cs1|2 template in the TEST STRING box that has the date format that needs fixing and copy the matching regex from the list of translation regexes to the REGULAR EXPRESSION box. Copy the replacement string from that same translation regex into the SUBSTITUION box. If TEST STRING has English date names, they should be translated into the results under SUBSTITUTION. Change the REGULAR EXPRESSION and SUBSTITUTION as necessary. This is how I created the d-dMy hyphen-fix regex above. You might want to try doing d-dMy first as a 'worked example'.
Trappist the monk (talk) 14:10, 17 February 2022 (UTC)Reply
I'm really sorry but I can't. I've been trying it in the PCRE2 (default) flavor these days. Just tried it now in the Python one after your suggestion (which didn't change much beside adding the raw part). But I really have no idea how to adapt the one you gave me for the other formats. I kept looking at it for 2-3 minutes straight and don't know what to change. Maybe because it's hard for me to fully understand how all its parts are working. I also get confused by the formats names. For example, I keep forgetting what dM-dMy means in practice. After I remember that, I've totally forgotten how the given regex I'm supposed to modify works and... This cycle repeats. Sorry, I've never worked with dates before in any way. Maybe if you give me another example for another format I can be more useful... :/ - Klein Muçi (talk) 15:26, 17 February 2022 (UTC)Reply
\d{1,2})\-(\d{1,2} +[A-Za-z]+ +\d{4}) Maybe if you explain to me in details what each of those components serves for it'd be easier for me. I don't understand the what happens with the curly brackets and how the part in square brackets helps in months exactly. - Klein Muçi (talk) 15:39, 17 February 2022 (UTC)Reply
regex101.com, Python, Substitution as before. In REGULAR EXPRESSION put this:
(\d{1,2})\-(\d{1,2} +[A-Za-z]+ +\d{4})
in TEST STRING put this:
1-3 something 1234
in SUBSTITUTION put this:
\1–\2
The regex is described in the EXPLANATION box at upper right.
Trappist the monk (talk) 15:58, 17 February 2022 (UTC)Reply
Wow, I finally understood!
(\d{1,2}) - date digits
- separator
\d{1,2} - date digits
[A-Za-z] - months names
\d{4} - year digits
I didn't know what the curly brackets served for in regex and that made all the expression seem Greek to me. I'll create them and I'll report here. - Klein Muçi (talk) 16:20, 17 February 2022 (UTC)Reply
d-dMy
(r"(\{\{\s*cit[aeio][^\}]*\|\s*(?:access\-?|archive\-?|doi\-broken\-|lay\-|pmc\-embargo\-|publication\-|air\-?)?date\s*=\s*\d{1,2})\-(\d{1,2} +[A-Za-z]+ +\d{4})", r"\1–\2"),
dM-dMy
(r"(\{\{\s*cit[aeio][^\}]*\|\s*(?:access\-?|archive\-?|doi\-broken\-|lay\-|pmc\-embargo\-|publication\-|air\-?)?date\s*=\s*\d{1,2} +[A-Za-z])\-(\d{1,2} +[A-Za-z]+ +\d{4})", r"\1–\2"),
dMy-dMy
(r"(\{\{\s*cit[aeio][^\}]*\|\s*(?:access\-?|archive\-?|doi\-broken\-|lay\-|pmc\-embargo\-|publication\-|air\-?)?date\s*=\s*\d{1,2} +[A-Za-z]+ +\d{4})\-(\d{1,2} +[A-Za-z]+ +\d{4})", r"\1–\2"),
My-My
(r"(\{\{\s*cit[aeio][^\}]*\|\s*(?:access\-?|archive\-?|doi\-broken\-|lay\-|pmc\-embargo\-|publication\-|air\-?)?date\s*=\s*[A-Za-z]+ +\d{4})\-([A-Za-z]+ +\d{4})", r"\1–\2"),
M-My
(r"(\{\{\s*cit[aeio][^\}]*\|\s*(?:access\-?|archive\-?|doi\-broken\-|lay\-|pmc\-embargo\-|publication\-|air\-?)?date\s*=\s*[A-Za-z])\-([A-Za-z]+ +\d{4})", r"\1–\2"),
Special cases still missing. Do they look good? Are they season inclusive? What does the (space)+ serve for? Is it one or more spaces? That would be an error for Smallem as spaces need to be escaped in its flavor. - Klein Muçi (talk) 23:21, 17 February 2022 (UTC)Reply
No. Some; Sy-y and Sy4-y2 missing. At least one space character is required. Are you sure that a space character in a quoted string is an error for smallem? Inside a quoted string? We did not escape space characters in the translation regexes. Go test the regexes at regex101.com.
Trappist the monk (talk) 23:55, 17 February 2022 (UTC)Reply
No, I haven't written the regexes yet for Sy-y and Sy4-y2. I'll do that now. That's what I meant with "special cases still missing". We have escaped all the spaces in the language regexes. The module you created for auto-generating those regexes escapes them. That's why I said that. :/ Do those regexes change from what we're using in the dates? Maybe I'm wrong. I'm not sure from your answer if you approved or disapproved of the fact that the 5 regexes written above are season inclusive and therefore complete on their own. - Klein Muçi (talk) 00:03, 18 February 2022 (UTC)Reply
My-My and M-My are season-inclusive because [A-Za-z]+, right? The others are not season-inclusive because there is no format like 17–18 Spring 2022.
Space characters are required in all cs1|2 date formats except d.m.y and ymd. Smallem has run successfully with the translation regexes as they are, has it not? If it has, that suggests that whatever caused us to escape space characters for language regexes may no longer apply. No doubt, if you troll the archives of this talk page you will find some discussion about that.
Trappist the monk (talk) 00:20, 18 February 2022 (UTC)Reply
So, final results: Pastebin link Good? Bad?
I'm confused though. Above sometimes you say "separated by endash", sometimes you say "spaced endash" and sometimes you say "separated with unspaced endash". Where do the 2 first differ from each other? Where exactly is space needed? I've used no space in any of the substitutions in regard to the endash.
I'll do some tests in regard to the language regexes and if spaces are no longer needed, we may change the module to remove the extra escape mechanisms. - Klein Muçi (talk) 00:48, 18 February 2022 (UTC)Reply
"separated by endash" and "separated with unspaced endash" are the same and different from "spaced endash". Where a "spaced endash" is required, for example:
{{cite book |title=Title |date= December 2021 – January 2022}}
Title. December 2021 – January 2022. – works
but a regex that removes the space around the endash will cause errors:
{{cite book |title=Title |date= December 2021–January 2022}}
Title. December 2021–January 2022. {{cite book}}: Check date values in: |date= (help)error
Trappist the monk (talk) 00:58, 18 February 2022 (UTC)Reply
Okay, thank you! I added the missing spaces in the (space)+ format.
I'm genuinely happy I can understand the whole regex line now. I started out by seeing it partly in hieroglyphs. Thank you for your patience! :) - Klein Muçi (talk) 01:11, 18 February 2022 (UTC)Reply
Can I add "gjuha" → "language" in ~/Suggestions in EnWiki? We require our editors to always add the language or else they get an error. Many of them don't really understand what they're doing with citations exactly and are surprised to get an error that doesn't exist in EnWiki so they try to solve it intuitively and they try adding |gjuha=value but our CS1 suite doesn't understand Albanian parameter names (yet?) so it ends up being another error. I can teach Smallem to correct that error but I thought that maybe creating a suggestion would be better. And when I saw that EnWiki also provided support for foreign parameters I thought that maybe I can add it here also so we don't have extra discrepancies. - Klein Muçi (talk) 02:18, 18 February 2022 (UTC)Reply
Smallem doesn't need to escape spaces apparently. I tried it here without escaping the space with a language name that is made up from 2 words and it worked normally. Can you change Module:Smallem accordingly? - Klein Muçi (talk) 02:49, 18 February 2022 (UTC)Reply
Why? It ain't broke, so why fix it?
Trappist the monk (talk) 15:09, 18 February 2022 (UTC)Reply
It might help your editors if you wrote a help text at sq:Ndihmë:Gabimet CS1#language missing so that they aren't left entirely in the dark...
You should certainly add |gjuha= to sq:Moduli:Citation/CS1/Suggestions. I'm less sanguine about adding that parameter here. In the normal course of things, editors who import a cs1|2 template from sq.wiki to en.wiki wouldn't find |gjuha= in a properly formed template so having |gjuha= here is just so much clutter.
Trappist the monk (talk) 15:09, 18 February 2022 (UTC)Reply
I understand your viewpoint about |gjuha=. It was just because everyday we stray further from EnWiki's light by doing things like this and, of course, this increases maintenance cost (and shatters my dream of a global CS1 a bit more).
As for Module:Smallem, it removes extra visual clutter and it helps me update its code in an easier manner, I suppose. - Klein Muçi (talk) 15:38, 18 February 2022 (UTC)Reply
Hello back! It's the third time I run Smallem (the third time is still going on) but the number of articles in this category doesn't seem to go any lower. Now I know we only did regexes for the English dates and that's exactly why I'm running Smallem multiple times. I want to see if there might be any other language that also has a lot of entries. But I believe most of those articles to still have "English dates" and yet, they're not getting fixed. Could it be that I might have messed up some regex lines? What would those lines be? - Klein Muçi (talk) 11:16, 21 February 2022 (UTC)Reply
It looks to me like smallem is spending most of its effort removing empty parameters but when it does translate dates it is doing it correctly. Sometimes it takes more than one edit as at sq:3 Doors Down:
this edit gets two of the three cs1|2 templates – article still in sq:Kategoria:Mirëmbajtja CS1: Datë e përkthyer automatikisht
this edit gets the last one – article no longer in Kategoria:Mirëmbajtja CS1: Datë e përkthyer automatikisht
but then:
this edit undid smallem's work so back into the category
so then smallem, with this edit and this edit, fixed the dates again so now not in the category. Looks to me like smallem is doing what it is supposed to be doing.
But then there are templates like this at sq:Arsimi parafillor:
{{Cite book|last=Sally Neaum|url={{google books|plainurl=yes|id=fCnZNAEACAAJ}}|title=Child Development for Early Years Students and Practitioners|date=17 May 2013|publisher=SAGE Publications|isbn=978-1-4462-6753-0}}
Because the regex stops at the end of the {{google books}} template, it never sees |date=17 May 2013 so Arsimi parafillor will remain in Kategoria:Mirëmbajtja CS1: Datë e përkthyer automatikisht until manually fixed.
Trappist the monk (talk) 14:05, 21 February 2022 (UTC)Reply
Interesting... Templates inside templates were completely out of my mind up until now. Do we have any kind of information about how many kinds of templates may exist of this sort?
So you think nothing's really off. I just need to wait for the results. Okay then.
Just a side info: There are some of your diff links above which don't work. - Klein Muçi (talk) 15:46, 21 February 2022 (UTC)Reply
Editors will include templates whether they should or not. Diffs fixed.
Trappist the monk (talk) 15:53, 21 February 2022 (UTC)Reply
Smallem finished its third run. The category went from 269 to 270 entries. :/ I again suspect I might have done something wrong with my regexes. Do you see any pattern in the articles that are left? - Klein Muçi (talk) 12:01, 22 February 2022 (UTC)Reply
Templates. Though I did find one, that has |year=14 May 1724. Why such a precise date for such an old book? The fix for |year= masquerading as |date= is to create a series of regexes that look for non-year date patterns in |year= and change |year= to |date=. Do this before date translation. For dMy:
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*\d{1,2} +[A-Za-z]+ +\d{4})", r"\1date\2"),
Trappist the monk (talk) 13:56, 22 February 2022 (UTC)Reply
So, you again insist that all the remaining entries are because of templates inside templates.
With what category would exactly help those regexes? I mean, what normally happens if you put a full date in a year parameter? Do you get an error of any kind? - Klein Muçi (talk) 15:21, 22 February 2022 (UTC)Reply
Do not put words into my mouth that I have not spoken. I insist on nothing. I looked at a handful of the mainspace articles in sq:Kategoria:Mirëmbajtja CS1: Datë e përkthyer automatikisht and found templates within templates. That is sufficient for smallem to skip those particular cs1|2 templates. There are also 100+ pages that are not in mainspace; does smallem work on those?
Categories do not help regexes. There is no category for |year= masquerading as |date= though I have periodically thought that we should at least have a maint cat for those parameters.
Trappist the monk (talk) 15:34, 22 February 2022 (UTC)Reply
I was thinking that but I believed it worked on everything that transcludes Module:Citation/CS1. I re-checked now and apparently I have set another parameter in its script: "-ns:0" So... That's the answer. I'll fix everything left by hand. As I've said above, my aim was to check if there would be other languages beside English which would warrant date translation regexes. Apparently there aren't.
Hmm, I see. Maybe I write those regexes after that category is created then. How many regexes are we talking about? Around 13, no? - Klein Muçi (talk) 16:02, 22 February 2022 (UTC)Reply
I would not hold your breath waiting for a new category. Yeah, about that many – anything that isn't YYYY or c. YYYY or YYYYz; don't know about n.d. and nd.
Trappist the monk (talk) 16:31, 22 February 2022 (UTC)Reply
Uhm.. What's n? - Klein Muçi (talk) 17:09, 22 February 2022 (UTC)Reply
n.d. and nd are shorthand for 'no date'.
Trappist the monk (talk) 17:16, 22 February 2022 (UTC)Reply

I have this regex for fixing case problems with pmc/mr/jfm parameters:

(r"(\{\{\s*cit[aeio][^\}]*\|\s*(?:pmc|mr|jfm)\s*=\s*)(?:pmc|mr|jfm)(\d*\s*[\|\}])", r"\1\2"), It works fine for its purpose. (Smallem is case insensitive.) However, is there a way to make each parameter pair only with its homologue? I want to know mostly for personal curiosity in regard to further works with regexes in future cases. - Klein Muçi (talk) 18:37, 23 February 2022 (UTC)Reply

I don't really understand what it is that you are asking. I haven't tested it but a visual inspection of that regex would seem to indicate that it removes 'PMC' or 'pmc' (and all other case combinations}} from the value assigned to |pmc= or |PMC=. Same for |mr=, |MR=, |jfm=, and |JFM=.
Trappist the monk (talk) 19:16, 23 February 2022 (UTC)Reply
Yes, that's the idea. But the regex also works in cases when |jfm=PMCXXXXX or other combinations. I'd like it to work only on the case pmc=pmcXXXX or jfm=jfmXXXX or mr=mrXXXXX. So each parameters only pairs with its homologue. Is it clearer now? - Klein Muçi (talk) 22:58, 23 February 2022 (UTC)Reply
Then a regex for each parameter name.
Trappist the monk (talk) 23:14, 23 February 2022 (UTC)Reply
No specific command to make 2 non-capturing groups behave like that? #Sad But thank you anyway! :) - Klein Muçi (talk) 23:16, 23 February 2022 (UTC)Reply
Question:
Any way I can catch duplicated parameter-value pairs with regex without me having to write a specific regex for each parameter ever? I'm talking about cases like this:
{{Cite book|year=2022|year=2022|language=enlanguage=en|etc...}} I deliberately didn't put the pipe in the second time because there are also cases like that. These often arises because of Smallem's changes, when it tries to fix citations that already have errors in them, or because of manual copy-pasting errors. - Klein Muçi (talk) 09:43, 25 February 2022 (UTC)Reply
I don't think so.
Trappist the monk (talk) 01:25, 26 February 2022 (UTC)Reply
Also, did these regexes for cases where |date= could be more appropriate than |year=.
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*\d{1,2} +[A-Za-z]+ +\d{4})", r"\1date\2"),
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*\d{1,2}\-d{1,2} +[A-Za-z]+ +\d{4})", r"\1date\2"),
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*[A-Za-z]+ +\d{4})", r"\1date\2"),
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*[A-Za-z]\-[A-Za-z]+ +\d{4})", r"\1date\2"),
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*\d{1,2} +[A-Za-z]\-d{1,2} +[A-Za-z]+ +\d{4})", r"\1date\2"),
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*[A-Za-z]+ +\d{4}\-[A-Za-z]+ +\d{4})", r"\1date\2"),
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*\d{1,2} +[A-Za-z]+ +\d{4}\-d{1,2} +[A-Za-z]+ +\d{4})", r"\1date\2"),
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*[A-Za-z]+ +\d{4}\-\d{4})", r"\1date\2"),
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)year(\s*=\s*[A-Za-z]+ +\d{4}\-\d{2})", r"\1date\2"),
Good? Bad? Missing anyone? - Klein Muçi (talk) 00:40, 26 February 2022 (UTC)Reply
Separators are supposed to be endash characters. dM-dMy, Md-Mdy, dMy-dMy use spaced separators.
Trappist the monk (talk) 01:25, 26 February 2022 (UTC)Reply
Thanks! 9 in total though? Am I right on that? - Klein Muçi (talk) 01:30, 26 February 2022 (UTC)Reply
There are 14 distinct date formats supported at en.wiki:
dMy, d-dMy, dM-dMy, dMy-dMy, Mdy, Md-dy, Md-Mdy, Mdy-Mdy, My-My, M-My, My, Sy4-y2, Sy-y, ymd.
Trappist the monk (talk) 01:42, 26 February 2022 (UTC)Reply
Yes. -5 because of translations = 9. Thank you! :) - Klein Muçi (talk) 01:56, 26 February 2022 (UTC)Reply
Are you sure that the translation regexes translate those parameters? The translation regexes that I've seen don't include |year=.
Trappist the monk (talk) 01:59, 26 February 2022 (UTC)Reply
Apparently you're right. So what should I do for those 5 cases? Transform them to date normally as the other cases and then let date translation regexes take over? - Klein Muçi (talk) 02:08, 26 February 2022 (UTC)Reply
Mdy-Mdy doesn't use spaced separators? - Klein Muçi (talk) 02:19, 26 February 2022 (UTC)Reply
Mdy-Mdy does use spaced separators.
Trappist the monk (talk) 14:45, 26 February 2022 (UTC)Reply
If possible invisible characters are known, can we set up regexes to detect and remove them in citations? Or maybe replace them, if so needed. What's stopping us from doing so? - Klein Muçi (talk) 11:37, 26 February 2022 (UTC)Reply
There are some that are obvious: HT (U+0009), LF (U+000A), CR (U+000D), NBSP (U+00A0), HSP (U+200A) – all of which can be replaced with a single plain space character (U+0020) and SHY (U+00AD) which can be replaced with hyphen-minus (U+002D). You will have to determine how python regex handles unicode. \n, \r, \t for LF, CR, and HT should work but the others require encoding. I think that this works: \u00A0 (NBSP), \u200A (HSP), \u00AD (SHY) but no guarantees. There are a rare handful of other unicode characters that can just be deleted:
U+0080, U+0081, U+0085, U+0093, U+0094, U+0096, U+0098, U+0099, U+009C, U+009E
Everything else requires human intervention because some invisible characters are required to properly render Indic (and possibly other) language text.
Trappist the monk (talk) 14:45, 26 February 2022 (UTC)Reply
Soo... Something like this?
(r"(\{\{\s*cit[aeio][^\}]*\|)U+0009([\|\}])", r"\1 \2"),
Most likely the U+0009 part should be written differently but I'm wondering about the overall syntax. - Klein Muçi (talk) 22:59, 26 February 2022 (UTC)Reply
https://regex101.com/ and use this template as a test string (there is a tab character between 'Title' and 'with' – you may have to get it from the edit window because the tab may have been converted to a space for rendering):
{{cite book |title=Title with tab character}}
Trappist the monk (talk) 00:31, 27 February 2022 (UTC)Reply
  1. (r"(\{\{\s*cit[aeio][^\}]*)((?:\u0080|\u0081|\u0085|\u0093|\u0094|\u0096|\u0098|\u0099|\u009C|\u009E))", r"\1"),
  2. (r"(\{\{\s*cit[aeio][^\}]*)((?:\u0009|\u000A|\u000D|\u00A0|\u200A))", r"\1 "),
  3. (r"(\{\{\s*cit[aeio][^\}]*)(\u00AD)", r"\1-"),

What do you think? - Klein Muçi (talk) 01:12, 27 February 2022 (UTC)Reply

I kinda think I've designed them wrongly even though the case you gave me worked as intended. - Klein Muçi (talk) 01:16, 27 February 2022 (UTC)Reply

You don't need the second capture group.
Trappist the monk (talk) 01:39, 27 February 2022 (UTC)Reply
Thank you! Bit of a newish question but how do I type these characters? For example, I was able to find how to type the tab character but I can't seem to find how to type the U+0080 one. I can't seem to find somewhere to copy it from as well. - Klein Muçi (talk) 09:49, 27 February 2022 (UTC)Reply
https://r12a.github.io/uniview/ In the box at the right where it says 'text area' type the digits from whatever U+xxxx you want. Below that at right is #>A. Click that and the digits are converted to the character. Copy and paste.
Trappist the monk (talk) 13:35, 27 February 2022 (UTC)Reply
Uhm, why is this category empty?
Kategoria:Vetitë CS1: Burime në shqip (sq)
What have I messed up? - Klein Muçi (talk) 11:37, 27 February 2022 (UTC)Reply
Nothing. Delete sq:Moduli:Citation/CS1/Configuration#L-2092. That line is overwriting sq:Moduli:Citation/CS1/Configuration#L-2069 because it happens later.
Trappist the monk (talk) 13:35, 27 February 2022 (UTC)Reply
Take a look at Smallem's contributions. Look for "Fshirje e simboleve të padukshme" which are invisible character related changes. Is it working as intended? I'm surprised because their category is empty meanwhile and Smallem is finding so many of them. I stopped its run momentarily. - Klein Muçi (talk) 12:19, 27 February 2022 (UTC)Reply
On a closer look, I think it's changing vertical templates into horizontal ones. Which is something I've wished for in the past and could be considered good. But are there any unforeseen bad consequences in what I'm writing above? :/ - Klein Muçi (talk) 12:47, 27 February 2022 (UTC)Reply
Yes, that is what is happening.
Trappist the monk (talk) 13:35, 27 February 2022 (UTC)Reply
Thank you, thank you and thank you! Continuing with the run then. :) - Klein Muçi (talk) 13:43, 27 February 2022 (UTC)Reply

U R an expert

edit

In the DYK nomination of Samuel Loudon it is shown as Gwillhickers and I as co-creators. Can you look at the DYK Template to see that this is set correctly, that when the nomination is promoted and Gwillhickers gets a DYK credit, that I also automatically get one also. Thanks.--Doug Coldwell (talk) 18:07, 27 February 2022 (UTC) {{Template:Did you know nominations/Samuel Loudon (printer)}}Reply

Umm, I did write at WP:Help_desk#Two different UTCs for creation: I have never had anything to do with dyk so I am not an expert. I know nothing so it would be better were you to ask at WT:DYK or some other appropriate venue where you would be talking to someone who knows something.
Trappist the monk (talk) 18:28, 27 February 2022 (UTC)Reply
@Trappist the monk and Doug Coldwell: — Actually I was the sole creator, on Feb 23 and Doug made his first edit on the 24th and on the 25th started becoming a welcomed major contributor. Having said that, I've no problem with Doug getting a DYK credit also, because he came up with a great hook and has made great contributions, including sources and information I've never could have gotten on my own. -- Gwillhickers (talk) 20:25, 27 February 2022 (UTC)Reply
You are in a dispute with Editor Doug Coldwell about the date/time of the creation of Samuel Loudon. I believe that the dispute arises from a difference in preference settings at Special:Preferences § mw-prefsection-rendering §§Time offset. Wikipedia records all events (creation/deletion/edits/moves/whatever) in UTC time. Samuel Loudon was created at 04:22, 24 February 2022 UTC. I know this because my §§Time offset: Time zone is set to: Use wiki default (UTC). If you are seeing a 23 February 2022 date and your §§Time offset: Time zone is set to: Use wiki default (UTC), or is set to: Other (time offset from UTC) +00:00 or is set to some other UTC equivalent (Europe/London perhaps) then there is a bug in the MediaWiki software somewhere that should be reported at WP:Phabricator.
As for who gets credit for what, I am completely indifferent to that so I have no opinion.
Trappist the monk (talk) 20:58, 27 February 2022 (UTC)Reply
I certainly don't need credit for a Did You Know. I have over 500 DYKs now. However, a credit for a Good Article would be much more interesting. I only have 200 of those. --Doug Coldwell (talk) 21:13, 27 February 2022 (UTC)Reply
You went ahead and added yourself as a creator on the DYK template so you would get credit. The only reason I nominate an article for a DYK is to get it out there on the WP front page for the readers. That should be our top priority. All else is secondary. I'm not enjoying the path we're headed down. If you really must list the article under the 24th then just do it. Let's get back to work. -- Gwillhickers (talk) 21:29, 27 February 2022 (UTC)Reply
  • @Gwillhickers: You will have to be the one that lists the nomination under February 24, since it it YOUR nomination. That would be the proper thing to do, as those are the instructions as to where to place the nomination = under the date created. Of course, if you do that you will have to set your Preferences to Use wiki default (UTC) - which is the correct thing to do. Having it off-set to some other time by several hours is to YOUR disadvantage. I have my Preferences set at Use wiki default (UTC) so all my events are shown correctly to Wikipedia time.--Doug Coldwell (talk) 10:52, 28 February 2022 (UTC)Reply

Url status - Archived copy

edit

Maybe not the right place to ask but I was thinking... Can't IABot solve the problems with the aforementioned maint categories? Has there ever been a discussion with its maintainers of this sort you're aware of? - Klein Muçi (talk) 01:18, 28 February 2022 (UTC)Reply

Here, |title=Archived copy has almost entirely been filled by IABot. There are others that are doing that now also because it is a uniformly common name that cs1|2 is configured to track. Alas, only in a maint cat so almost no one sees these messages which is why I would like to figure out how to trickle-convert them to error messages.
|url-status=live and |url-status=dead in the absence of |archive-url= is mere clutter so we track that. Editor Rlink2 using some sort of automated or semi automated tool to add |archive-url= to these cs1|2 templates; see Special:Contributions/Rlink2.
Trappist the monk (talk) 01:45, 28 February 2022 (UTC)Reply
Interesting... I was just talking with Rlink2.
My logic was somewhat like this:
IABot sets |title=Archived copy → IABot finds ways to actually find the correct title → IABot corrects the old mistakes.
A similar thing about URL status. While it does its changes in citations, it also corrects the parameters accordingly. Supposedly. Have you or any of the CS1 module maintainers ever talked with any of the IABot maintainers about these possibilities? The reason I insist on this is because IABot is already global and any solutions it is able to bring will also be global, thus helping multiple wikis at the same time without having to create different local solutions. After the latest update, and after we were able to "fix" the problems with the date auto-translation matter, those 2 categories have gotten top place for the number of articles in them at around 500-1000 articles. And unfortunately it's one of those cases I can't let Smallem deal with them so...
... But maybe RLink2 can help with this case... - Klein Muçi (talk) 01:59, 28 February 2022 (UTC)Reply
I remember reading some conversation someplace where it was said (I think) that finding source titles is not something that IABot can do. Talk to Editor Cyberpower678 and /or Editor GreenC, likely they can give you the definitive answer.
Trappist the monk (talk) 02:08, 28 February 2022 (UTC)Reply
IABot in theory could determine titles but it was decided early on this should be a dedicated bot or tool because it requires a lot of attention to continually refine and field trouble reports - it's beyond the bot's scope. Tools that might include Reflinks, reFill, Citation Bot and Rlink2's new BareRefBot. -- GreenC 05:29, 28 February 2022 (UTC)Reply
@GreenC, tried Reflinks and it didn't work. reFill didn't have SqWiki as an available project to work on and it's been a while I've asked to set up Citation Bot for SqWiki but its main operator hasn't been able to answer back. I don't know about BareRefBot. Maybe @Rlink2 can tell us more later. - Klein Muçi (talk) 11:01, 28 February 2022 (UTC)Reply
@Klein Muçi
I have a script that does this, and I was filling in "Archived copy" with the real title a while back. Maybe I will revisit it later on. Example diff here: https://en.wikipedia.org/w/index.php?title=2012_Hougang_by-election&diff=prev&oldid=1065129002
A possible issue is alot of sites have junk data and generic titles. Trappist said filling replacing "Archived copy" with generic titles isn't a good idea because it makes it harder to replace with the real title. No tool that fills titles is perfect but the script has some safe guards to protect against this.
The reason I insist on this is because IABot is already global and any solutions it is able to bring will also be global, If multiple wikis like the services the bot provides there could be a seperate global bot created to supplement IAbot in archiving and citation matters like this one. Rlink2 (talk) 19:28, 28 February 2022 (UTC)Reply
@Rlink2, I checked the example your provided and it looked correct as far. There's another thing we'd be interested in SqWiki beside the missing language parameter. - Klein Muçi (talk) 01:05, 1 March 2022 (UTC)Reply

Diffs

edit

You are aware of what Smallem is doing with the spaces. Take a look at this diff. It's a normal one but doesn't the highlighting look strange or confusing to you? Or is it just me that I'm not used with these kinds of diffs? I was wondering if I should report it somewhere as a "failure" or an edge case where it starts breaking. - Klein Muçi (talk) 10:03, 1 March 2022 (UTC)Reply

Diff highlighting often looks strange. Looks to me like smallem did what it was supposed to do.
Trappist the monk (talk) 12:16, 1 March 2022 (UTC)Reply
Yes, it did. I was just wondering if I should report somewhere the diff feature breaking on these cases. But judging from your answer and my personal experience, I believe that's, unfortunately, a normal thing for now. :/ - Klein Muçi (talk) 12:22, 1 March 2022 (UTC)Reply

Special:BookSources

edit

This page and this page behave differently. Is that normal? Any idea why? - Klein Muçi (talk) 02:53, 2 March 2022 (UTC)Reply

I don't know. At en.wiki we have Wikipedia:Book sources which is apparently the source for Special:BookSources. At sq.wiki, sq:Wikipedia:Book sources does not exist. You might try importing our WP:Book sources and see if that changes your Special:BookSources. If not, WP:VPT is that way →.
Trappist the monk (talk) 12:17, 2 March 2022 (UTC)Reply
Fixed it. Just in case anyone is interested in the future, you need to change Mediawiki:Booksources. That's where the title that special page looks for for the information of what to display there. - Klein Muçi (talk) 12:52, 2 March 2022 (UTC)Reply

Update IANA language-subtag-registry file

edit

The IANA language-subtag-registry file got updated yesterday. Can you rerun the script to update all the data modules? Thank you! Robin van der Vliet (talk) (contribs) 08:35, 3 March 2022 (UTC)Reply

Hey!

edit

These were facts that I’ve put there, because I’ve been reading accurate history of Blackbeard by the historian Baylus Brooks. The information that you have redone is completely fake, not real at all. Blackbeard's forename, and surname is already known, which is "Edward Thache". Kennythenuker (talk) 17:57, 5 March 2022 (UTC)Reply

Sorry, I didn’t mean to be a little rude about, I didn’t know that Wikipedia doesn’t care about the truth. My apologies. Kennythenuker (talk) 18:09, 5 March 2022 (UTC)Reply

Blackbeard is a featured article. As such it has been subjected to a rather strict review of its text and supporting sources. If you believe that you have sources that show that the text of the article is incorrect or can be improved, you must include reference to those sources when you edit that article.
It might be best for you to start a discussion at Talk:Blackbeard before changing the article's text. Bring your sources and say what it is that you want to change. Other editors more familiar with the subject matter than I can help you there.
Truth is in the eye of the beholder. Wikipedia is here to summarize what reliable sources have published about a subject (see WP:Reliable sources – a content guideline) and that which has been summarized must be verifiable in reliable sources (see WP:Verifiability – en.wiki policy). Please read those two pages; they are central to how wikipedia works.
Trappist the monk (talk) 18:24, 5 March 2022 (UTC)Reply

I’m sorry for not realizing about what Wikipedia is all about. I appreciate you being honest about it. People make mistakes. No hard feelings! :) Kennythenuker (talk) 18:38, 5 March 2022 (UTC)Reply

last → author

edit
  • |year=3 March 2022 → [Smallem helps] → |date=3 March 2022;
  • |last=Klein Muçi (actually first + last) Can/Should we do a similar thing like in the case of the "pseudo-maint cat" above and convert these cases to author? I doubt we can provide auto-detection somehow, right? - Klein Muçi (talk) 12:46, 6 March 2022 (UTC)Reply
You can but it won't be easy because you have to look for a matching |first= and if found skip. It becomes more complex because these parameters can be enumerated so, unless there were a dire need to do it, I wouldn't.
Trappist the monk (talk) 12:54, 6 March 2022 (UTC)Reply
But there are also cases when you only have |last= with a correct last name value while missing the first name value and that shouldn't be converted to |author= ideally. But I think that would make it impossible right? So the task is more like "convert unmatched |last= to |author=", according to what you propose. I'm not sure how dire the need is. I got this idea while manually fixing multiple author names in 1 parameter. What I do is I open the article for edit and search for author= and then skip until I find the one with multiple values and start splitting it. And then I started stumbling upon many articles which didn't have a single author parameter and they still were part of that maint-category. After a while I understood/remembered that author parameters could also be expressed with |last= and that added a bit of chaos to my method. Not only it introduced a new variable I should be aware of but it also made me search for matching |first= parameters and values and many times I had to manually switch from |last= to |author= because of the reasons explained above and that's when I got the idea. - Klein Muçi (talk) 13:22, 6 March 2022 (UTC)Reply

Help!

edit

Hello, Trappist the monk,

There is a CSD tag SOMEWHERE that is causing Category:Articles containing uncoded-language text to show up as a requested page for speedy deletion. But I can't find the page that was originally CSD tagged. And the category hasn't been emptied yet so it would be a bad idea to delete it. Can you track down the page that has been tagged for deletion and figure out if a mistake has been made? Thanks for any help you can supply. Liz Read! Talk! 23:04, 5 March 2022 (UTC)Reply

I think I found it on Template:Lang-mis, it was tagged for uncontroversial deletion. Editors need to be careful about tagging templates for deletion as it can impact related but necessary pages. But I'll leave this message here any way. Liz Read! Talk! 23:08, 5 March 2022 (UTC)Reply
At Wikipedia:Templates for discussion/Log/2022 March 5 § Template:Lang-mis
Trappist the monk (talk) 23:44, 5 March 2022 (UTC)Reply
Thanks for taking this to the correct discussion forum. Liz Read! Talk! 01:07, 9 March 2022 (UTC)Reply

Help, pt. 2

edit

Hi, Trappist,

Category:CS1 maint: DOI inactive as of November 2021 showed up as an empty category. Do you expect it to remain empty or is this a periodic emptying of dated categories? Thanks for any help, I'm not sure where to go with this questions about CS1 matters. Liz Read! Talk! 01:05, 9 March 2022 (UTC)Reply

It is conceivable that someone will, in future, add |doi-broken-date=November 2021 to a cs1|2 template but that is no reason to keep the category once it has been emptied. I notice that you deleted the categories for June–September 2021. What is different about this one?
Something or someone apparently trawls these categories and updates the date in |doi-broken-date= so that we don't have a list of categories dating back to the dawn of wikipedia which must be why there are only six subcats in Category:CS1 maint: DOI inactive.
Trappist the monk (talk) 01:33, 9 March 2022 (UTC)Reply
Well, a little while ago, I found a script that allows me to look at the contents that have recently been put into a category or removed. I wish I had known about this script years ago as it comes in handy. And this category had contents that were removed by CitationBot today. So, I was wondering if this were temporary moves or more permanent ones. And the October 2021 category isn't empty. I don't recall deleting the other, older categories but I do delete a lot of empty maintenance categories once the relevant date has passed. Liz Read! Talk! 02:02, 9 March 2022 (UTC)Reply
Sorry to intervene but I've been thinking of asking similar questions about the DOI-related categories myself as well. Are those categories continuously being deleted while new ones get created? In my homewiki that would be bizarre because I suspect their content to be most of the time (if not always) empty and basically we'd be creating and deleting empty categories periodically. - Klein Muçi (talk) 03:05, 10 March 2022 (UTC)Reply
At en.wiki, the doi broken date categories are created as needed and deleted when no longer needed. At sq.wiki it may be that editors don't add that many |doi-broken-date= parameters so it may be that most of the time there is no reason to create a category that will never be used. Here, editors commonly add |doi-broken-date= parameters so a new category is created every month, someone or something empties older categories which are then deleted. The emptying process may be an automated tool that attempts to follow the doi. When the tool fails to find the source, it updates |doi-broken-date= to the current month. I suspect that that is User:Citation bot but don't know for sure.
Trappist the monk (talk) 12:55, 10 March 2022 (UTC)Reply
Hmm... I see... I guess we will stop creating them then. Feeling courageous though, I'll ask if we really need this kind of system. Do we need articles categorized by the date of broken DOI? We don't categorize articles by date of dead URLs or by access-dates, etc. If we do, can't we have them all in 1 maint category, not monthly ones? If we can't have that here, can we have that at SqWiki/other wikis that don't have such a dynamic use of that function? - Klein Muçi (talk) 13:24, 10 March 2022 (UTC)Reply

Trans-title/chapter/etc.(?)

edit

Keeping up with peculiar global needs in regard to CS1, can we create some error categories about sources missing |trans-title/chapter/etc.(?)= when |language= differs from the local one? This can either be an universal proposal (pitchforks and torches aside, EnWiki could also benefit from English translated titles/chapters/etc.(?) in foreign sources, especially those that use different scripts), an only-foreign-wikis feature on or a specific request for SqWiki only. - Klein Muçi (talk) 03:18, 10 March 2022 (UTC)Reply

There is some question about the validity of |trans-title= and its companions. The purpose of a citation is to help the reader locate a copy of the source. If the source only has an original-language title, a translation of that title into the local language isn't going to be much help to the reader because whatever translation is provided in |trans-title= won't be indexed. When the source itself provides a local-language title, that is the only time that |trans-title= should be used because when it comes to translations, every translator is different; who is to say which translation not done by the source author is the correct translation.
Trappist the monk (talk) 12:41, 10 March 2022 (UTC)Reply
That's, honestly, the first time I read this. So far, from what I've read in cite template docs, I've always thought that it served to provide a small window of context to the readers if the source was in a foreign language and that it was used "similar" to |access-date=, that is, a detail that is added by the editor, not by the official source. Do you have any information how that parameter is utilized here? Do editors make the same mistaken (?) assumption as I do when it comes to it? Is that really a mistake? I'm asking because, as a wiki that has most of its sources in English, we've treated that parameter really serious, going as far as making it one of the standards articles must conform to if they want the status of featured articles, that is, every foreign title must have its translated form. What you're saying above would change all of that. - Klein Muçi (talk) 13:06, 10 March 2022 (UTC)Reply
Perhaps |trans-title= does provide a small window of context but it won't help the reader locate the source unless the translated title is an 'official' title of the source. As far as I can tell, the cs1|2 documentation does not make that suggestion. The documentation describes what an editor is to give it and how the templates display the result:
trans-title: English translation of the title if the source cited is in a foreign language. Displays in square brackets after title. Use of the language parameter is recommended.
Were we to implement some sort of error or maintenance messaging for non-sq-title-requires-trans-title, you would end up with an enormous category that could not be fixed by smallem unless you know how to teach smallem how to translate non-sq |title= into sq |trans-title=. If an error message, almost every page will bleed red; as much or more than Mungon ose është bosh parametri |language=. If a maint message, then only those who can see maint messages would see the message. Still a damn big category and no automated way to clear it.
Trappist the monk (talk) 15:45, 10 March 2022 (UTC)Reply
Eh, I thought that. But that begs a philosophical discussion. Should we ignore the correct/right way (?) just because it is a really hard thing to accomplish? I'm asking in a neutral way because, after all, pragmatic approaches are valid on its own. I'd be interested in reading your opinion and hopefully of more editors on this aspect but I'm afraid in asking anywhere else because of all the pitchforks and torches people are so happy to grab against the red sea without giving much thought to any of its (supposed) benefits. - Klein Muçi (talk) 16:56, 10 March 2022 (UTC)Reply

Url status

edit

Straightforward question: Can I just remove on sight any |Url-status=live assuming I won't break anything and IABot will deal with any needed details? - Klein Muçi (talk) 14:10, 11 March 2022 (UTC)Reply

@Klein Muçi
If you remove url-status=live, and an archive link is provided, then the citation will redirect to the archived version instead of the live link (I think). In that case, only remove it if you know the link is dead (or you can remove both the archived link and url-status=live, but that is a regression IMO).
If you remove url-status=live and there is no archived link, then nothing will happen (url-status without archive-url is "mere clutter" as Trappist said). So you can feel free to remove that if you want. Rlink2 (talk) 14:30, 11 March 2022 (UTC)Reply
Yes, because |Url-status=live is not a known parameter.
If you really mean |url-status=live, then maybe:
  • When |archive-url= is missing or is present without an assigned value, |url-status= (with any or no assigned value) has no meaning so may be deleted
  • When |archive-url= has an assigned value
    • |url-status=dead (|archive-url= links |title=) may be deleted because that is the default state
    • |url-status=deviated, |url-status=unfit, |url-status=usurped, |url-status=bot: unknown require inspection of the url at |url= after which the parameter may be deleted when appropriate
    • |url-status=live (|url= links |title=) should not be deleted unless you are intent on invoking the wrath of other editors.
Trappist the monk (talk) 14:42, 11 March 2022 (UTC)Reply
@Rlink2, @Trappist the monk, I must say I'm kinda lost because I got bombarded with completely new information. My guess was that if the URL was live and working, there would be no need to state its status so |url-status=live would be redundant and could be removed. I also thought that IABot was already checking what URL was live or not continuously and wouldn't let us redirect to an archive link if the main URL was still live so it would fix any problems we would do while working with URLs. What you say is completely different from what I supposed. You say that actually |url-status=dead is what would cause redundancy. You also say that IABot allows us to switch to archive links even when the URL is still live and that it may be possible to have |url-status= without |archive-link=, again something I didn't expect to be possible because of IABot's work. - Klein Muçi (talk) 01:06, 12 March 2022 (UTC)Reply
|url-status=live is redundant when |archive-url= is omitted or empty so may be (should be) deleted. |url-status=dead is redundant when |archive-url= has an assigned value so can be (should be) deleted.
I said nothing about IABot. I do not know if IABot updates the status of |url-access=; I have not paid attention to its edits except when those edits result in a broken cs1|2 citation template.
Trappist the monk (talk) 01:43, 12 March 2022 (UTC)Reply
I see. I was mostly hoping to get an answer about the interaction of IABot with that category overall. But I also got some added information about fixing it manually so I'm not complaining. Thank you! :) - Klein Muçi (talk) 12:49, 13 March 2022 (UTC)Reply

Nomination for merger of Template:Lang-grc-x-byzant

edit

 Template:Lang-grc-x-byzant has been nominated for merging with Template:Lang-grc-x-medieval. You are invited to comment on the discussion at the template's entry on the Templates for discussion page. Thank you.  — Mr. Guye (talk) (contribs)  18:56, 21 March 2022 (UTC)Reply

Bergenline Avenue

edit

Hi, Trappist. Thank you for effecting some cite repair with your edit today to Bergenline Avenue. I do have a couple of questions, though: 1. Is there a specific guideline or MOS to follow that indicates when a dead link should be indicated in a citation's parameter, and when it should be in a separate tag with curly brackets? 2. My observation has been that when information originates with one source, but is re-published by a second one, and that second one is the one cited in an WP article, that the parameter "via" is used for the second one. You changed this to "agency" and "publisher." Again, is there is particular guideline or MOS that requires this change? Thanks again. Nightscream (talk) 15:41, 22 March 2022 (UTC)Reply

This is about this template?
{{cite web|author=Wayne Parry|publisher=[[Associated Press]] |via=[[San Francisco Chronicle]]|url=http://www.sfgate.com/cgi-bin/article.cgi?f=/n/a/2005/12/08/national/w081305S21.DTL|title=Menendez Inspires Pride in Cuban-Americans|language=en-US|url-status=dead|date=December 8, 2005}}
Wayne Parry (December 8, 2005). "Menendez Inspires Pride in Cuban-Americans". Associated Press – via San Francisco Chronicle.{{cite web}}: CS1 maint: url-status (link)
  1. |url-status=dead is meaningless when |archive-url= is empty or omitted. Because there is no |archive-url=, |url-status=dead contributes nothing so no one knows that the url in |url= is dead. The parameter's documentation is here. {{dead link}} adds visible notification and categorization; neither of those things are within the |url-status= remit.
  2. In the above citation, the newspaper is San Francisco Chronicle published by whatever company publishes the newspaper. The newspaper got the 'article' from Associated Press, a news agency. The newspaper could have gotten the article from an in-house or independant human reporter. Had the newspaper done that, |author= – or appropriate alias(es) – would apply. Since the 'article' came from a news agency, the name of the agency goes in |agency=. The parameter's documentation is here. The deliverer (in this case http://www.sfgate.com) is not different from the publisher (sfgate is the publisher's website) so |via= does not apply. The parameter's documentation is here.
  3. {{cite news}} because the source is a newspaper article.
Trappist the monk (talk) 16:14, 22 March 2022 (UTC)Reply

Hi, please see talk page, grateful for your view as a former contributor to this page. Regards, Springnuts (talk) 09:28, 23 March 2022 (UTC)Reply

Monkbot Task 19 - IUCN status

edit

Hi Trappist the monk, in this automated edit, the bot script has replaced the correct IUCN status ("Critically Endangered (Possibly Extinct)" with a simplified version ("Critically Endangered") that results in the "possibly extinct" text being removed from the taxobox.

The source for this info should be taken from the Assessment Information para of the IUCN Red List entry and not the abstract at the top. I am sure that there are many other instances of this change that will now also have to be corrected. 'Cheers, Loopy30 (talk) 12:17, 23 March 2022 (UTC)Reply

PE is not a category in either of IUCN2.3 or IUCN3.1. The bot calls the IUCN API with Hemignathus affinis which returns this:
{"name":"hemignathus affinis","result":[{"taxonid":103823664,"scientific_name":"Hemignathus affinis","kingdom":"ANIMALIA","phylum":"CHORDATA","class":"AVES","order":"PASSERIFORMES","family":"FRINGILLIDAE","genus":"Hemignathus","main_common_name":"Maui Nukupuu","authority":"Rothschild, 1893","published_year":2016,"assessment_date":"2016-10-01","category":"CR","criteria":"D","population_trend":"Unknown","marine_system":false,"freshwater_system":false,"terrestrial_system":true,"assessor":"BirdLife International","reviewer":"Butchart, S.H.M. & Symes, A.","aoo_km2":null,"eoo_km2":"22","elevation_upper":2000,"elevation_lower":1000,"depth_upper":null,"depth_lower":null,"errata_flag":null,"errata_reason":null,"amended_flag":null,"amended_reason":null}]}
In that is "category":"CR" which is what the bot used to replace PE. Also there is "criteria":"D". I have not been able to find anywhere that says that criterion D is defined as 'possibly extinct'. Yes, the phrase 'possibly extinct' appears in the API's assessment narrative but that is a wholly unstructured wall of text so the bot does not attempt to parse any meaning from it.
When IUCN adopt PE, the bot will change accordingly. At this edit, Editor Dysmorodrepanis~enwiki (apparently no longer with us) predicted that CR (PE) is likely to be adopted by other authorities including the IUCN in the near future. After 15+ years, I'm not going to hold my breath for that. At Wikipedia:Conservation status § Special Wikipedia categories, 'we' (en.wiki) assert that CR (PE) is a special wikipedia category. If that is true then |status_system= in {{speciesbox}} and {{taxobox}} etc should have support for 'our' special wikipedia category so that we don't imply that IUCN have a category that they don't actually support.
Trappist the monk (talk) 14:05, 23 March 2022 (UTC)Reply
Criterion D refers only to the assessed number of mature individuals (<50 for Critically Endangered taxa). The use of PE in Wikipedia taxoboxes does not change or add to the existing radio buttons of the IUCN ratings (it still remains as CR), but adds text after the words "Critically Endangered" in the taxobox that is properly referenced to the BirdLife assessment on the IUCN Red List page. As this is not controversial to add manually, then the automated bot should not override this format simply because the script is unable to parse the information from the API code. In the example given above, along with all the beneficial changes made by the bot, the result was a removal of this sourced information. I am concerned both for the potential scale of these changes (1197 species listed as CR(PE) here) and that any manual revision of this status now will only be undone by a later pass of the automated bot. Loopy30 (talk) 15:34, 23 March 2022 (UTC)Reply
You know what? I just don't need this. Monkbot/task 19 is now retired.
Trappist the monk (talk) 20:48, 23 March 2022 (UTC)Reply

Wikidata QID parameter

edit

While the substantive debate should happen on HT:CS1, can you help me understand why err_bad_qid has an errant semicolon in Module:Citation/CS1/testcases/identifiers? int21h (talk · contribs · email) 16:53, 24 March 2022 (UTC)Reply

What do you mean by err_bad_qid has an errant semicolon? The string 'err_bad_qid' does not appear in Module:Citation/CS1/testcases/identifiers. If you mean the semicolon between error messages in this (from Module talk:Citation/CS1/testcases/identifiers):
{{cite journal/new |title=Title |q=Q}}
"Title". {{cite journal}}: Cite journal requires |journal= (help); Unknown parameter |q= ignored (help)
that semicolon is supposed to be there. The fix for that (because the identifier tests should not be emitting error messages not related to identifiers) is to change line 655 to use a different template or to include |journal= with an assigned value.
Trappist the monk (talk) 17:10, 24 March 2022 (UTC)Reply
Yes and thank you! int21h (talk · contribs · email) 17:26, 24 March 2022 (UTC)Reply

Module:Canada NTS

edit

You added this comment:

"move this table to Module:Canada NTS/data; rvalues without wikimarkup; load table with mw.loadData()"

I do not know what "rvalues without wikimarkup" means. I want these names wiki-marked-up because I want them to be outputted as links to relevant articles. If Wikidata can be used for this, I would like to be able to do that instead.

-- Denelson83 22:16, 27 March 2022 (UTC)Reply

A quick peek at wikidata looking for 'Canada NTS' returned nothing so I suspect that a lua data module will be required. I'll move the data and hack an example of how you can wikilink the data. Give me 15 minutes.
Trappist the monk (talk) 22:20, 27 March 2022 (UTC)Reply
I have already moved the data to Module:Canada NTS/data. But attempting to invoke it from the main module gives "Lua error in Module:Canada_NTS at line 108: Module:Canada NTS/data returned boolean, table expected." -- Denelson83 22:21, 27 March 2022 (UTC)Reply
I needed to use a "return" keyword to fix this. Now I just need a suggestion on how to properly wikilink these names, preferrably using Wikidata. The wikilinks should be correct, but pipeable, as the displayed text must exactly match the NTS map sheet title, so the link to St. Mary's Bay, Newfoundland and Labrador should look like "St. Mary's Bay". -- Denelson83 22:40, 27 March 2022 (UTC)Reply
As I said, wikidata does not appear to support NTS map sheet IDs. Sure, you can probably create a table of qids to match NTS map sheet IDs but qids are very very human unfriendly so for us humans, the actual names in the data module are best.
The are a couple of options. For those links that require piping:
["1K13"] = "St. Mary's Bay, Newfoundland and Labrador|St. Mary's Bay",
["1K13"] = {"St. Mary's Bay, Newfoundland and Labrador", "St. Mary's Bay"},
Of those, from a programming standpoint, the first is easiest and more efficient but the second isn't too difficult (this not tested):
if title[args_t[1][2]] then
	return string.format ('[[%s|%s]]', title[args_t[1][1]], title[args_t[1][2]]);
else
	return string.format ('[[%s]]', title[args_t[1]]);
end
I don't think that wikidata is helpful here or maybe I just don't understand why are you convinced that it is?
Trappist the monk (talk) 23:08, 27 March 2022 (UTC)Reply
It is only because I thought using Wikidata would be more efficient, as in associating the exact map sheet name with a Wikidata QID.
I will go with your first option. -- Denelson83 23:14, 27 March 2022 (UTC)Reply
There is an i18n accommodation that wikidata is useful for: you can get the name of the local wiki's article about a place if there is an article there. I've added article_name_from_qid_get() to Module:Canada NTS which will return the local wiki's article name.
Trappist the monk (talk) 23:52, 27 March 2022 (UTC)Reply
In that case something like this:
["1K13"] = {"Q2879512", "St. Mary's Bay"}, -- St. Mary's Bay, Newfoundland and Labrador
plus an adjustment of the code snippet above...
Trappist the monk (talk) 23:55, 27 March 2022 (UTC)Reply
That might work. Involving Wikidata in this would honestly be a more holistic way of accomplishing this. Besides, a lot of these features do not have articles on Wikipedia, but do have entries in Wikidata. Denelson83 02:15, 28 March 2022 (UTC)Reply

Regex help

edit

Hello, Trappist! How have you been?

I was wondering something about regex and I thought I could spare myself some hours of research if I asked you, given that you've helped me in the past with many regular expressions.

Is there an elegant way to have a regex that can catch catfishbag, fishcatbag, bagfishcat and all the possible variations + those words individually (cat, fish, bag)? I was thinking maybe somehow utilizing capture groups... maybe... - Klein Muçi (talk) 15:12, 1 April 2022 (UTC)Reply

I would be very surprised if there were an 'elegant' solution. Nothing about regex is elegant when the problem is complex.
Trappist the monk (talk) 15:23, 1 April 2022 (UTC)Reply
Sad. :( - Klein Muçi (talk) 15:29, 1 April 2022 (UTC)Reply
@Klein Muçi If you use multiple regexes, maybe. Regexes are basically a very limited programming language, using a real programming language to do stuff may be simpler when the problem is complex for regex.
But Wikimedia only lets you search via regex on the web interface, so i am guessing your only option is regex. Your specific question seems to be solvable with multiple regexes. For your example, the regexes:
(cat|fish|bag)(cat|fish|bag)(cat|fish|bag) and (cat|fish|bag) seem to do what you want. Rlink2 (talk) 16:22, 1 April 2022 (UTC)Reply
Except that that also finds catcatcat, etc...
Trappist the monk (talk) 16:59, 1 April 2022 (UTC)Reply
Thank you for the insight! :) - Klein Muçi (talk) 21:58, 1 April 2022 (UTC)Reply
@Klein Muçi: in total there are 15 permutations. The regex to match all 15 is \b(fish|bag|cat|catfish|catbag|bagcat|bagfish|fishbag|fishcat|catfishbag|catbagfish|bagcatfish|bagfishcat|fishbagcat|fishcatbag)\b
Here is a web interface search using that regex
I guess that those words are only an example, and not your actual search. But I hope that it shows you how to do this. BrownHairedGirl (talk) • (contribs) 23:15, 2 April 2022 (UTC)Reply
@BrownHairedGirl, thank you!
No, those were only examples. This discussion was started by something regarding our abuse filter in my homewiki. We had some IP users, who most likely were children, writing around variations of "mutikakacici" in articles which is the Albanian equivalent of English "poopoopeepee". Fortunately the edits stopped some time ago and there wasn't anything too crazy as to not be handled manually but we always strive for automatization in our project because of the lack of human resources so that made me wonder how could I handle cases like these with the filters. Apparently the elegant solution I hoped for doesn't really exist so at the moment I did nothing with it, not wanting to overcrowd the vulgar words filter more than it currently is. I wonder if any of the current rules or variables may help with my case or if it would be wise in requesting new ones to be added, if they can't. - Klein Muçi (talk) 23:49, 2 April 2022 (UTC)Reply
@Klein Muçi: I haven't worked with abuse filters myself, but I guess that one of the issues there is the technical matter of balancing completeness of search versus server load in processing the search. I don't know how that equation plays out, but as a general principle adding extra words is not too onerous, but wildcards etc can really push up the cpu load.
The other issue is a human one. If you catch all the simple cases, then some of the vandals will find ways to evade the filters by adding extra characters to defeat the filter: e.g. muti4kaka*cici or muti|kaka/cici. Filtering for all such permutations gets a lot more complex and a lot more CPU intensive.
My instinct is that there may be some advantage in not displacing the vandalism into more sophisticated forms; let them enter the crude stuff which can be tracked with a relatively simple search, and then use some tool to revert the edit and whack the vandal. But again, I have not actually done this stuff, and you would do better talking to those who have actual experience of finding the sweet point in building abuse filters.
Hope this helps. BrownHairedGirl (talk) • (contribs) 00:32, 3 April 2022 (UTC)Reply
@BrownHairedGirl, it does, thank you! :) - Klein Muçi (talk) 05:25, 3 April 2022 (UTC)Reply

More help needed on Module:Canada NTS

edit

I am trying to modify the grid function so that it outputs one of four different things, depending on if specific strings exist in the arguments passed to the module from #invoke.

Say the output is "30M11", without any additional arguments from #invoke.

If the string "area" is found in the arguments in #invoke, e.g.,

{{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|area}}

then the output should be "30M".

If the string "link" is found in the arguments in #invoke, e.g.,

{{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|link}}

then the output should be "[https://maps.canada.ca/czs/index-en.html?bbox=-79.5,43.5,-79,43.75&name=NTS_map_sheet_30M11 30M11]".

But if both "link" and "area" are found as separate arguments in #invoke, e.g.,

{{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|link|area}}

then the output should be "[https://maps.canada.ca/czs/index-en.html?bbox=-80,43,-78,44&name=NTS_map_sheet_30M 30M]".

I have already added code to the grid function to calculate the figures in the "bbox=" argument in the hyperlink, now I just need to have the argument-reading routine modified to look for the arguments "area" and "link", however I have not been able to figure this out.

-- Denelson83 03:54, 7 April 2022 (UTC)Reply

Tweaked it some:
  • {{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871}} → 30M11
  • {{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|area}}invalid NTS series input
  • {{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|link}}invalid NTS series input
  • {{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|link|area}}invalid NTS series input
  • {{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|name}}invalid NTS series input
  • {{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|name|area}}invalid NTS series input
  • {{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|name|link}}invalid NTS series input
  • {{#invoke:Canada NTS|grid|lat=43.6426|lon=79.3871|name|link|area}}invalid NTS series input
Trappist the monk (talk) 16:37, 7 April 2022 (UTC)Reply

Perfect! Thanks. That merges in the functionality from {{Canada NTS Map Sheet}}, which means that template can now be tweaked to use this module instead. -- 19:44, 7 April 2022 (UTC)

Yes, well..., except ...
At Iqaluit, the infobox has:
|blank1_info={{Canada NTS Map Sheet|25|N|10}}
but the template renders: 25N15
Both are correct because Iqaluit is an edge case lying on the southern boundary of 25N15 and the northern boundary of 25N10. '025N10' was added at this edit and had stayed that way until you added the template but it still referred to 25N10.
The template now ignores series/area/sheet NTS ID components and (because |lat= / |lon= are not provided in the template call) fetches them from wikidata. Sure, one can do this:
{{Canada NTS Map Sheet|lat=63.650|lon=68.517}}25N10 Hill Island
but shouldn't the template accept an NTS ID? I suppose that there is no real need for the NTS ID to be split among individual parameters. For backward compatibility though, it probably should. Possible order of precedence would be:
  1. |{{{1}}}|{{{2}}}|{{{3}}}{{{3}}} optional
  2. |nts=
  3. |lat= / |lon=
  4. lat/lon from wikidata
Trappist the monk (talk) 22:55, 7 April 2022 (UTC)Reply
That is a good idea. Let's see if we can get some code in that recognizes this and can use the legacy parameters in this way, as the vast majority of transclusions of {{Canada NTS Map Sheet}} still use the old format. And FWIW, in the case of Iqaluit, NRCan's Toporama tool puts the "Iqaluit" point within map sheet 25N10. The migration also broke the example link that I had added to the National Topographic System itself, but I very quickly fixed that. -- Denelson83 05:57, 8 April 2022 (UTC)Reply
Odd, since 25N15 is named Iqaluit and 25N10 is named Hill Island...
I have converted the positional parameters for area, link, name to named parameters |area=, |link=, |name= which all take the single value yes. This much simplifies handling of the positional series, area, sheet which are now the only positional parameters that will be supported.
Trappist the monk (talk) 16:01, 8 April 2022 (UTC)Reply
So maybe this wasn't such a good idea. When using lat/lon, the module wants to calculate a bounding box for the url. When only series, area, sheet are provided, there is no lat/lon so the module can't calculate a bounding box. Leaving the bounding-box query string empty or omitting it entirely doesn't zoom the map to the desired location. Is there a url that works without a bounding box?
Trappist the monk (talk) 17:13, 8 April 2022 (UTC)Reply
No. But as it turns out, there is code to translate the map sheet ID, both for a 1:50,000 scale map sheet and a 1:250,000 scale map area, to a bounding box in the history of {{Canada NTS Map Sheet}}. It just needs to be converted to Lua. If that does not work, then I will detail the algorithm that makes it work. -- Denelson83 19:41, 8 April 2022 (UTC)Reply
I have gone ahead and implemented the algorithm to convert a map sheet ID to bounding boxes as the "extents_from_grid" function in Module:Canada NTS. -- Denelson83 00:30, 9 April 2022 (UTC)Reply
Appears to be working now. I had to tweak extents_from_grid() to account for missing {{{3}}} (sheet) and made the same tweak in the event that there is also missing {{{2}}} (area). Is there any reason to support something like {{Canada NTS Map Sheet|25}}?
Trappist the monk (talk) 12:33, 9 April 2022 (UTC)Reply
To the best of my knowledge, NRCan did not release any standalone 1:1,000,000 scale NTS maps. However, a use case for just the map series number could be indicating the general location of large-area features, such as Wood Buffalo National Park. -- Denelson83 02:59, 10 April 2022 (UTC)Reply

New administrator activity requirement

edit

The administrator policy has been updated with new activity requirements following a successful Request for Comment.

Beginning January 1, 2023, administrators who meet one or both of the following criteria may be desysopped for inactivity if they have:

  1. Made neither edits nor administrative actions for at least a 12-month period OR
  2. Made fewer than 100 edits over a 60-month period

Administrators at risk for being desysopped under these criteria will continue to be notified ahead of time. Thank you for your continued work.

22:53, 15 April 2022 (UTC)

Special:WantedTemplates

edit

Hi, I was just cleaning up Special:WantedTemplates and found one of your pages. Would it be possible to fix this? Thanks! Plastikspork ―Œ(talk) 16:57, 16 April 2022 (UTC)Reply

US Navy

edit

Thanks, you trashed an hour and a half of editing. You didn't have to delete it, that section was much more practical and quick to understand, and there is no need to search class by class or ship by ship when there is already a section especially that already shows the ships in service in the navy. Gianlucca Cetraro (talk) 14:09, 19 April 2022 (UTC)Reply

Yep, I did have to delete it. The United States Navy article is a summary – notice that many level two sections in that article have Main article:, See also:, etc hatnotes that link to more detailed articles. At the top of United States Navy § Ships is a See also: hatnote that links to List of current ships of the United States Navy. That list article is already constantly updated by adding new ships or removing them. There is no need to double that maintenance effort by keeping a list of current ships in the United States Navy article.
Trappist the monk (talk) 14:46, 19 April 2022 (UTC)Reply

Usurped

edit

Hi Trappist, I was wondering why the 'url=usurped' entries in cites are flagged as CS1 errors. What's the intended action? Neils51 (talk) 14:04, 20 April 2022 (UTC)Reply

Can you show me where you are seeing |url-access=usurped causing "CS1 errors"? That should not be happening. |url-access=usurped does emit a cs1 maintenance message:
{{cite book |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2022-04-20 |url-status=usurped}}
Title. Archived from the original on 2022-04-20.{{cite book}}: CS1 maint: unfit URL (link)
Trappist the monk (talk) 14:26, 20 April 2022 (UTC)Reply
My apologies, I should have been specific. I meant |url-status=usurped emitting the maint message (per your example). Per documentation here the use of|url-status=usurped is quite valid so why the CS1 maint message? A maint message of this type implies that there is an action that may be taken to suppress the message? With all other CS1 maint messages, AFAIK, there are actions that may be taken to resolve an error in the markup. Sometimes cites with a |url-status=usurped actually have the URL returning a 404 and the status may then be flagged as 'dead' however it's a subset. Neils51 (talk) 11:58, 21 April 2022 (UTC)Reply
Primarily so that editors (readers don't see maintenance messaging) can see why the citation is rendered without a link to the original source; cf:
{{cite book |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2022-04-20 |url-status=usurped}}
Title. Archived from the original on 2022-04-20.{{cite book}}: CS1 maint: unfit URL (link)
{{cite book |title=Title |url=//example.com |archive-url=//archive.org |archive-date=2022-04-20}}
Title. Archived from the original on 2022-04-20.
Such citations might be improved by the editor choosing a better source. Better sourcing is also why we emit a maintenance message for various other issues:
Category:CS1 maint: DOI inactive subcats
Category:CS1 maint: ignored DOI errors
Category:CS1 maint: ignored ISBN errors
Category:CS1 maint: ignored ISSN errors
There are others where a fix is not obvious:
Category:CS1 maint: others in cite AV media (notes)
Category:CS1 maint: untitled periodical
Trappist the monk (talk) 13:46, 21 April 2022 (UTC)Reply

India Today cite magazine

edit

Hi. I believe the India Today magazine URLs start with a /magazine/ slug like this one https://www.indiatoday.in/magazine/cover-story/story/20220425-inflation-crisis-of-prices-1937525-2022-04-15 and the normal news website articles doesn't https://www.indiatoday.in/sports/ipl-2022/story/lsg-vs-rcb-ipl-match-31-live-score-lucknow-bangalore-updates-virat-kohli-kl-rahul-1939385-2022-04-19DaxServer (t · m · c) 13:55, 19 April 2022 (UTC)Reply

India Today is a magazine (so says our article). How India Today choose to organize their online presence is neither here nor there; we are citing an article in a magazine be it India Today, National Geographic, Time, whatever. Taking your claim at face value, that a website's path dictates the name of the template that we should use, then cs1|2 requires a (non-existent) {{cite sports}} template so that we can properly cite the /sports/ article linked by your second example url... Nope.
Trappist the monk (talk) 14:24, 19 April 2022 (UTC)Reply
Hmm, ya okay — DaxServer (t · m · c) 14:27, 19 April 2022 (UTC)Reply
If these are well automated, wouldn't Monkbot be better suited? — DaxServer (t · m · c) 07:55, 20 April 2022 (UTC)Reply
In all of en.wikipedia there were about 1000 articles that cite India Today where the cs1|2 template(s) had bogus author parameters. If all of of the articles listed in Category:CS1 maint: numeric names: authors list were listed there because of India Today citations (at present 55,818 articles) then perhaps a Monkbot task would be warranted but that is not the case.
Trappist the monk (talk) 11:56, 20 April 2022 (UTC)Reply
Would you also be willing to make the corrections to The Times of India citations like this edit ? — DaxServer (t · m · c) 07:02, 23 April 2022 (UTC)Reply

Sources in foreign languages

edit

Hello, Monk!

There are a 220 categories for sources in different foreign languages. I was able to finally import and localize them all but I'm not sure in my localizations. I have a vague memory of having this discussion before together and you showed me a list to which I would have to check my translations upon to see if they were correct or no. Maybe I'm wrong. I'd be grateful for any kind of help you can provide in this aspect. - Klein Muçi (talk) 12:54, 27 April 2022 (UTC)Reply

I would have thought that the list you are looking for is at sq:Template:Citation Style documentation/language/doc but that page no longer works. Fix that and perhaps you will have your answer.
Trappist the monk (talk) 13:25, 27 April 2022 (UTC)Reply
Just did. Thank you! There are still some errors in that page. Care checking and telling me if I should fix them and if yes, how? - Klein Muçi (talk) 14:44, 27 April 2022 (UTC)Reply
Use the current version of:
Module:lang
Module:Lang/data
Module:Language/data/iana languages
Module:Language/data/iana scripts
Module:Language/data/iana regions
Module:Language/data/iana variants
Module:Language/data/iana suppressed scripts
Trappist the monk (talk) 15:03, 27 April 2022 (UTC)Reply
Thank you, I will. :) - Klein Muçi (talk) 15:28, 27 April 2022 (UTC)Reply

Follow up question: Can you tell me how many kinds of English-es are there and what are their respective codes? You obviously don't call them "foreign languages" here so I'm not sure where to find that kind of information. I believe English variations are all what's missing from the 220 entries list currently, no? - Klein Muçi (talk) 12:59, 27 April 2022 (UTC)Reply

According to the list at Template:Citation Style documentation/language/doc there are these MediaWiki-recognized English-language variants:
ang: Old English
en: English
enm: Middle English
en-au: Australian English
en-ca: Canadian English
en-gb: British English
en-us: American English
jam: Jamaican Creole English
simple: Simple English
Trappist the monk (talk) 13:25, 27 April 2022 (UTC)Reply
Thank you! Do all the entries in that list there contribute to a CS1 category on their own (beside the ones you just listed)? - Klein Muçi (talk) 14:29, 27 April 2022 (UTC)Reply
Languages with two-letter language tags add the article to the matching two-letter-language-tag category; languages with two-letter languages tags and recognized region tags, add the article to the matching category; all others are listed in Category:CS1 foreign language sources (ISO 639-2).
Trappist the monk (talk) 15:03, 27 April 2022 (UTC)Reply
I'm a bit confused. :/ Maybe if I ask the question in a simpler way... How can I know if I have no missing categories in SqWiki in regard to CS1 language categories? So far I've tried creating all there was here (in different CS1 language/script categories) + what you just gave me for English variants. Is that all? - Klein Muçi (talk) 15:33, 27 April 2022 (UTC)Reply
Category:CS1 foreign language sources has all of the categories that I know about. Those categories should match what you have in sq:Kategoria:Vetitë CS1: Burime në gjuhë të huaj.
Trappist the monk (talk) 15:54, 27 April 2022 (UTC)Reply
They do. Thank you! :) - Klein Muçi (talk) 15:57, 27 April 2022 (UTC)Reply

Newspapers

edit

If you don't like location, great, but you are now removing an identifier--just a page number isn't sufficient, thanks. Caro7200 (talk) 18:32, 3 May 2022 (UTC)Reply

You are obviously angry; sufficiently so that you neglected in your anger to point me to an edit that you believe that I made incorrectly. Please, calm down and write a complaint that has sufficient detail that I can answer it.
Trappist the monk (talk) 18:37, 3 May 2022 (UTC)Reply
Ha, what? Not angry at all, and please don't pretend to be confused. I'm just mentioning that you are removing an identifier from a citation. For example, The Very Crystal Speed Machine. Is it policy to remove the 1 from newspaper citations? Thanks. Caro7200 (talk) 18:42, 3 May 2022 (UTC)Reply
Of course I was confused. It is no different from your confusion when some stranger walks right up to you on the street, he pokes you in the chest with a stiff finger and he says, "You are wrong." And then he walks away. When someone does that, you're like "wtf?" Same with me. You came here, figuratively poked me in the chest, told me I was wrong, and walked away. That sort of short, incomplete posting is a hallmark of an angry poster. Remember, I can't see your face nor hear your voice and you left me no details about my alleged wrongdoing.
In the citation:
{{cite news |last1=Strauss |first1=Neil |title=ROCK REVIEW; Evidence of Mick Jagger's Influence |work=The New York Times |date=3 Sep 1994 |location=1 |page=15}}
Strauss, Neil (3 Sep 1994). "ROCK REVIEW; Evidence of Mick Jagger's Influence". The New York Times. 1. p. 15.{{cite news}}: CS1 maint: location (link)
|location=1 is meaningless. |location= is a parameter that holds the geographical location (city) of the publisher – generally not used in {{cite news}} except to disambiguate similarly named newspapers. Because that 1 is just that, a '1', without any sort of context and because '1' is not a geographical location, I deleted it. If I have to guess at the meaning of something some editor drops into a cs1|2 template parameter, readers will also have to guess and that is a disservice to them on our part. Better to remove anything that requires readers to guess the meaning.
You might rewrite that citation as:
{{cite news |last1=Strauss |first1=Neil |title=ROCK REVIEW; Evidence of Mick Jagger's Influence |newspaper=The New York Times |date=3 September 1994 |at=Section 1, p. 15 |url=https://www.nytimes.com/1994/09/03/arts/rock-review-evidence-of-mick-jagger-s-influence.html |url-access=subscription}}
Strauss, Neil (3 September 1994). "ROCK REVIEW; Evidence of Mick Jagger's Influence". The New York Times. Section 1, p. 15.
Alternately (this is usually better for 'named' sections – Arts, Sports, etc – but can work for numbered sections):
{{cite news |last1=Strauss |first1=Neil |title=ROCK REVIEW; Evidence of Mick Jagger's Influence |newspaper=The New York Times |date=3 September 1994 |department=Section 1 |page=15 |url=https://www.nytimes.com/1994/09/03/arts/rock-review-evidence-of-mick-jagger-s-influence.html |url-access=subscription}}
Strauss, Neil (3 September 1994). "ROCK REVIEW; Evidence of Mick Jagger's Influence". Section 1. The New York Times. p. 15.
Trappist the monk (talk) 19:34, 3 May 2022 (UTC)Reply
Thanks, so "department" would translate to "section"? I'm curious why the standard news citation template would include "location" instead "department" or "section", as most newspapers have their city in their title, or they end up being linked in the text--not that your talk page is the place to litigate it... Caro7200 (talk) 19:51, 3 May 2022 (UTC)Reply
{{cite news}} supports |location= for disambiguation. Consider The Times. There is the UK newspaper, the same title in South Africa, in Chicago, etc. To cite an article in one of the lesser-known newspapers, it is a good idea to say which one so:
{{cite news |title=Article Title |newspaper=The Times |location=Chicago}}
"Article Title". The Times. Chicago.
I don't know that most newspapers have their city in their title; many do, sure, but many do not.
If you wish to litigate any of this → Help talk:Citation Style 1.
Trappist the monk (talk) 21:17, 3 May 2022 (UTC)Reply

Citations from Canadian censuses

edit

I noticed this diff you made for a citation to a Canadian census. I am concerned that essential data has been removed. The place "Lisgar, Manitoba, Sub-district 14, Rural Township 4" is required information for anyone who wishes to search for the original census data in the archives. Why was it removed? Likewise, "publication-place=Library and Archives Canada" is essential for any research to know where to access the data. Why was it removed? Your response may affect hundreds of articles which I have edited, hence why I asked here, instead of at the Mary Dunn article. Thanks. Flibirigit (talk) 15:28, 12 May 2022 (UTC)Reply

I came to that article because this citation template has digits in the value assigned to |place= which causes Module:Citation/CS1 to put the article in Category:CS1 maint: location:
{{Citation|title=[[1911 Canadian Census]]|date=June 1, 1911|last=Mowbray|first=G. E.|place=Lisgar, Manitoba, Sub-district 14, Rural Township 4|publisher=[[Government of Canada]]|publication-place=[[Library and Archives Canada]]|page=24}}
Mowbray, G. E. (June 1, 1911), written at Lisgar, Manitoba, Sub-district 14, Rural Township 4, 1911 Canadian Census, Library and Archives Canada: Government of Canada, p. 24{{citation}}: CS1 maint: location (link)
|location=, |place= and |publication-place= are expected to hold geographical locations. In this example template, |place= and |publication-place= are misused; see Template:Citation § Publisher.
The geographical location of |publisher=[[Government of Canada]] is not at |publication-place=[[Library and Archives Canada]]. When |publication-place= has an assigned value, |location= or |place= gets the news-story's dateline. |title=[[1911 Canadian Census]] is not a news story so |place= should not be used.
Perhaps switch to using the online 1911 census: https://www.bac-lac.gc.ca/eng/census/1911/Pages/1911.aspx
You should expect that support for |place= or |location= with |publication-place= will be withdrawn because datelines are not critical to locating a news source. These three parameters will become simple aliases of each other with |location= as the canonical name.
Trappist the monk (talk) 16:16, 12 May 2022 (UTC)Reply
Thank you for the reply, but it is too technical for me to understand. It is possible to get a very simplified solution as to the including the information? Flibirigit (talk) 16:32, 12 May 2022 (UTC)Reply
I don't know how to make it any simpler than to perhaps suggest a more-or-less filled-in template:
{{citation |last=Mowbray |first=G. E. |date=June 1, 1911 |url= |title=1911 Canadian Census: Lisgar, Manitoba |website=[[Library and Archives Canada]]}}
If you can find the correct information at https://www.bac-lac.gc.ca/eng/census/1911/Pages/1911.aspx, you can fill in the |url= parameter with the url of the census facsimile.
Trappist the monk (talk) 17:18, 12 May 2022 (UTC)Reply
The above suggestion was more helpful. However, it will take a long time to convert hundreds of citations into the above format. Censuses since 1921 should probably include |publisher=Dominion Bureau of Statistics. Any thoughts? Flibirigit (talk) 22:01, 12 May 2022 (UTC)Reply
This is wikipedia, there is no hurry; its going to take me some amount of time to work my way through all of the articles in Category:CS1 maint: location ... I don't think that I have much of an opinion regarding |publisher=[[Dominion Bureau of Statistics]]. Will its inclusion help readers locate a copy of the source? If yes, include it; if maybe, then maybe include it; if not, don't include it.
Trappist the monk (talk) 00:43, 13 May 2022 (UTC)Reply
What is the correct to handle place names which have digits? For example, Category:Rural municipalities in Saskatchewan has digits in every name. Flibirigit (talk) 16:44, 12 May 2022 (UTC)Reply
There are millions of cs1|2 templates and likely millions of those have at least one or more of |location= or |place= and/or |publication-place=. Of all of those cs1|2 templates, there a 6,029 articles listed in Category:CS1 maint: location. I suspect that it is very unlikely that something like |location=Edenburg, Aberdeen No. 373, Saskatchewan‎ would ever legitimately appear in a valid cs1|2 template. Instead, something like |location=Edenburg, Saskatchewan‎ or |location=Edenburg, SK would be used.
Trappist the monk (talk) 17:18, 12 May 2022 (UTC)Reply

Hello & Thank you

edit

Hi there! I am not sure if this is how I start a "talk" or discussion with your user, but I just wanted to thank you for fixing this citation problem on the page I am currently editing (Islamic Uprising in Syria). I am working on it as part of my University Research work and my deadline is very close so I am not 100% diligent or fast with it, so thank you very much! — Preceding unsigned comment added by KAD2223 (talkcontribs) 16:26, 26 May 2022 (UTC)Reply

Citing style

edit

Hello! Can you help me locate a help page that depicts the styling conventions used for inline citations? Matters such as how to act when there are commas or periods close to the text that is being referenced, where exactly to put the ref tag, etc. I remember I've read such rules before somewhere but can't be sure where. - Klein Muçi (talk) 15:45, 29 May 2022 (UTC)Reply

WP:CITE?
Trappist the monk (talk) 15:48, 29 May 2022 (UTC)Reply
Unfortunately, no. :/ Klein Muçi (talk) 15:58, 29 May 2022 (UTC)Reply
Then what is it that you are actually looking for?
Trappist the monk (talk) 16:00, 29 May 2022 (UTC)Reply
A body of work that explains to me how to use inline citations in cases such as this:
The awards Klein has include the Wikipedian of the Year (2012), Best Wikimedian (2022).
Is it: The awards Klein has include the Wikipedian of the Year (2012)[1], Best Wikimedian (2022)[2].
Or: The awards Klein has include the Wikipedian of the Year (2012),[1] Best Wikimedian (2022).[2]

References

  1. ^ a b Secure reference
  2. ^ a b Secure reference
Or a different style. - Klein Muçi (talk) 16:06, 29 May 2022 (UTC)Reply
WP:CITEFOOT (part of WP:CITE) has this:

As in the above example, citation markers are normally placed after adjacent punctuation such as periods (full stops) and commas. For exceptions, see the WP:Manual of Style § Punctuation and footnotes. Note also that no space is added before the citation marker. Citations should not be placed within, or on the same line as, section headings.

Trappist the monk (talk) 16:17, 29 May 2022 (UTC)Reply
Thank you! I missed it, sorry. That was exactly what I was looking for. But I'm curious for one small detail. According to that, I should put my 2nd reference after the period in my example. But the 2nd reference is only supporting the 2nd part of the sentence, not the whole sentence. Is it still cool to put it after the full stop? I believe for graphical reasons that's how we should act, no? If I understood that correctly. - Klein Muçi (talk) 16:23, 29 May 2022 (UTC)Reply
I think so. If you think that the sentence as it is currently written is unclear, rewrite it; perhaps as a list:
Klein has been named:
  • Wikipedian of the Year (2012)[1]
  • Best Wikimedian (2022)[2]

References

  1. ^ Cite error: The named reference secure 1 was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference secure 2 was invoked but never defined (see the help page).
or use userboxen instead (if none fit, make your own {{User box}}).
Trappist the monk (talk) 16:39, 29 May 2022 (UTC)Reply
I see. The sentence was fictitious, I needed the help in regard to an article that I'm working with so user boxes wouldn't help much but thank you for the detailed answer. :)) - Klein Muçi (talk) 17:34, 29 May 2022 (UTC)Reply

Regex oddity

edit

Take a look at this edit and the edits that have come recently before it.

Take a look at this regex line:

(r"(\{\{\s*cit[aeio][^\}]*\|\s*gjuh[aeë]\s*=\s*)", r"\1language=")

Is there something in it that may have caused such a behavior? I noticed it completely randomly. The line appears to work as intended on Regex101 so I'm not sure if it the one guilty for that edit or not. I fixed it manually but I got curios and thought I could benefit from your experience. - Klein Muçi (talk) 01:46, 3 June 2022 (UTC)Reply

If 'Gjuha' is the Albanian word for 'language', why does the replacement insert the English 'language=' after the \1 capture? What are you really trying to do with this regex? Are you attempting to normalize the spelling of gjuha/gjuhe/gjuhë? If so then, perhaps something like this:
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)gjuh[aeë](\s*=\s*)", r"\1Gjuha\2")
Trappist the monk (talk) 03:15, 3 June 2022 (UTC)Reply
No, it's simpler. I'm just trying to switch the Albanian version with the English one. Currently CS1 doesn't understand Albanian parameters. So |gjuha/e/ë= → |language=. That's it. Have I written the regex wrong? It appeared to be correct in Regex101. :/ - Klein Muçi (talk) 10:53, 3 June 2022 (UTC)Reply
When I try your regex on the citation from this version of sq:Yukon in regex101, I get the same result as smallem got with this edit: |Gjuha = language=en so, yeah, you have written the regex wrong. Try this:
(r"(\{\{\s*cit[aeio][^\}]*\|\s*)gjuh[aeë](\s*=\s*)", r"\1language\2")
Trappist the monk (talk) 11:47, 3 June 2022 (UTC)Reply
Okay, thank you! How can I query on-wiki articles containing language=language= so I also fix the other similar errors Smallem might have caused in its many months of unattended work? - Klein Muçi (talk) 12:05, 3 June 2022 (UTC)Reply
https://sq.wikipedia.org/w/index.php?search=insource%3A%2F%5C%7C+%2A%5BGg%5Djuh%5Bae%C3%AB%5D+%2A%3D+%2Alanguage%2F&ns0=1
Trappist the monk (talk) 12:17, 3 June 2022 (UTC)Reply
Insource! That's what I always keep forgetting. Thank you! Really helpful. :) - Klein Muçi (talk) 12:22, 3 June 2022 (UTC)Reply
One last question out of curiosity: Shouldn't cases like what I described above generate CS1 errors somehow? Or are they really edge cases that we shouldn't worry about? - Klein Muçi (talk) 12:26, 3 June 2022 (UTC)Reply
That particular template does produce a bunch of error messages; it does here:
"Gross domestic product, expenditure-based, by province and territory". Statistics Canada. Archived from the original on 20 prill 2008. Retrieved 3 nëntor 2012. {{cite web}}: Check date values in: |access-date= and |archive-date= (help); More than one of |accessdate= and |access-date= specified (help); More than one of |archivedate= and |archive-date= specified (help); More than one of |archiveurl= and |archive-url= specified (help); Unknown parameter |Gjuha= ignored (help); Unknown parameter |accesso= ignored (|access-date= suggested) (help)
But, because the sq:Template:Infobox settlement doesn't support |produkti_brendshëm_bruto=, anything assigned to that bogus parameter is not displayed.
Trappist the monk (talk) 13:25, 3 June 2022 (UTC)Reply
I see. Thank you! :) - Klein Muçi (talk) 18:02, 3 June 2022 (UTC)Reply

Nomination for deletion of Template:Cite DMM

edit

 Template:Cite DMM has been nominated for deletion. You are invited to comment on the discussion at the entry on the Templates for discussion page. Beeswaxcandle (talk) 00:34, 4 June 2022 (UTC)Reply

Barisal

edit

Hi i noticed that you undid my revision in barisal page i would like to say barisal does not have its own dialect — Preceding unsigned comment added by 99.237.17.126 (talk) 18:09, 12 June 2022 (UTC)Reply

Yeah, I reverted you but it wasn't because you deleted the the Barisali dialect bullet point but rather it was that plus a totally malformed floating (unattached) reference:
</ref>{{cite web|url=https://www.britannica.com/place/Barisal|archive-url=https://www.britannica.com/place/Bangladesh|url-status=alive|archive-date=2014-11-13|title=Bangladesh Bureau of Statistics Region Census 2011 page 30|publisher=Bangladesh Bureau of Statistics|access-date=2022-06-12}}</ref>
</ref>"Bangladesh Bureau of Statistics Region Census 2011 page 30". Bangladesh Bureau of Statistics. Archived from the original on 2014-11-13. Retrieved 2022-06-12. {{cite web}}: Invalid |url-status=alive (help)</ref>
In that reference https://www.britannica.com/place/Bangladesh is not an archive snapshot of https://www.britannica.com/place/Barisal; alive is not a value supported by |url-status=; because |archive-url= does not hold the url of a legitimate archive snapshot, |archive-date=2014-11-13 is completely bogus; the title of the Britanica article is "Barisal", not "Bangladesh Bureau of Statistics Region Census 2011 page 30"; Bangladesh Bureau of Statistics is not the publisher of Britannica; References are properly wrapped with <ref>...</ref> tags not </ref>...</ref> tags.
Together, these changes without an edit summary to explain them, look a lot like vandalism.
Some of the above you have fixed:
<ref name="Barishal District - barisal.gov.bd">{{cite web|url=http://www.barisal.gov.bd/en|archive-url=http://www.barisal.gov.bd/en|url-status=dead|archive-date=2014-11-13|title= Barishal District|publisher=Bangladesh National Portal |access-date=2022-06-12}}</ref>
[1]

References

  1. ^ "Barishal District". Bangladesh National Portal. Retrieved 2022-06-12. {{cite web}}: Check |archive-url= value (help)CS1 maint: url-status (link)
The reference is still 'unattached'; |archive-url= cannot hold the same value as |url= – a url cannot be an archive snapshot of itself; http://www.barisal.gov.bd/en is live so |url-status=dead is incorrect; |archive-date=2014-11-13 is still bogus. I looked at the source: with the exception of a language selector drop-down box in the upper right corner, there is no mention of languages (Bengali or English) or dialects (any) nor any statement about who speaks whatever languages are used in Barisal or Barishal. I presume that you want to use this source to support the three (not four) remaining bullet points in Barisal § Languages. If that is the case, you might want to find a better source because this source appears to be inadequate.
Trappist the monk (talk) 19:12, 12 June 2022 (UTC)Reply

Parameter misuse vs missing-title errors

edit

In Special:Diff/1093331531 on Neil Gaiman you removed the titles from several twitter-linked references as "parameter misuse". However, that caused citation errors: "{{cite web}}: Missing or empty |title= (help)". Perhaps you could come up with replacement titles instead of just breaking the citations? —David Eppstein (talk) 23:25, 15 June 2022 (UTC)Reply

Those two cites were added 12 March 2022 at this edit. As written in that original edit, that caused citation errors: External link in |title=; (which see).
Clearly no one (including you) cared enough about the article to fix those errors (they are visible to all) but, interestingly, the three other cs1|2 errors present in the article at the time of the 12 March 2022 edit have been fixed; perhaps changing the error message will provoke someone to fix these missing title errors – I'm not going to hold my breath for that to happen, but you never know.
Trappist the monk (talk) 01:17, 16 June 2022 (UTC)Reply

Greetings

edit

Just wanted to say hello wishing you'll have a good time in summer (assuming it is summer soon where you live). Thank you for all the times you've helped around! :) - Klein Muçi (talk) 18:19, 20 June 2022 (UTC)Reply

Yeah, Trappist is amazing. Thanks to you too @Klein Muçi. You're amazing at what you do. Keep it up Rlink2 (talk) 03:51, 21 June 2022 (UTC)Reply
@Rlink2, thanks a lot for your kind words! I'm also really grateful for the help you've decided to give to my home-community specifically. Thank you! :) - Klein Muçi (talk) 12:24, 21 June 2022 (UTC)Reply

Regex and dates

edit

Hello! Can you help me understand why the my-my regex is failing in this edit?

(r"(\{\{\s*cit[aeio][^\}]*\|\s*(?:access\-?|archive\-?|doi\-broken\-|lay\-|pmc\-embargo\-|publication\-|air\-?)?date\s*=\s*)October +(\d{4}) +[\-–] +April +(\d{4})", r"\1 tetor \2 – prill \3"),

This is the corresponding regex if I'm not wrong.

PS: Search for date=October 1836 - April 1837 - Klein Muçi (talk) 10:42, 24 June 2022 (UTC)Reply

The regex appears to work correctly. I suspect that order-of-operation may be the problem. In the same edit, smallem fixed |date=April 1826|date=prill 1826. If smallem applies the my regex before it applies the my-my regex, my probably changed |date=October 1836 - April 1837 to |date=tetor 1836 - April 1837. If it did that, the my-my regex will not work. Order matters: regexes must be organized most-complex-to-least-complex.
Trappist the monk (talk) 11:49, 24 June 2022 (UTC)Reply
If I'm not wrong, I've literally done the total opposite of that starting from only d related regexes and progressing to dmy ones and special cases. This was the most intuitive way to create the list. Can I send you a Pastebin link with the full date-related regexes so you can tell me the correct order I should be arranging them? - Klein Muçi (talk) 11:58, 24 June 2022 (UTC)Reply
Yeah.
Trappist the monk (talk) 12:03, 24 June 2022 (UTC)Reply
Here it is.
Some navigation tips:
First we have year parameter conversions then the actual translations and in the end the format problems. The translation regexes are divided into Gjatë and Shkurt sections which are Albanian for Long and Short. Also dmy becomes dmv in Albanian. - Klein Muçi (talk) 12:13, 24 June 2022 (UTC)Reply
Try this order:
  • dmv-dmv
  • mdv-mdv
  • dm-dmv
  • md-mdv
  • md-dv
  • mv-mv
  • m-mv
  • d-dmv
  • dmv
  • mdv
  • mv
  • Sv-v
  • Sv4-v2
  • vmd
Trappist the monk (talk) 12:56, 24 June 2022 (UTC)Reply
Thank you! Just to be extra sure, we're talking about changing only the translations no? - Klein Muçi (talk) 14:35, 24 June 2022 (UTC)Reply
Yeah; I don't think that it matters for the regullim i formatit të datave regexes.
Trappist the monk (talk) 14:46, 24 June 2022 (UTC)Reply
Okay, thank you! :) - Klein Muçi (talk) 14:51, 24 June 2022 (UTC)Reply
I can't seem to find vmd. :/
I made these changes. Are they correct? - Klein Muçi (talk) 15:37, 24 June 2022 (UTC)Reply
Kthim i parametrave të viteve në parametra datash. Those should have been sorted also.
Trappist the monk (talk) 15:54, 24 June 2022 (UTC)Reply
Cool? - Klein Muçi (talk) 17:23, 24 June 2022 (UTC)Reply
Could be. Only way to know is to test it...
Trappist the monk (talk) 17:27, 24 June 2022 (UTC)Reply
I'm reading that as Only time will tell... then. If Smallem makes anymore errors, they will get caught in the CS1 category for date problems and another cycle of today's events will happen.
Thank you! :) - Klein Muçi (talk) 17:52, 24 June 2022 (UTC)Reply

What's wrong in here? (Ref 25) - Klein Muçi (talk) 12:12, 25 June 2022 (UTC)Reply

Bug at line 577. Fixed in the sandbox.
Trappist the monk (talk) 13:37, 25 June 2022 (UTC)Reply
Appreciated! :) - Klein Muçi (talk) 18:07, 25 June 2022 (UTC)Reply