User talk:Trappist the monk/Archive 11

Latest comment: 4 years ago by ToBeFree in topic Andrewl1995


Citations in Wikiquote

edit

Hey, Trappist! :)

I wanted to ask you something. Check this page at SqQuote. It's about the HP-1 book. If you see its citations, you will see that all the citations are almost the same, since they are all quotes from the same book. The only thing that changes is the page number. We don't have many articles regarding books but all of them follow the same trend. A trend I imagine will repeat in every article related to a certain work of art, for example, a book, song, movie, etc. Now I have a two part question:

  1. Is there a way to make all the additions "automatic" in these cases, similar to the method of naming a reference and then reproducing it by just calling its name? In this case would be that + specifying the changing parameter/s (in this case, pages).
  2. Is there a way to show all these citations in an aesthetically pleasing way to the eye in cases like this? Can there be? Should there be?

Of course, we could think of some workarounds using project rules, specifying that in cases like this, users should put only 1 reference in total in its general form or something similar. But I'd like it if we could have an elegant technical way of handling these situations because it would relieve the strain from the general users that already have to learn and remember a lot regarding articles' structures changing from the ones at Wikipedia.

Besides, maybe that could be useful even on Wikipedia, when we are citing information from the same book, video/movie, newspaper, etc. changing only 1 or 2 parameters each time. - Klein Muçi (talk) 14:24, 8 April 2020 (UTC)Reply

See {{harv}} and {{sfn}} families of templates. For your example you might use:
{{harvnb|Rowling|1997|p=11}}Rowling 1997, p. 11
{{harvnb|Rowling|1997|p=23}}Rowling 1997, p. 23
{{harvnb|Rowling|1997|p=27}}Rowling 1997, p. 27
{{harvnb|Rowling|1997|p=38}}Rowling 1997, p. 38
{{harvnb|Rowling|1997|p=53}}Rowling 1997, p. 53
(harv family members are usually placed inside <ref>...</ref> tags; sfn-family templates provide the <ref>...</ref> tags for you; {{harvnb}} used here outside of <ref>...</ref> tags so you can see what is going on)
For the example short-cites, you need only the one full citation which does not have any page numbers and requires |ref=harv:
{{cite book|title=Harry Potter dhe Guri Filozofal|date=1997|first=J. K.|last=Rowling|series=Harry Potter|publisher=Shtëpia Botuese DITURIA|translator-first=Amik|translator-last=Kasoruho|editor-first=Mariana|editor-last=Ymeri|location=Tiranë|language=sq|isbn=99927-47-63-3|ref=harv}}
Rowling, J. K. (1997). Ymeri, Mariana (ed.). Harry Potter dhe Guri Filozofal. Harry Potter (in Albanian). Translated by Kasoruho, Amik. Tiranë: Shtëpia Botuese DITURIA. ISBN 99927-47-63-3.
There is another, {{harvc}}, which is intended to cite individual contributions in an edited work. Does not apply to the case at hand and sq.quote may never need or want it though could be useful at sq.wiki.
Alas, these templates can confuse editors. I have just enhanced the underlying Module:Footnotes to do some error detection which discovered a lot of errors in the templates' use. See Category:Harv and Sfn template errors and the discussions beginning at Module talk:Footnotes § broken harv link reporting. Starting afresh, you won't have these problems.
Trappist the monk (talk) 15:01, 8 April 2020 (UTC)Reply
Thank you for your quick answer! I have yet to check the following templates in details, to see how they work but I was wondering something (please forgive my impatience if what I'll ask could be resolved by checking the information you already gave to me). Is another module (beside CS1) needed to use the harv templates? I'm asking for SqQuote. There we don't use the footnotes section much (if at all) so maybe we could use only harv templates and I was wondering how much work would I need to do to make it work. I know by now I'll have to import (and maybe localize) some new templates and I wanted to know if that would be enough or I would need to also import and localize a module that is dependable on another module that is dependable on... On SqQuote we (well, I :P ) have to built everything from scratch and often importing just one single template makes you import and localize 3 modules with many subpages and some accompanying system messages. :P
Also, I'm glad my first half of the question was solved. How about the other half about citations' rendering? If I'm correct (again, I haven't studied in details what you gave me), the citations still appear the same at the end. Is there a way to make them grouped or something... I'm not really sure what exactly but just to not make it appear like a glitch has happened (because of all the repetitions), to "declutter" the section a bit? - Klein Muçi (talk) 16:01, 8 April 2020 (UTC)Reply
I just found out that sfn templates don't really work out how I thought they did. Definitely will need to learn more about all the templates you suggested. I'm a bit sleep deprived today so that falls for later. I'd ask for a practical example at SqQuote (at that article I brought) so I could model after that but I know that's impossible since templates and modules are missing there so I'll have to go on later with the example you brought me here. - Klein Muçi (talk) 17:37, 8 April 2020 (UTC)Reply
(edit conflict)
Yes. Three modules that implement a dozen or so short-cite templates (you don't have to import the whole lot; maybe {{harv}}, {{harvnb}}, {{sfn}} and {{sfnp}} to start). There would be relatively little localization required; the template (via Module:Footnotes) emit 'p.' and 'pp.' for page and pages and two error messages so I don't think that localizing the module output will be an onerous task. The difficulty will be in localizing the help text that accompanies the error messages. Or maybe not. The error messages are hidden by default (there was a pitch-forks-and-torches uprising). Since initially, you can expect few errors, you might defer localization of help text for a while. The second of the three modules is the error detector; it has no output and the third is a list of wrapper templates that the error detector should skip. That one can be stripped to its bare bones for sq.quote. Alternately, you can import this version of the module; it doesn't do error checking and all that you would need to do to localize is the 'p.' and 'pp.' for page and pages.
You do use footnotes sections. §§Referime, Shiko edhe, and Lidhje të jashtme are footnote sections. Module:Footnotes is perhaps poorly named but that choice was made long before I started futzing with it.
I was trying to avoid the aesthetically pleasing question; eye of the beholder, etc. Your eye is as good or better than mine for that. Here are a bunch of {{sfn}} templates with page numbers taken from your example page.
[1][2][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][19][26][27][28][29][30][31][32][33]
Those would end up in §Referime looking something like this followed by a bibliography subsection with the source cited ({{reflist|20em}}):

References

  1. ^ Rowling 1997, p. 11
  2. ^ a b Rowling 1997, p. 23.
  3. ^ Rowling 1997, p. 27.
  4. ^ Rowling 1997, p. 38.
  5. ^ Rowling 1997, p. 53.
  6. ^ Rowling 1997, p. 43.
  7. ^ Rowling 1997, p. 46.
  8. ^ Rowling 1997, p. 65.
  9. ^ Rowling 1997, p. 31.
  10. ^ Rowling 1997, p. 34.
  11. ^ Rowling 1997, p. 93.
  12. ^ Rowling 1997, p. 103.
  13. ^ Rowling 1997, p. 116.
  14. ^ Rowling 1997, p. 223.
  15. ^ Rowling 1997, p. 255.
  16. ^ Rowling 1997, p. 136.
  17. ^ Rowling 1997, p. 74.
  18. ^ Rowling 1997, p. 109.
  19. ^ a b Rowling 1997, p. 104.
  20. ^ Rowling 1997, p. 246.
  21. ^ Rowling 1997, p. 247.
  22. ^ Rowling 1997, p. 251.
  23. ^ Rowling 1997, p. 252.
  24. ^ Rowling 1997, p. 131.
  25. ^ Rowling 1997, p. 144.
  26. ^ Rowling 1997, p. 155.
  27. ^ Rowling 1997, p. 108.
  28. ^ Rowling 1997, p. 7.
  29. ^ Rowling 1997, pp. 149–150.
  30. ^ Rowling 1997, p. 129.
  31. ^ Rowling 1997, pp. 154–155.
  32. ^ Rowling 1997, p. 179.
  33. ^ Rowling 1997, p. 230.
Bibliography
  • Rowling, J. K. (1997). Ymeri, Mariana (ed.). Harry Potter dhe Guri Filozofal. Harry Potter (in Albanian). Translated by Kasoruho, Amik. Tiranë: Shtëpia Botuese DITURIA. ISBN 99927-47-63-3. {{cite book}}: Invalid |ref=harv (help)
In the writing of this reply, I discovered that when you imported Template:Reflist, you missed |template:Column-width so the {{reflist|20em}} used above does not work at sq.quote.
Trappist the monk (talk) 18:02, 8 April 2020 (UTC)Reply
Good morning with a fresh new start! :P Now I read and saw carefully what you had written yesterday. I'll start importing the modules. "No globals" first, then "Footnotes". I'll give them a quick look to see what localization might be needed and then I'll go on with the templates. Can you list to me all the harv/sfn templates that exist, so I know what to get, if not all? You always talk about "a family" but I wasn't able to find the whole lot listed anywhere. I was expecting to see a category of templates specific for them where they would all be but...
I must disclose that I wasn't aware of these kind of modules and templates before, so I'm being "bombarded" with a lot of new information here and what's why it is hard for me to follow through this time. Please, bear with me and keep correcting my wrong guesses.
As for the footnotes, what I meant were the sections like "Bibliography" or "Further reading". Basically everything that comes after "References". But I see what you meant with that word now so... Anyway, it wasn't a good thing to begin with that we don't use those kind of sections. But the point is that at the situations that we are, those seem like too luxurious details for us. Even for SqWiki, given that we're still trying to "educate the masses" about the "Reference" section. This is part of the reason why I haven't imported that template at SqQuote. I just imported the essentials because the situation there is worse than SqWiki. Another reason is because of the "web of templates" that does exist in EnWiki. I know you have practical reasons for that, since the templates/modules have evolved over time and intertwined but I haven't studied much the relationships that exist between those intertwines to know the specific reasons for the ones I've come to need. There are cases where a template would be too unnecessary for us. For example (a very simple one), when translating the help page for the CS1 errors, I noticed you used templates just to turn some text in red color. For us at SqQuote that kind of template would be unnecessary, at least at this point, and I had to go and see the code behind that template so I could use it "manually" just for that time without importing it. When importing at SqQuote, I usually don't want to break this web and choose to get all of the intertwined items (for example, get all the coloring text templates that exist here, because, if I didn't, one user would come and say "but i changed the word from 'red' to 'gray', why doesn't the template work??" and then he would go and butcher the code by changing the template itself). That's because SqWiki hasn't done this and now suffers from too much chaos. Templates that don't work like they should because of another template is missing, code and titles that are half in English, half in Albanian (and millions of missing documentation pages) that make searching and editing them really hard, countless of duplicates by different users that have tried to "make the template look just like in English", red categories in English galore that they want to "disappear because their article looks bad"... You understand the situation. And that's why, if I'm not able to get the lot of something, I just import the essentials or leave them for another time when I can study and get everything needed. I made all this rant hoping to describe my (our) situation there as an admin.
Finally, as for the aesthetic part... The missing template does indeed make a change. But I was talking about some sort of collapsible element that groups these kind of "repeating" references together and can be hidden and shown by pressing a button. Just as an idea because I wasn't sure if that would be a good idea for wikis to have in general of even just for WikiQuotes. You have more experience on what idea is usually good in practical terms in these cases, so I'll get your word on it. As I said, maybe the missing template is everything that was needed. (Although I've been reluctant to get a template just to split the references in columns.)
I was hoping that all these could be handled by the CS1 module so I wouldn't need to do more importations because of the reasons explained just above but looks like fate isn't on my side so I'm getting to work now with the new modules and I'll come for help regarding the templates and their use later. - Klein Muçi (talk) 06:58, 9 April 2020 (UTC)Reply
So, baby steps: I did import 2 modules. No globals and Footnotes. What localization do they need? I'm guessing I need to translate the 2 errors (the red part) at No globals, no? What do I need to change at Footnotes? Then we'll talk about the templates. - Klein Muçi (talk) 07:50, 9 April 2020 (UTC)Reply
PS: Please ping me when you answer. I'm having a lot of discussions on different projects these days and I'm having it hard to keep track of them. - Klein Muçi (talk) 07:58, 9 April 2020 (UTC)Reply
I also went ahead and imported the anchor id list and the whitelist subpages for the Footnotes module. I'm guessing they will be needed although I'm still working blindly here. - Klein Muçi (talk) 12:49, 9 April 2020 (UTC)Reply
@Klein Muçi: Were I you, I would have imported this version of the module; it doesn't do error checking and all that you would need to do to localize it is the 'p.' and 'pp.' for page and pages. I had forgotten about sq:q:Module:No globals, localize only the two error messages there. And I forgot about the doc pages associated with the {{harv}} and {{sfn}} families. That documentation is awful.
The full list, I think, of the {{harv}} and {{sfn}} families of templates is:
The collapse-box idea has problems. Browsers won't jump to something that is hidden in a collapsed box so that is detrimental to reader experience. One thing that you might do is this:
''Harri, ti je një magjistar.''{{harv|Rowling|1997|p=46}}
Harri, ti je një magjistar.(Rowling 1997, p. 46)
Here, this is referred to as parenthetical referencing. Some people like it, some don't. No collected list of short-cites at the bottom of the page. At the bottom of the page, make a simple un-ordered (*markup) list of the full-cite sources so that the short-cites have something to link to. For your HP1 article, that is the Rowling 1997 {{cite book}} as I wrote it above.
Trappist the monk (talk) 13:48, 9 April 2020 (UTC)Reply
Because you have chosen to use the current version of Module:Footnotes and its attendant sub modules, changes will be necessary at sq:q:Module:Citation/CS1. Your current version of cs1 requires |ref=harv so that it will create an anchor ID for the harv and sfn templates to link to. The upcoming version of cs1|2 at en.wiki will remove that requirement – all cs1|2 templates will have an anchor ID. You can patch your :sq:q:Module:Citation/CS1 by inserting this between lines 2501 and 2502:
	if not is_set (Ref) then													-- sq.quote patch so that all cs1|2 template create anchor ID;
		Ref = 'harv';															-- this in support of new [[ModuleFootnotes]] suite which expects all cs1|2 templates to have anchor ID
	end
Trappist the monk (talk) 15:24, 9 April 2020 (UTC)Reply

I also got the missing template now.

I did get the "full" version of the module so I could have it updated easily in the future. Citations are the only thing that we have fully updated. I'm not sure if I understood you correctly regarding the change at CS1 module. I'm planning to update all its subpages after I finish dealing with this. If your planning to change it soon, maybe it would be good to wait until you do that so I could go on with the planning I already have for it.

Can you give me a rendered example how do those 2 error warnings appear and where/when so I know better how to translate them?

As for the collapsible elements, I hadn't thought of that. True then. Actually, I don't like the references inside the text much. :/ I'll go for the classical version.

After dealing with those 2 errors, I'll start working with Module:Footnotes. - Klein Muçi (talk) 17:00, 9 April 2020 (UTC)Reply

@Klein Muçi: For sq:q:Module:No globals, you can only translate the static portions of the error messages. The dynamic portions are taken from the module code where the error occurred so cannot be translated. The translatable portions of the error messages are:
Tried to read nil global
Tried to write global
For sq:q:Module:Footnotes the error messages look something like this:
<template name> error: no target: <anchor ID>
<template name> error: multiple targets (n×): <anchor ID>
where:
<template name> is provided to the module by the invoking template and is the en.wiki short-form of the template name (for example, errors relating to {{Harvard citation no brackets}} use the redirect name {{harvnb}} in the error message)
<anchor ID> is the anchor ID that the short-cite template creates and that should be matched by a full-cite's anchor ID
So, the parts to translate are:
error: no target (Module:Footnotes line 102)
error: multiple targets (Module:Footnotes line 105)
These error messages are not displayed (that pitch-forks-and-torches uprising I mentioned). You may want them to be displayed (I would recommend that) so that editors see that the link that they think they created with a short-cite template actually works. I can help you do that. (caveat lector: the error detection is imperfect).
The 'p.' and 'pp.' page number prefixes are at Module:Footnotes lines 30 & 31.
I've just realized that the editor who reverted display of these error messages (pitch-forks-and-torches uprising again) broke the template name part of the error message so I'll fix that and update your copy.
I'm hoping to update cs1|2 from its sandboxen on the 18–19 April 2020 weekend. That's the plan anyway.
Trappist the monk (talk) 17:47, 9 April 2020 (UTC)Reply
Okay then. I'll try to translate the error messages and maybe somehow show them to you because I'm not sure of the real meaning of the error messages (although I'll try to read about the concept of global arguments).
Only the p/pp is the part to be localized? I think I saw a category in the module. I'm guessing that should be localized too. Anything else I might have missed like this?
Can you also edit the module to show the error messages? Actually the same upraise does happen at us every time new error messages are incorporated but I've been able to suppress it, if we are to follow that kind of language, and now at us it manifests itself as an objective to solve all the errors, which is a good thing. So we choose to have as much of errors shown as part of the education campaign we're having on the citations' subject. - Klein Muçi (talk) 19:31, 9 April 2020 (UTC)Reply
@Klein Muçi: For No globals, I wouldn't worry too much about precision or learning anything about it. It is a tool that notifies coders that they are using something that has global scope – the thing is visible at all levels of the code. Globally visible things can be changed from anywhere within the code. There are occasions when such is desirable, but those occasions are rare. Were I you, I'd make a simple translation and retain the original English perhaps like this (google translations so probably wrong ...):
'U përpoq të lexonte zero global [Tried to read nil global ]'
'U përpoq të shkruante global [Tried to write global ]'
Leaving the original English will let you tell someone at en.wiki what you are seeing; anyone familiar with Lua here should be able to find and resolve the problem.
I believe in short, terse error messages and sufficiently detailed help text available through the error-message's help link. Once editors learn what the error message means, long verbose error messages don't contribute any value.
Yep, category too. Clearly thinking about localization is not something I do much about so I tend not to think about these sorts of issues. Module:Footnotes line 108.
Error message display enabled.
Trappist the monk (talk) 20:07, 9 April 2020 (UTC)Reply
So, update: I did translate the 2 messages at No globals. Very close to the original so I'm not re-translating them back to English here. I also translated and created the category for Footnotes. I noticed that the category served simultaneously as a help page. I'd like to keep the help page separated so I linked to another page (yet to be created) in the module where help is made to be shown beside the error. I don't know if I should also translate the word "error" in line 113. Or words like FOOTNOTES or et al that appear throughout the code in red. There are a lot of words like that. For examples, see lines 409 and 255. And a lot more than that.
I'm having troubles translating the no/multiple target/s part. The "target" concept is hard to translate in Albanian so I'll have to adapt something for it. Is there a way I could see those errors at work here in EnWiki so I know what words to use that can encompass all the possibilities that those can be used for? If no, I'll translate them after importing the templates and "importing" some of your articles in our sandbox to see how the errors are shown.
I'm yet to see the history of the module's or its accompanying templates' pages but are they relatively new? The fact that the documentation is not that perfectly styled (templates and the help page being inside a category) and that the module itself has a lot of false positives... Even the fact that there isn't a good layout for the module's subpages in its documentation - I had a bit of trouble making sure that I'd got all its subpages since they weren't shown at the main page, like in CS1 module. All this makes me think it's not that worked upon. More than for curiosity reasons, I wanted to know if there is hope in the future to fix the false positives. While being true that we would like the errors showing for reasons specified above, if the plan for the module is to always have these false positives, maybe that idea would need some rethinking.
I haven't seen the whitelist and anchor id list yet. I'll give them a look soon and tell you here if there is any need for help. I'm guessing not a lot (if any) of localization will be needed there though. After that, I'll go on importing the templates.
PS: Now that I mentioned it, why doesn't the main page of module CS1 also link to its other 2 subpages, Arguments and autofix? Always wondered that. - Klein Muçi (talk) 08:30, 10 April 2020 (UTC)Reply
@Klein Muçi: If Albanian doesn't use the abbreviations for the Latin et alia, then yes, you should translate 'et al'. Do not translate 'FOOTNOTES'. Yes, translate ' error: ' in lines 111 & 113 (do not translate 'error' in the <span> tag). In sq:q:Module:Citation/CS1/Configuration, you didn't translate 'yes' in the keywords['affirmative'] table so for consistency I would expect that you would not want to translate 'yes' in Module:Footnotes line 255.
To see the error messages at en.wiki, you must enable them (because torches and pitchforks). Instructions for how to do that are at Method 3. After you've done that, go back to Category:Harv and Sfn template errors and choose from among the ~35k articles currently listed there. I find the ctrl+f '(help' without the quotes is a quick way to find these error messages.
The harv and sfn families of templates are old. Module:Footnotes is newer but has has been around for a while. ~/anchor id list and ~/whitelist are new. Umm, documentation is never perfect, and I suck at making it. I rather like the help text on the category page when there is only one category page. For cs1|2, there are a lot of category pages so it makes sense to have a single help text page and then transclude text from that into the appropriate category page. There is some discussion about splitting Category:Harv and Sfn template errors; one for no target and one for multiple targets. If we do that then we will follow the cs1|2 model.
Yes, the module shows false-positive errors. The reasons for that are described at Current limitations and false-positive errors. There are three ways to suppress false-positive errors: ~/whitelist, a {{sfn whitelist}} template on the article page, or adding |ignore-false-positive=yes to individual short-cite templates. A decision was taken to hide this information (because torches and pitchforks) so it is hidden in Resolving errors.
Module:Citation/CS1/Arguments is a defunct tool that was intended to help with the maintenance of Module:Citation/CS1/Whitelist. We stopped using it when we allowed elements there to have more than the single assigned value true. You should delete ~/Arguments. Module:Citation/CS1/autofix is a defunct experiment that the editor hoped would be adopted. It was intended to be a way of handling errors. The experiment gained no traction here. You should delete ~/autofix. If these modules exist at sq.wiki, those copies should also be deleted.
Trappist the monk (talk) 11:23, 10 April 2020 (UTC)Reply

I did the needed translations. Just to clarify: I shouldn't translate template = 'harv', 'CITEREF', ({'page', 'pages', 'location'}), 'none', eh? These were the remaining parts I had doubts.

I certainly wouldn't say you suck at documentation.

Yeah, I know about the revolution that's why I asked if there was some kind of workaround. I'll stick to the translate-it-later plan.

Also, I think I understand the limitation that the module has (mostly related to that interlinking web of templates I talked above, if I'm not wrong) but is there a way to make a limitation like this not exist anymore in the future? I'm not talking about a specific solution. I'm saying for things like "yes, we'll try to make the module 'more powerful'" or "yes, we'll try to change the way those templates work with their wrappings". Just for examples to express what I'm asking. I'm just trying to understand if there are hopes of passing that limitation in the future (even if there might be no active work towards that aim at the moment) or if we have already accepted that as normal and it is there to stay. The reason I ask that is because, as maybe it can be imagined, for the average user (maybe only in SqWiki) the citation process is very hard in itself. I'm continuously asked by new users if it would be possible to make that process easier. I've been to many workshops and all the new users have difficulties with the wikimarkup used in referencing because they mess up the Ref tags with the templates' brackets and not to mention the parameters used. When working blindly, without understanding what the templates are and how the parameters interact with each other, it seems like a completely new language. (Error messages have worked like magic in this direction by giving them the determination to solve the problems so they can remove "the red sign".) Understanding the technical side of errors and suppressing them if they're false positives would be too much to ask them to do. And it may work if admins or wikignomes come later to fix those errors but at SqWiki one of the main problems we have is the lack of tech-savvy human resources so, with other words, if we are to choose that path, we're to expect all the fixing to be done solely by me and another guy, which is impossible. I try to automatize as much work as possible or at least make it have a new-user friendly interface so it can be divided among many users precisely for that reason.

I suspected that. I'll delete those subpages then, since we do have them at both our projects. But why do you keep them here, if they don't interact with the module itself?

I also checked ~whitelist and ~anchor id list. No work needed there apparently. I'll start with the importation of templates soon and write again after I'm through with them of if any difficulties arise. - Klein Muçi (talk) 15:02, 10 April 2020 (UTC)Reply

@Klein Muçi: harv occurs three times in sq:q:Module:Citation/CS1 and is the keyword that the current en.wiki, sq.wiki, and sq.quote use in |ref= tell cs1|2 to add an anchor ID to a rendered template. harv is an abbreviation of 'Harvard' meaning Harvard referencing. In the next release cs1|2 will create an anchor ID for every rendered template except when |ref=none. In a future release, the code will be modified to remove those three occurrences from Module:Citation/CS1.
You are talking about harv at sq:q:Module:Footnotes line 33. There, it is the default value for the first part of the error messages in case I failed to add the |template=<template name> to one of the harv or sfn family of templates. I don't think that I have, but it doesn't hurt to be safe.
CITEREF is part of the anchor ID that cs1|2 creates and part of the anchor link that Module:Footnotes creates. cs1|2 creates an anchor ID from up to four author names and the year portion of the date concatenated with CITEREF. If for Rowling 1997 above, cs1|2 creates and anchor ID: CITEREFRowling1997. That ends up in the citation's html as: <cite id="CITEREFRowling1997"...>...</cite>. Module:Footnotes creates a link to that anchor ID by concatenating the harv or sfn template parameters with CITEREF:
{{harvnb|Rowling|1997}}[[#CITEREFRowling1997|Rowling 1997]]Rowling 1997
You can, if you want to, translate CITEREF to something else but whatever it is must be the same in cs1|2 else the linking will not work.
{'page', 'pages', 'location'} is a table of table-index-names. Inside the loop, args[v] is the same as args['page'] then args['pages'], then args['location']. Were you to translate these, the code would break unless you also changed the initial args{} table assignments.
none is a keyword that should be in the keywords table in ~/Configuration. I'll fix that.
In Module:Footnotes, none is a keyword used to suppress terminal punctuation. This short-cite is written:
{{sfn|Rowling|1997|p=11|ps=none}}
none is also used to suppress the creation of an anchor ID link:
{{harvnb|Rowling|1997|ref=none}}Rowling 1997 → Rowling 1997
You may translate none in lines 204, 248, 390, 426. Do not translate none in line 113.
I suspect that the error detection scheme employed by Module:Footnotes will always be imperfect. Reading citation templates in an article's wiki text is pretty easy because citation templates have a consistent format. Fetching the information needed to error check wrapped templates is not so easy be cause the internals of those wrappers may be very complex. There are user scripts that don't suffer from the same limitations because they operate on the final html. But, unless those scripts are somehow made part of MediaWiki's default page rendering, editors will, individually, have to add a script to their Special:MyPage/common.js. The current scripts don't (can't?) categorize and don't detect multiple targets. So, limitations on both paths.
We retain ~/Arguments and ~/autofix for their historical value just as we have retained the peculiar structure of cs1; there is a Module:Citation that does nothing except render an error message.
Trappist the monk (talk) 16:54, 10 April 2020 (UTC)Reply
So in other words, nothing more to translate. Thank you for the detailed explanation!
To be honest, I'm a bit disappointed to hear that about the module. The reasons are explained above (so I don't repeat myself). But what to do?
I imported all the templates and I'm finishing with the translation of errors. Can you help me with a detail regarding the styling with those messages? Currently those are rendered like this (example): sfn Gabim - Shënjestrim i shumëfishtë (2×): CITEREFPond1990 (Ndihmë!). Can you make it so they are rendered like this: Gabim me sfn - Shënjestrim i shumëfishtë (2×): CITEREFPond1990 (Ndihmë!)? It would really help with the syntax in Albanian to have more meaning. I can make it myself with a bit of trial and error while I familiarize myself with the module's code but I thought you could do it a bit more faster so...
After that, maybe I'll ask for a bit of help on how to use the templates practically and I think I'm done.
Side info: I deleted those 2 subpages. - Klein Muçi (talk) 20:15, 10 April 2020 (UTC)Reply
I presume you want the word order for both error messages changed so I have done both.
Trappist the monk (talk) 20:44, 10 April 2020 (UTC)Reply
Thank you! So, now a question first: Regarding the commented out part of the code that says --use this version to hide error messages... Sorry for maybe the dumb question but why does it need to show the help page or the other words needed for showing errors if that part of the code is to be used to hide said errors? And IF somehow I have misunderstood that part, if we ever activate that version, in a hypothetical future, is the word order you changed yesterday present even in that version? Actually, my question does seem dumb to me because that version hides errors so nothing would be shown but I see almost the same code as the version we're using and I was wondering if maybe I've misinterpreted that and that's for hiding another detail, the errors are still shown. If that was the case, I wanted to make sure we had the same language syntax in both versions, so I didn't come here confused many months from now, asking to replicate that word order change you did a long time ago. So, long story short, I just want for the word order to be the same throughout the whole module and that also raised my curiosity on this one.
Now that I finally was able to finish working with the modules, Footnote's subpages, its category, its help page and its templates and replicate everything to SqWiki AND take care about the protection and Wikidata links, :P I'm finally able to deal with the first problem for which I came here: What templates do I need to use at that article I mentioned at the beginning for not having to write over and over again the same repeating info while keeping the references still showing the same at the Ref section? I'm aware you actually answered that question twice but can you do some practical changes at the article itself so I can use those as an example and work from there? I have yet to study the templates documentation in details. I plan to do that after I'm through with this, little by little. - Klein Muçi (talk) 09:33, 11 April 2020 (UTC)Reply
@Klein Muçi: Hiding error messages is not the same as not emitting error messages. The hiding is actually done by your browser. At en.wiki, the decision is to hide these error message. But for we few who aren't intimidated by error messages, there is a way for the hidden error messages to be displayed: the Method 3 that I mentioned above. Keeping both forms of error messages in the code allows wikis to determine for themselves whether error messages are displayed or hidden and allows individual editors at each wiki to override that decision. So, Method 3 at en.wiki allows me to see the error messages. Because sq.quote displays the error messages, an editor there who does not want to see the error messages can add this to their personal css to hide them:
.harv-error {display: none !important;} /* hide Module:Footnotes errors */
The messages are still present even when hidden. You can put "error: multiple targets (6×)" in the search box, and the search will find articles where a short-cite template has six possible targets (at this writing, 22 articles).
I have replaced all but one of the cs1|2 templates at sq:q:Harry Potter dhe Guri Filozofal (libri) with sfn templates. You will notice that this experiment appears to have failed; all that extra white space. That happens because you inserted to newlines between </includeonly> and <noinclude> that aren't there in the en.wiki versions of the template. Every character in a template that is not in <!--...--> or in <noinclude>...</noinclude> is transcluded in an article that has the template. So, after every {{sfn|Rowling|1997}} two newlines are added to the article. I would have fixed that, but ... protected.
Trappist the monk (talk) 12:25, 11 April 2020 (UTC)Reply

I see... I didn't know that. Well, in that case, can you also change the code for the other version? I'll remove the protection from the module. Apparently I'll have to change all my templates too 2 times (SqWiki). I'm changing those myself so I don't tire you more but please, can you take care of that minor thing in the module? Ping me where you're through. - Klein Muçi (talk) 15:27, 11 April 2020 (UTC)Reply

@Klein Muçi: I don't think that I know what minor thing in the module you are talking about. I thought that we were talking about having the same message text whether the error messages are displayed or hidden. From sq:q:Module:Footnotes:
displayed: Gabim me ' .. args.template .. ' - ' .. msg .. ' ([[Ndihmë:Gabimet me stampat Harv dhe SFN|Ndihmë!]])
hidden: Gabim me ' .. args.template .. ' - ' .. msg .. ' ([[Ndihmë:Gabimet me stampat Harv dhe SFN|Ndihmë!]])
the content of the msg variable is set according to the type of error detected. If this is not what you want, then you must be more specific.
Or are we talking about something else and I've lot the plot?
Trappist the monk (talk) 15:46, 11 April 2020 (UTC)Reply
No, I meant precisely that. Apparently you had changed that already? I did change the templates and everything looks so much better now. Thank you a lot! :) I'll learn to replicate what you did and fix the other articles too. And I'm guessing that concludes my discussion.
2 new random questions to really conclude it:
  1. Is there anything else (modules/templates) I can import regarding citations I haven't heard of? Until these days I knew only of the existence of CS1 module. I was surprised by Footnotes and that got me thinking.
  2. Why don't you have a userpage? If I can ask that. It's always +1 extra step of starting a discussion with you because of that deleted userpage. :P - Klein Muçi (talk) 15:56, 11 April 2020 (UTC)Reply
@Klein Muçi: Probably. But importing stuff that no one there knows about or hasn't requested just seems like a lot of work for little benefit. I'm not going to make recommendations because I don't know what you and your community need. You discovered a need for short-cite referencing. Now you have it. When the next need arises, let me know, perhaps I can point you toward a solution.
No user page because nothing to say, no horn to toot, and no requirement to have one. I deleted my user page because other editors kept putting stuff in it. After several go-arounds of that, and because I could, I protected it so that I wouldn't have to keep doing the deletion thing. How is a missing user page an extra step?
and the contrarian in me prefers the red over the blue (though in general, red is my least favorite color)
Trappist the monk (talk) 16:33, 11 April 2020 (UTC)Reply
Hahah Okay then. Well, the way I start a discussion with someone is by searching in the search box "User:Name". It's a force of habit. And that brings me to some of your subpages from which I get to your deleted page and then to your talk page. :P I'd say you do have a lot of horns to toot given of your work here with citations but I do understand the contrarian part so... :P :) - Klein Muçi (talk) 16:44, 11 April 2020 (UTC)Reply
Unfortunately I returned sooner than expected. Working with the SFN template, I had a dilemma: What kind of date should I use in translated books? The date when the original book got published or when its translation got published? Only now I notice we've been using both all this time, depending on the user's preferences. The SFN template focuses too much on the date and that made me notice that. I switched all the dates to the translation's date, my logic being that that's actually the book we're citing from but now it renders a bit strangely with the SFN template since it puts the author's name + the date, which is not the date that author published that book. - Klein Muçi (talk) 10:01, 12 April 2020 (UTC)Reply

Also, regarding the SFN templates not needing <ref> tags... What's the logic behind that? Is there any particular reason for that behavior? On first thought, always thinking for the new users needs, it seems a bit confusing. We've spent too much time teaching them to always correlate the citing process with the <ref> tags so they don't forget to put them before cite templates. And now... :P - Klein Muçi (talk) 10:13, 12 April 2020 (UTC)Reply

I was not here when these templates were created so I don't have certain knowledge but, one reason for {{sfn}} is combining footnotes. At sq.quote, this short-form cite is used twice. That is accomplished by placing two {{sfn|Rowling|1997|p=23}} templates in the article body. To do the same thing with <ref>...</ref> tags you have to manually name the tags:
<ref name="Rowling p.23">{{harvp|Rowling|1997|p=23}}</ref>
and then there are two options:
  1. place two copies of the above at separate locations in the article text
  2. place one copy of the above in the article text at one location and then place <ref name="Rowling p.23" /> at the other location
{{sfn}} does that for you by creating the necessary <ref>...</ref> tags:
<ref name="FOOTNOTERowling199723">[[#CITEREFRowling1997|Rowling 1997]], f. 23.</ref>
If editors at en.wiki can learn to use these template, so too, can the editors at sq.quote.
Trappist the monk (talk) 12:04, 12 April 2020 (UTC)Reply
Oh, I see. It's mostly about the repeating references then. To be honest, even for new users, it's easier like this than using named references. My philosophy is to automatize as much as possible so... :P What about the date? How should I use that parameter correctly in translated copies? I tried reading the documentation of {{cite book}} but I didn't find this detail explained explicitly anywhere there when talking about the "date" parameter. - Klein Muçi (talk) 12:22, 12 April 2020 (UTC)Reply
@Klein Muçi: not sure I understand your questions. The short-form templates don't have the |date= parameter, per se. They have a positional parameter (the last of up to five positional parameters) that is presumed to be the year portion of the publication date. When creating an anchor ID for a citation, cs1|2 concatenates CITEREF and the content of |last1=|last4= and the year portion of |date=. An anchor ID is not created when there are no names. The value assigned to |ref=, if not harv, overrides automatic anchor ID creation.
Short-form templates are used with {{cite journal}} and other templates, so from |date=<month name> <year>, cs1|2 will extract <year> – date format must be valid. Module:Footnotes creates anchor links by concatenating CITEREF and the content of {{{1}}}{{{n}}} and the year from {{{n+1}}} (where n <= 4). The content of {{{n+1}}} must have a valid year format else it will be treated as a name. Valid short-form cite year formats are:
YYY
YYYY
n.d.
nd
c. YYY
c. YYYY
YYYY–YYYY – (separator is endash character)
YYYY–YY – (separator is endash character)
All of these year formats may have a single, lowercase letter suffix for disambiguation.
Did I answer your questions? I don't understand this one at all: How should I use that parameter correctly in translated copies? Translated copies of what?
Trappist the monk (talk) 14:31, 12 April 2020 (UTC)Reply
No, no. It's easier than that. Let's have a practical example. HP 1 is published in 1997 in UK. In Albanian, the translated copy, it's published in 2002. When using {{cite book}}, should I put 1997 or 2002 at the "date" parameter if I'm citing from the translated copy? I changed all the dates to use the translated copy's published date but when I used the SFN template this means writing it as Rowling 2002 p=xxx which is not actually the date that writer (Rowling) wrote that book, as that template makes you think. It's not a problem of the template in itself. I'm just not sure which year I should put at that template. (Or maybe there exists another short cite template to use specifically for translated books? I don't believe that. Maybe I should put the translator's name instead of the writer at the SFN template?! I find that highly improbable.) Am I a bit more clear now? - Klein Muçi (talk) 14:51, 12 April 2020 (UTC)Reply
@Klein Muçi: At en.wiki, we tell editors to WP:SAYWHEREYOUGOTIT. So we would use the 2002 date (presuming that the publication date on the verso of the title page is 2002). You may, if you wish, include |orig-year=1997 in the cs1|2 template:
{{cite book |title=Harry Potter dhe Guri Filozofal |date=2002 |orig-year=1997 |first=J. K. |last=Rowling |series=Harry Potter |publisher=Shtëpia Botuese DITURIA |translator-first=Amik |translator-last=Kasoruho |editor-first=Mariana |editor-last=Ymeri |location=Tiranë |language=sq |isbn=99927-47-63-3 |ref=harv}}
Rowling, J. K. (2002) [1997]. Ymeri, Mariana (ed.). Harry Potter dhe Guri Filozofal. Harry Potter (in Albanian). Translated by Kasoruho, Amik. Tiranë: Shtëpia Botuese DITURIA. ISBN 99927-47-63-3. {{cite book}}: Invalid |ref=harv (help)
1997 is not the date that the book was written, it is the date that the English edition of the book was published. 2002 is the year that Rowling's book was published in its Albanian translation. The 2002 translation is still an edition of her work; she is still the author.
I don't think that I would use the translator's name though you could. cs1|2 does not consider translator names when creating anchor IDs. To do that, you would have to write |ref=CITEREFKasoruho2002 or |ref=CITEREFRowlingKasoruho2002 in the cs1|2 template and then write {{sfn|Kasoruho|2002}} or {{sfn|Rowling|Kasoruho|2002}}. Meh. Seems like too much work for too little benefit.
Trappist the monk (talk) 16:05, 12 April 2020 (UTC)Reply

Oh, I can specify it at the long version of the reference. Yeah, good idea. When you see it like that, the SFN template makes sense, even with that other year. Thank you then! Hopefully I won't disturb you for some time now. :) - Klein Muçi (talk) 16:34, 12 April 2020 (UTC)Reply

Hello! I'm an editor at SqQuote. Klein yesterday explained to me a little how to use the sfn template and I was following the instructions in an article I've written but there were multiple errors, maybe because the same year and author is used more than once at the article. Klein suggested I could ask you for help on how to solve those errors so, please, can you take a look at this article and tell me if what I've done is the best approach and how can I solve those errors? Sorry for disturbing you multiple times with these (I'm seeing the conversation above) but we're still trying to learn and we don't have many users who we can ask for advice in our community. - Berishasinan (talk) 18:23, 12 April 2020 (UTC)Reply

Your diagnosis is correct. When using the short cite templates to cite the works of an author who has published multiple works in the same year, the short-cite and their matching full cite templates need disambiguation. Disambiguation is accomplished by adding a single lowercase letter as a suffix to the year part of the date. Using {{harvnb}} here for simplicity:
{{harvnb|Rowling|2002a|p=31}}Rowling 2002a, p. 31
{{harvnb|Rowling|2002b|p=7}}Rowling 2002b, p. 7
and adding the appropriate disambiguator to |date=:
|date=2002aRowling, J. K. (2002a) [1997]. Harry Potter dhe Guri Filozofal. Harry Potter (in Albanian). Translated by Kasoruho, Amik. Tiranë: Shtëpia Botuese DITURIA. ISBN 99927-47-63-3. {{cite book}}: Invalid |ref=harv (help)
|date=2002bRowling, J. K. (2002b) [1998]. Harry Potter dhe Dhoma e të Fshehtave. Harry Potter (in Albanian). Translated by Kasoruho, Amik. Tiranë: Shtëpia Botuese DITURIA. ISBN 99927-47-83-8. {{cite book}}: Invalid |ref=harv (help)
At sq:q:Harri_Poter#Referimet, Harry Potter dhe Guri Filozofal is missing its |ref=harv.
Trappist the monk (talk) 18:51, 12 April 2020 (UTC)Reply
I just finished with what you suggested. And it worked. Thank you very much! - Berishasinan (talk) 20:12, 12 April 2020 (UTC)Reply

sfn broken?

edit

I see you just edited the sfn template. Now, some uses I thought were valid are showing an error message: see Richard Westmacott and What-not. Are you on it? David Brooks (talk) 23:09, 27 March 2020 (UTC)Reply

{{sfn}} is not broken. The error is expected in those two articles. The reason for that is, I think, explained at the error message's help text. If, because really, I do suck at writing help text and documentation, the error message is not adequately explained, please tell me how it should be improved.
Trappist the monk (talk) 23:14, 27 March 2020 (UTC)Reply
Sorry, I don't think it's realistic to expect every reader to change their CSS just to suppress a new error: there may be thousands of articles that use sfn or harv referring down to a {{EB1911}} or {{Cite EB1911}}, which themselves are wrappers for {{Cite encyclopedia}} which... honestly, I lose track of the template stack. IMO if this new behavior is going to persist these templates should be fixed, but I wouldn't know where in the stack to fix them. I bet the same applies to things like Cath and DNB. And it's odd, because there isn't an actual error; the citation links to the general reference correctly anyway. @PBS:: do you have insight; am I missing something? David Brooks (talk) 03:42, 28 March 2020 (UTC)... ETA, I looked at the HTML. The footnote has <a href="#CITEREFChisholm1911"> and the cite has <cite id="CITEREFChisholm1911" so I still can't see why it's an error. David Brooks (talk) 03:52, 28 March 2020 (UTC)Reply
I agree. Worse still many of the error messages are utterly false. Look at Hearts (card game) where every Sfn short reference has a corresponding long one. Please revert the change and experiment elsewhere.Bermicourt (talk) 09:31, 28 March 2020 (UTC)Reply
I think that you are mistaken. At Hearts (card game), while the {{sfn}} short form citations may all have matching long-form citations, none of the wikilinks from the {{sfn}} templates work because none of the long form templates in Hearts (card game) § Literature are configured to provide the necessary anchor IDs that the {{sfn}} templates need in order to function correctly. The error messages on that page are not false and are correctly announcing that something is broken.
Trappist the monk (talk) 12:39, 28 March 2020 (UTC)Reply
Hearts (card game) has now been fixed, but can editors working on it please resolve the issues with (2009) and (1887) please. Martin of Sheffield (talk) 14:59, 28 March 2020 (UTC)Reply
It is not expected (or desired) that every reader ... change their CSS. There are editors who, for whatever reason, do not want to see error messages of any kind. The css is for those editors. Most of the errors displayed in the articles listed at Category:Harv and Sfn template errors are legitimate errors that need to be fixed. That there are so many articles listed there suggests that the current method of implementing short-form templates has not worked as it should.
{{sfn}} now reads the article's unprocessed wikitext (the same wikitext that you see in the edit window). It would be nice to be able to read the rendered html, but alas, that is not possible because modules cannot read something that hasn't been created yet. The code in {{sfn}} assembles a list of anchor IDs from the elements of raw citation templates. For example, from this raw template:
{{cite book |last=Red |last2=Green |last3=Blue |title=Colours |date=2020 |ref=harv}}
the code creates CITEREFRedGreenBlue2020 from the |lastn= and |date= parameters and adds the anchor ID to the list (if |harv= had been omitted or left empty, nothing would be added to the list for that template).
{{sfn}} is configured to look for {{citation}}, {{cite ...}}, {{vcite ...}}, {{wikicite}}, and {{harvc}}. As such, it does not inspect {{EB1911}}. But, even had What-not used this raw template:
{{cite EB1911|wstitle=What-Not|volume=28|page=576}}
nothing would have been added to the list of anchor IDs because that raw template does not have
  • |lastn= or |editor-lastn= and does not have
  • |date= or |year= and does not have
  • |harv=ref or |mode=cs2
When {{sfn}} renders the mixed wikitext and html that MediaWiki uses to create a finished page, it hunts through the list of anchor IDs that match the parameters to this particular {{sfn}}. So for my Colours example:
{{sfn|Red|Green|Blue|2020}}
creates an anchor link [[#CITEREFRedGreenBlue2020]] where the CITEREFRedGreenBlue2020 portion must have a matching entry in the anchor ID list. Because there is a match, no error message. For the {{cite EB1911}} example, from this:
{{sfn|Chisholm|1911}}
{{sfn}} creates an anchor link [[#CITEREFChisholm1911]] but the anchor ID list does not have a matching anchor ID so {{sfn}} emits the error message. This is the false positive.
The false positive exists because, as you pointed out, the link from the short-form to the long-form works. This is true because {{sfn}} works only with the article's raw wikitext. It cannot see into {{EB1911}}. It cannot see that:
  • {{EB1911|wstitle=What-Not|volume=28|page=576}} calls
    • {{cite EB1911 |noicon=1 |ref=harv |wstitle=What-Not |page=576 |volume=28}} which calls {{cite encyclopedia}} with the necessary preset parameters to make an anchor ID:
      • {{cite encyclopedia |editor-last=Chisholm |date=1911 |encyclopedia=[[Encyclopædia Britannica Eleventh Edition|Encyclopædia Britannica]] |publisher=Cambridge University Press |title=[[:s:1911 Encyclopædia Britannica/What-Not|What-Not]] |editor-first=Hugh |edition=11th |ref=harv |page=576 |volume=28}} which (finally) creates the anchor ID.
This is a known limitation of this scheme and is resolved by adding |ignore-err=yes to the {{sfn}} templates that are emitting the false error messages. If I can find a better way I'll implement it and am open to suggestions.
Trappist the monk (talk) 12:39, 28 March 2020 (UTC)Reply
Do you mean add ignore-err=yes to the sfn code, or to every correct use of it? The second clearly doesn't scale, and it does require some expertise to know when the error is ignorable (the operational failure is subtle). The first means that we don't see actual errors.
I see you used {{Cite EB1911}} and {{EB1911}} as examples. One uses cs1, the other cs2, and I can never remember which is which. The "Cite" version does not, alone, emit the correct anchor and since I understood that, I've been slowly editing those I was responsible for to add ref=harv. It's fine to error those that don't, but the new sfn is also erroring those that do. However, {{EB1911}} has always created the right anchor. And maybe someone (probably you or PBS) could possibly fix those to suppress the error, but do we know how many other citation templates are based on a similar stack? I don't want to be harsh, but it seems to me that the new behavior is a bug.
Because I do want to see the errors, with an eye to fixing them, I have deployed User:Ucucha/HarvErrors.js, which shouts out loud both missing anchors and missing references (overkill, but hey). It doesn't suffer from the false positives. It doesn't work in AWB preview, unfortunately, and the new sfn error does.
Please reconsider. David Brooks (talk) 14:17, 28 March 2020 (UTC)Reply
I mean that when an {{sfn}} link works (you click the link and the focus changes to the matching long-form citation) and when the {{sfn}} template is showing a 'no target' error message, then editors should add |ignore-err=yes to that {{sfn}} because that {{sfn}} error message is a false positive. Do not add |ignore-err=yes to {{sfn}} templates that link to the matching long-form citation and are not showing an error message.
{{EB1911}} and {{cite EB1911}} are both cs1; neither use cs2 but if you want {{EB1911}} to be rendered as a cs2 template (comma separators and lowercase static text), you can add |mode=cs2 like this:
{{EB1911|wstitle=What-Not|volume=28|page=576|mode=cs2}}
  This article incorporates text from a publication now in the public domainChisholm, Hugh, ed. (1911), "What-Not", Encyclopædia Britannica, vol. 28 (11th ed.), Cambridge University Press, p. 576
I do not know of a way (if there is a way) to make these false positives go away automatically. I am skeptical that changes to {{EB1911}} and / or {{cite EB1911}} will prevent {{sfn}} from showing false positive error messages. If I am wrong, please show me how to do that.
I've been slowly editing those I was responsible for to add ref=harv. It's fine to error those that don't, but the new sfn is also erroring those that do. I don't fully understand. Can you show me cases where the new sfn is also erroring those that do?
Trappist the monk (talk) 14:57, 28 March 2020 (UTC)Reply
When I say not scalable, I just counted 11,773 occurrences of 1911-related sfn's in articles containing the {{EB1911}} template. All but a small minority of those will show false positives. Any with {{Cite EB1911}}...ref=harv will be a false pos too. I'd guess similar numbers with DNB and Cath. David Brooks (talk) 16:37, 28 March 2020 (UTC)Reply
Are you sure about your numbers? How did you get them?
I just did a simple search:
hastemplate:EB1911 incategory:"Harv_and_Sfn_template_errors"2,771 results
Changing that to:
hastemplate:"cite EB1911" incategory:"Harv_and_Sfn_template_errors"3,901 results
I expect that there is some overlap because {{EB1911}} uses {{cite EB1911}}.
Trappist the monk (talk) 18:22, 28 March 2020 (UTC)Reply
How did I find those numbers? I wrote a C#/LINQ wrapper around the MW API (it's not complete enough to publish). For every title that transcludes {{EB1911}}, search the wikitext for "\{\{sfn[^}]+\| *1911". I earlier forgot to filter for mainspace :-( and I've refined the RE so a new number. And I should clarify 11,767 occurrences of sfn in 2,385 articles from A Estrada to Zhob, tolerably close to your number (I got 2,400 in all namespaces). Still not scalable IMO. As I suggested, there are some edge cases where that logic is potentially faulty, probably no more than a dozen.
In the case of {{Cite EB1911}}, it's a false positive if there is a referring sfn and the citation template has "ref=harv". Many do, but I don't know the fraction. I haven't even looked at the similar DNB or Cath, and I just realized that hundreds of other templates link to {{Cite encyclopedia}} (many will use inline refs of course).
I hate to pile on to someone who has done so much infrastructure good, but Wikipedia articles are meant to be read by laypeople who are not well-versed in the Harvard game. This error means nothing to people who ask "what's an sfn" and the help text identifies a "fix" for what is often a false positive. David Brooks (talk) 20:41, 28 March 2020 (UTC)Reply

Ping David Brooks

I am late to this party and I am not sure what the specific problem is. However the templates that start {{cite name}} eg {{cite EB1911}} should default to ref=none while the templates that start {{name}} eg {{EB1911}} should default to ref=harv. This is because {{cite EB1911}} may be included in an article where it is not cited eg in a "Further reading" section, while text that is supported by {{EB1911}} should have inline citations. -- PBS (talk) 13:42, 13 April 2020 (UTC)Reply

@PBS: Replying on your talk page. David Brooks (talk) 14:29, 13 April 2020 (UTC)Reply
PBS, are you sure you have that right? That seems backwards to me, but I haven't had my first cup of coffee yet. In any event, upcoming changes to the CS1 (cite web etc.) suite of templates may make this issue moot. – Jonesey95 (talk) 15:30, 13 April 2020 (UTC)Reply

Missing title

edit

Hey there! :)

Quick question:

Is there something I can do to solve the error of a missing title in {{cite magazine}} if I really don't know the title of the article I'm citing from? I know only the magazine's name/title, the author and the year of publication. Not to hide the error. To "solve" it. Any kind of workaround? Or is the title a must? - Klein Muçi (talk) 17:41, 15 April 2020 (UTC)Reply

Umm, you do know what my answer will be, right? To solve the error (I mean really solve the error) you must find the title of the article or find a better source.
You can always spoof the template by writing the equivalent of: |title=Article title not known. Another thing you might do is use an incipit in lieu of a title. These aren't the best but they will quash the error message.
Trappist the monk (talk) 17:57, 15 April 2020 (UTC)Reply
I see. Okay then, thank you! :) - Klein Muçi (talk) 18:57, 15 April 2020 (UTC)Reply

I NEED YOUR HELP

edit

It's about Module CS1 on my wiki. I getting the following error: Lua error in Module:Citation/CS1 at line 2223: attempt to index field 'keywords_lists' (a nil value) When I clicked on the error to see further information, they read as follows: Lua error in Module:Citation/CS1 at line 2223: attempt to index field 'keywords_lists' (a nil value).

Backtrace:

   (tail call): ?
   Module:Citation/CS1:2223: in function "citation0"
   Module:Citation/CS1:3858: in function "chunk"
   mw.lua:511: ?
   (tail call): ?
   [C]: in function "xpcall"
   MWServer.lua:99: in function "handleCall"
   MWServer.lua:313: in function "dispatch"
   MWServer.lua:52: in function "execute"
   mw_main.lua:7: in main chunk
   [C]: ?

I don't know how to add the database table 'keyword list', please help.

Thank you.
105.112.46.9 (talk) 18:53, 15 April 2020 (UTC)Reply

Where are you? Where can I look at an example of a template that exhibits this error? Where can I see how you have the module suite setup?
Trappist the monk (talk) 17:48, 15 April 2020 (UTC)Reply
Previous trouble solved, NEW TROUBLE AS FOLLOWS:

Thank you for the the swift response Monk.

I have resolved the first trouble and, the solution is as follows:

''--[[--------------------------< E X P O R T E D   T A B L E S >------------------------------------------------
]]
	keywords_lists = keywords_lists,      '''--was missing in (Module:Citation/CS1/Configuration)'''


Now, I cannot save the following line in ''Module:Citation/CS1/Configuration''

''--[[--------------------------< L A N G U A G E   S U P P O R T >----------------------------------------------

These tables and constants support various language-specific functionality.

]]

local this_wiki_code = mw.getContentLanguage():getCode()						-- get this wiki's language code

local local_lang_cat_enable = false;											-- set to true to categorize pages where |language=<local wiki's language>


--[[--------------------------< S C R I P T _ L A N G _ C O D E S >--------------------------------------------

This table is used to hold ISO 639-1 two-character language codes that apply only to |script-title= and |script-chapter=

]]

local script_lang_codes = {
	'am', 'ar', 'be', 'bg', 'bn', 'bo', 'bs', 'dv', 'dz', 'el', 'fa',			-- ISO 639-1 codes only for |script-title= and |script-chapter=
	'gu', 'he', 'hi', 'hy', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', 'ku',
	'mk', 'ml', 'mn', 'mr', 'my', 'ne', 'ota', 'ps', 'ru', 'sd', 'si',
	'sr', 'ta', 'tg', 'th', 'ug', 'uk', 'ur', 'uz', 'yi', 'zh'
	};''


Whenever the line is included, the page Module:Citation/CS1/Configuration won't saved or published, error message:

''Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at webmaster@en.example.org to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Apache Server at en.example.org Port 443''<br />

As a result, the new Citation error is:
Lua error: bad argument #1 to 'fetchLanguageName' (string expected, got nil). More information on the error, shows:

Lua error: bad argument #1 to 'fetchLanguageName' (string expected, got nil).

Backtrace:

   (tail call): ?
   [C]: in function "error"
   MWServer.lua:81: ?
   (tail call): ?
   (tail call): ?
   Module:Citation/CS1:1498: in function "language_parameter"
   Module:Citation/CS1:3223: in function "citation0"
   Module:Citation/CS1:3858: in function "chunk"
   mw.lua:511: ?
   (tail call): ?
   [C]: in function "xpcall"
   MWServer.lua:99: in function "handleCall"
   MWServer.lua:313: in function "dispatch"
   MWServer.lua:52: in function "execute"
   mw_main.lua:7: in main chunk
   [C]: ?


Does this have anything to do with the extension Bable, I don't have it here yet, I'm on share host.

Not going to tell me where I can have a look?
Elsewhere, people who have attempted to upgrade the module suite encounter problems similar to your first problem because they have only updated one or some of the necessary modules. Are you doing that? Has the cs1|2 module suite previously worked? If you are upgrading, upgrade all of the modules, not just those that you think might need upgrading.
Maybe I can be more helpful if you tell me where I can see what it is that you are doing.
Trappist the monk (talk) 19:19, 15 April 2020 (UTC)Reply


Sure, I upgraded all but, some like 'Module:Citation/CS1/Configuration/sandbox' won't saved or published so, I let it be. And Module:Citation/CS1/Configuration only saved half the content, excluding the language section.

What can be done?

Oh! I see, I just check the error_log of en.example.org and found:


''[15-Apr-2020 09:39:41 America/Boise] PHP Warning:  Error while sending QUERY packet. PID=740726 in /home1/example/public_html/en/w/includes/libs/rdbms/database/DatabaseMysqli.php on line 46''


What that means, maximum query allow to MySql database is reached.

I asked my host to increase it but they say it cannot be done otherwise it would affect all website hosted on the same server and advised for upgrade to VPS which I am not ready for.

They also advised on a second option: to reduce the query size to smaller chunk; please, how do I do that ?

(edit conflict)
If you are getting internal server errors, then you may have bigger problems than getting this module suite to work. I am not the person to help you fix the server errors or mis-configuration problems.
I do not know how to reduce query size. Perhaps someone at WP:VPT can help you with that.
Trappist the monk (talk) 19:49, 15 April 2020 (UTC)Reply


Thank you,


Let me checkout WP:VPT.

Module:Citation/CS1 change

edit

Hi, Trappist the monk! I use User:Lingzhi2/reviewsourcecheck to spot harv ref mismatches (shortened footnote references that do not match to citations, & citations that do not have shortened references that use them). When I have a citation without a shortened footnote reference, User:Lingzhi2/reviewsourcecheck gives me a warning like "Harv warning: There is no link pointing to this citation. The anchor is named CITEREFLowenthal1927." This is only visible to users of reviewsourcecheck.

Previously, this had only occurred when I had |ref=harv, but as of today, I am getting the warning even when there is no ref=harv parameter/value. With the change that you made today (2020-04-18), is the code now generating ref=harv? If so, is that the intended result?

Peaceray (talk) 17:35, 18 April 2020 (UTC)Reply

I just saw this: User talk:Citation bot/Archive_20#remove ref=harv, so this must of been planned. I have alerted Lingzhi2 so probably changes to reviewsourcecheck will follow. Peaceray (talk) 17:56, 18 April 2020 (UTC)Reply
Help talk:Citation Style 1 § make ref=harv the default for CS1.
Trappist the monk (talk) 18:19, 18 April 2020 (UTC)Reply
edit

Hi Trappist; i believe i've asked you a question or two previously, and here i am again with another.... I work through the list at Category:CS1 errors: external links quite often and sometimes run across a link i don't know what to do with ~ a title which is a Twitter quote itself containing a link. An example is at reference 32 in Alex Chalk where the title is "Important report from @childrensociety & @YoungMindsUK led by @AlexChalkChelt shows we've got to do more to make sure the internet is a safe space for all - esp young people. Well done Alexhttps://www.childrenssociety.org.uk/what-we-do/resources-and-publications/safety-net-the-impact-of-cyberbullying-on-children-and-young", causing a red error message. What would be the best/correct way to handle this and others like it when i come across them? Thanks, Happy days, LindsayHello 15:44, 18 April 2020 (UTC)Reply

When citing tweets, use {{cite tweet}}. That template has some code in it that modifies urls in |title= to remove url schemes (http://, https://). This is adequate to suppress the external link error though I think can (should) be done better though editors at {{cite tweet}} have not chosen to do so. See Template talk:Cite tweet § urls in tweet titles.
Trappist the monk (talk) 16:19, 18 April 2020 (UTC)Reply
Thank you so much; i was certain there was an approved way, and this knowledge will help me gnome more successfully! Happy days, LindsayHello 19:48, 18 April 2020 (UTC)Reply

The new categories

edit

Hello! :)

Can you explain to me a bit what the 2 newly added categories serve for? I read their descriptions but I'm still a bit confused. As always, I just want to make their Albanian counterpart have a correct translation.

I'm a bit confused how can an author, translator, etc. have an only numeric name. O.o Maybe I've misunderstood that detail.

As for the ref=harv category, we've already discussed that in these past days but you know I have difficulties with the SFN templates, so I don't really understand its purpose. - Klein Muçi (talk) 14:41, 20 April 2020 (UTC)Reply

I think that the number of new categories is six; five numeric names and one ref=harv.
The parameter / value pair, |ref=harv, is no longer needed to connect short-cite templates (the {{sfn}} and {{harv}} families) to cs1|2 templates. As I write this, at en.wiki there are 56,600+ articles that use this now superfluous parameter / value pair. At sq.wiki there are a mere 220+. We created the category and its associated message so that editors here can see where these superfluous parameters are and so remove them or choose a better value.
If you have that abomination that is visual editor, it uses WP:CITOID to fetch citation data from a variety of sources by scraping those sources. A great offender in this is WorldCat which has poorly curated metadata that VE merely drops into cs1|2 templates and calls good. To gauge the scope of this problem, we are categorizing cs1|2 templates that have name-holding parameters that do not have letters; digits and punctuation only like this one from sq:Lili Boulanger possibly scraped from <meta property="og:author" content="Lili Boulanger (1893-1918)" />:
{{Cite web|url=http://data.bnf.fr/13952357/lili_boulanger_les_sirenes/|title=Les sirènes - Lili Boulanger (1893-1918) - Work - Resources from the BnF|last=(1893-1918)|first=Lili Boulanger|date=1911-01-01|website=data.bnf.fr|access-date=2016-03-12}}
(1893-1918), Lili Boulanger (1911-01-01). "Les sirènes - Lili Boulanger (1893-1918) - Work - Resources from the BnF". data.bnf.fr. Retrieved 2016-03-12. {{cite web}}: |last= has numeric name (help)
|last=(1893-1918) is an improper use of |last= – not a name (there are other problems with that citation ...)
Because the category catches name-holding parameters with punctuation-only values, templates like this from sq:Pierre Simon Laplace are caught (likely human editor caused):
{{ cite journal | author=— | year=1982 | title=The development of the Laplace transform | journal=Archive for the History of the Exact Sciences | volume=26 | pages=351–381 | doi=10.1007/BF00418754 }}
— (1982). "The development of the Laplace transform". Archive for the History of the Exact Sciences. 26: 351–381. doi:10.1007/BF00418754. {{cite journal}}: |author= has numeric name (help)
In this case, the citation does not name an author (it should). To mask the author name the citation should use |author-mask=1 and name the author: |author=Deakin, M. A. B..
These examples found from sq:Kategoria:Mirëmbajtje_CS1:_emra_shifrorë:_lista_e_autorëve.
Answer your questions?
Trappist the monk (talk) 15:35, 20 April 2020 (UTC)Reply
Yes, six. I said 2 because of the new changes of code done in the configuration page. 5 categories are "automatic", if you know what I mean. Although I'll have to create all of them.
So I do understand now that the numeric names are created by errors in different situations. (I'm always baffled by seeing in how many wrong ways - you haven't thought before - you can actually twist something. But I'm still not clear on the ref=harv category. Can you give me an example of a citation that would appear there and explain exactly what the culprit is and how it is fixed? - Klein Muçi (talk) 16:11, 20 April 2020 (UTC)Reply
These two working short-cites:
{{harvnb|Blue|2020}}Blue 2020
{{harvnb|Violet|2020}}Violet 2020
link to these two full-cites:
{{cite book |title=Title |author=Blue |date=2020 |ref=harv}}
Blue (2020). Title. {{cite book}}: Invalid |ref=harv (help) ← this one, were it in mainspace, would be in Category:CS1 maint: ref=harv because it has |ref=harv
{{cite book |title=Title |author=Violet |date=2020}}
Violet (2020). Title. ← this one is not categorized
Both links work even though only one has |ref=harv. In the old days before the update, the Violet 2020 link would not have worked because in the old days before the update, cs1 templates required |ref=harv.
Now |ref=harv is a left-over from the old days before the update. It is not needed. The category and maintenance message tell editors where |ref=harv parameters are located. Editors can then remove |ref=harv or use better / different values (|ref=none for example).
Trappist the monk (talk) 16:50, 20 April 2020 (UTC)Reply
Soo... All the citations I did some days ago at SqQuote (that we discussed here) that use ref=harv are... "wrong"? :P - Klein Muçi (talk) 18:05, 20 April 2020 (UTC)Reply
Yes and no. Yes they are wrong because |ref=harv is now superfluous and serves only to increase wikitext clutter. No they are not wrong because leaving those parameters in-place does no harm, the templates all work as they should. I did warn you that |ref=harv would become superfluous and offered a patch that you could apply to cs1|2 that would have removed the requirement to include |ref=harv in cs1|2 templates. cs1|2 was not patched so |ref=harv was required. But, with the category and the maintenance messages, you know exactly where those superfluous parameters are.
Trappist the monk (talk) 18:34, 20 April 2020 (UTC)Reply
Roger that. I just wanted to make sure I had understood everything you said. Now everything is clear. Thank you! :) - Klein Muçi (talk) 18:41, 20 April 2020 (UTC)Reply

Ref=harv

edit

Thank you. But you can't go around doing this to all articles. We need ref=harv for the warning scripts to work. Specifically we need three things:

  • (a) a warning when we use a short cite (sfn/harvnb) without a corresponding long one;
  • (b) a warning when we use a long one as a source (i.e. with ref=harv) without a corresponding short one; and
  • (c) no warning when the template is in Selected works, Bibliography/References with manual short cites, or Further reading (and therefore does not have ref=harv).

We had that functionality before the change. The alternative now is to stop using templates; disable the scripts and try to spot the errors manually, which is time-consuming with lots of citations; or put up with the big brown error messages.

Would you please revert your change to the templates, then open a site-wide discussion about whether to make the change? I'm going to ping RexxS, who has commented on this elsewhere in case he can add anything. SarahSV (talk) 23:36, 21 April 2020 (UTC)Reply

You're right, I can't, and I won't. Fortunately all articles don't need such service.
I would add a fourth item to your list (both here and at Wikipedia:User scripts/Requests § Script-assisted References (i.e. "Works cited" etc) vs Further Reading (incl. "External links" etc) cleanup):
  • (d) no warnings at long-cite templates when the article has no short-cite templates
The case that was George Washington and slavery before Editors Jonesey95 and Aa77zz tweaked §§Bibliography and Further reading (this version) would be answered by this item.
In German, French, and Spanish I can count to ten, and that just about demonstrates my entire knowledge of those languages. I have just about as much knowledge of the JavaScript language; enough that I could tweak my copy of Ucucha's HarvErrors.js to mute the warning messages when the article does not have short cites. Anything more complex, is outside of my current capabilities. Since you have created the request at WP:SCRIPTREQ, this conversation is best continued there.
Trappist the monk (talk) 13:38, 22 April 2020 (UTC)Reply

Template talk:Infobox ship

edit

Given you took time to consider the request, your thoughts on whether or not it should be implemented would help. It's a benign request that seeks conformity with the Manual of Style and has no effect on how the infobox displays. Thanks,--Goldsztajn (talk) 16:05, 23 April 2020 (UTC)Reply

do not use {{dn}} in cs1|2 templates;

edit

Hi, You reverted an edit of mine on George Grey with the comment "do not use [disambiguation needed] in cs1|2 templates;". What would be te best way to indicate that James Milne points to a dab page, when it is within this citation template?— Rod talk 15:00, 29 April 2020 (UTC)Reply

Were it me, I'd put it at the end of the citation between }} and </ref>. This, much the same way we deploy {{dead link}} ...
Trappist the monk (talk) 15:09, 29 April 2020 (UTC)Reply
OK I've done that manually - but I do most of these using Dispenser or other semi-automated tools which don't always display clearly that the dab is within a CS1 or other template.— Rod talk 15:15, 29 April 2020 (UTC)Reply

Statistics

edit

Hello, Trappist!

I was wondering if you can help me achieve something. As you may or may not remember from an old conversation we've had, I use the CS1 module to extract data and create statistics regarding citations in our community. Until now, we've used it once for languages but the idea for the future is to use it for errors and other maintenance purposes. Transforming category page numbers into pie charts helps with the visualization and makes seeing progress easier, which in turn, helps with the "gamifying" effect on solving CS1 errors. Take a look here for an example of what I'm saying. Click the external link.

That approach has some rough sides that could be polished a bit though. For example, when dealing with languages, the process becomes too time consuming, given that there are more than 50 language categories in SqWiki that have at least one article in them. I have to manually extract every value one by one for each language category, local and foreign, (+ one for unknown language parameters + one for using no language parameter) and put them in a third party page with their corresponding name only to create a pie chart for a one-time-use. Not to mention the hassle of finding online pages that provide free graphics that work with over 200 entries. Although I know that statistics like these are out of the actual scope of the module, is there a way maybe you can help me with this process? Maybe by teaching me of a way to extract values quicker from categories and compiling tables with them in any format? Maybe by teaching me any tool I might be not aware of helping me create and share the graphs easier? What are the capabilities and tools we have at our disposal, in your knowledge, that help in the "WikiWorld" with statistics and diagrams? Maybe I'm doing this the hard way when there are better options? Strangely enough, I've rarely seen these kind of stats incorporated somewhere in EnWiki although you deal with large quantities of data quite often. Wouldn't these kind of analyses help with the work in maintenance categories in general?

This would probably be a better question for VPT I think but I started this conversation here because for the moment being, in SqWiki, this approach I talk about can only be taken with the CS1 categories since, unfortunately, we don't have a lot of well-working maintenance categories apart from those, so I wanted to get your opinion on the matter first and maybe I go there after. - Klein Muçi (talk) 11:16, 26 April 2020 (UTC)Reply

Here are a couple of options:

 Sanskrit: 298 (0.4%)Sardinian: 19 (0.0%)Sindhi: 147 (0.2%)Northern Sami: 96 (0.1%)Serbo-Croatian: 1,860 (2.8%)Sinhala: 332 (0.5%)Slovak: 6,181 (9.3%)Slovenian: 5,420 (8.1%)Samoan: 59 (0.1%)Somali: 376 (0.6%)Albanian: 5,010 (7.5%)Serbian: 10,499 (15.7%)Sundanese: 12 (0.0%)Swedish: 35,585 (53.3%)Swahili: 835 (1.3%)
  •   Sanskrit: 298 (0.4%)
  •   Sardinian: 19 (0.0%)
  •   Sindhi: 147 (0.2%)
  •   Northern Sami: 96 (0.1%)
  •   Serbo-Croatian: 1,860 (2.8%)
  •   Sinhala: 332 (0.5%)
  •   Slovak: 6,181 (9.3%)
  •   Slovenian: 5,420 (8.1%)
  •   Samoan: 59 (0.1%)
  •   Somali: 376 (0.6%)
  •   Albanian: 5,010 (7.5%)
  •   Serbian: 10,499 (15.7%)
  •   Sundanese: 12 (0.0%)
  •   Swedish: 35,585 (53.3%)
  •   Swahili: 835 (1.3%)


and, they're free.

I rather prefer the first one because data, labels, and other properties of a slice are all together there. That form makes it easy to do as I have done and exclude certain values – in this case, values less than or equal to 10. I also prefer the tooltip over slice-highlighting when hovering the mouse pointer.

Trappist the monk (talk) 14:39, 26 April 2020 (UTC)Reply

Wow! Are they dynamic also? Does the data in the charts synchronize with the changes in the category? - Klein Muçi (talk) 15:05, 26 April 2020 (UTC)Reply
Yes, these ones do. But, like all things wiki, page refreshes required to get latest data.
Trappist the monk (talk) 15:06, 26 April 2020 (UTC)Reply
Thank you! <3 You've saved me a lot of time! Now I only have to learn the syntax above. But, can it accept 100 - 200 categories as entries? Talking about the language case, the extreme situation. Even if it can't, it's still better than the option I had. So I'm glad nonetheless.
Since we're here, is there any reason why EnWiki doesn't like using much "options" (charts) like these? Or are they reserved in any specific place I haven't looked yet? I think using them on maint category pages would be a good idea but maybe you know more than me in that direction. - Klein Muçi (talk) 15:24, 26 April 2020 (UTC)Reply
The doc for Module:Chart says that there are 26 pre-defined colors and that if you want more, then each new slice has to have its color assigned. There are examples on the module doc page that show 26 slices. As long as the value of each slice is approximately the same as all of the other slices, that works ok for that many slices. But, when the range in values is zero to multiple thousands per slice, so many slices quickly become, I think, unhelpful. Better, isn't it, to have multiple charts covering different value ranges?
Trappist the monk (talk) 16:33, 26 April 2020 (UTC)Reply
I see. Thank you one more time! :) Maybe I come soon enough again asking for a bit of help to implement it for the first time but let's hope that's not the case. - Klein Muçi (talk) 17:36, 26 April 2020 (UTC)Reply

So... I was just testing it here to get a bit used to it. What am I doing wrong? :P - Klein Muçi (talk) 17:58, 26 April 2020 (UTC)Reply

{{PAGESINCATEGORY:CFaqe me burime në anglisht (en)|pages|R}} does not exist: 'CFaqe'
The Latin cat has 10 and the English cat has 1345 so these (corrected
{{#ifexpr: 10 >= {{PAGESINCATEGORY:Faqe me burime në latinisht (la)‎|pages|R}}||( {{PAGESINCATEGORY:Faqe me burime në latinisht (la)|pages|R}} : latinisht )}}
{{#ifexpr: 10 >= {{PAGESINCATEGORY:Faqe me burime në anglisht (en)|pages|R}}||( {{PAGESINCATEGORY:Faqe me burime në anglisht (en)|pages|R}} : anglisht )}}
reduce to:
{{#ifexpr: 10 >= 10||( 10 : latinisht )}}
{{#ifexpr: 10 >= 1345||( 1345 : anglisht )}} → ( 1345 : anglisht )
Sufficient to get you unstuck?
Trappist the monk (talk) 18:15, 26 April 2020 (UTC)Reply
Oh, just that extra C... I'm not used to getting that kind of error message. Since I deal mostly with citations, usually when that error message appears, it is something wrong with the module's code, not with the way you're using it (other kind of errors appear then, if you understand what I'm trying to say) and that got me confused and I was looking at the module's code. Thank you! I'll try to use the full range of categories now and if I encounter any last problems, I'll come one last time for help. Hopefully not. :) - Klein Muçi (talk) 18:40, 26 April 2020 (UTC)Reply
Hey, I just finished working with the categories and I encountered no problems whatsoever. My results (although I don't think you'll be curious :P ). But I had a few "suggestions", not sure if you can help with those. First of all, is there any way to remove the gray background? Even though the second pie chart wasn't that dynamic with the legend, I liked it more from the visual perspective because of that one detail (and the colors but that's a small detail). Also regarding the legend... I see that your legend is grouped in more than 1 column. That's not true for me. How do I do that? Or is that kind of automatic formatting? Or maybe putting the legend at the side of the chart would be better? Staying at the documentation part, I saw there you could put links in the chart. Can I make it so the entries on the legend work as links to the corresponding categories? If so, how do I do that? And finally, is there any way to link between the chart and the legend back and forth while giving way to more visualization? For example: I click at one particular color at the legend and the whole entry becomes bigger/bold/any other method that draws attention while the corresponding slice pops up from the other pieces. (That would be the best, so we could see the small slices, but anything that works as a selection method would be a good choice.) I click at one slice in the pie and it pops up from the other pieces while the corresponding legend entry becomes bigger/bold/etc. Meanwhile the screen moves to accommodate the data study. Like, when you click a far below entry from the legend, the screen moves to get you to the pie chart and when you click a slice from the pie chart, the screen moves to show you the corresponding entry. Similar to what happens when you link between different sections into the same article. Can any of these functions be added to that? - Klein Muçi (talk) 23:17, 26 April 2020 (UTC)Reply
Can you also take the time to explain to me how the code works in general for slices? I mean this part:{{#ifexpr: 10 >= {{PAGESINCATEGORY:Gabime CS1: mungon parametri i gjuhës‎|pages|R}}||( {{PAGESINCATEGORY:Gabime CS1: mungon parametri i gjuhës|pages|R}} : Gjuhë e papërcaktuar )}} I understand it more or less but I want to be well-informed on this since I expect to use it more in the future. - Klein Muçi (talk) 23:27, 26 April 2020 (UTC)Reply
The shading comes from File:Circle frame.svg. The normal background color for Wikipedia pages is #FFFFFF (white). Because that file is a .svg file, you can look at its source (right mouse → view page source). In there you will see <path fill="#F9F9F9" ... That #F9F9F9 is not white. Best way to fix that? Don't know. Certainly the easiest is to make a sq.wiki local copy. Then in the local copy use <path fill="#FFFFFF" ... . I experimented with your copy of the module by commenting out line 115 and previewing sq:Përdoruesi:Klein_Muçi/Livadhi personal. There is a purpose for that frame image. It hides some stuff. You might want to try that experiment to see what I saw.
The legend adapts itself to the width of the chart. The radius of my chart is 200px so the module could fit another column under it. I tried a couple of things to force the legend to do more columns or move to the side. Neither were successful so I'll have to think on that a while; may require rewriting parts of the module to support that.
Links from the pie slices to the matching category is possible but you lose the informative tool-tip. That might be fixable with some tweaks to the code. Linking from slices to their matching legends could be done but seems somewhat unnecessary because the tool-tip holds the same information. To add a link to the category from a slice, first add the |delimiter=;. This is necessary because the colon in the category link confuses the module. Then rewrite each slice-properties line so that it looks like this (note the delimiter change):
{{#ifexpr: 10 >= {{PAGESINCATEGORY:Faqe me burime në shqip (sq)‎|pages|R}}||( {{PAGESINCATEGORY:Faqe me burime në shqip (sq)|pages|R}} ; Gjuhë shqipe ; ; [[:Category:Faqe me burime në shqip (sq)]])}}
All of that bigger/bold/any other method that draws attention ... probably not possible.
The magic word {{PAGESINCATEGORY:Faqe me burime në shqip (sq)|pages|R}} returns the number of pages in Category:Faqe me burime në shqip (sq); the pages keyword limits the count to pages only (categories can also contain files and other categories; the R keyword excludes separator characters from the returned number: 1234 not 1.234.
that reduces the expression to:
{{#ifexpr: 10 >= 2861||( 2861 ; Gjuhë shqipe ; ; [[:Category:Faqe me burime në shqip (sq)]])}}
The parser function {{#ifexpr:}} evaluates the expression 10 >= 2861. If 10 is greater than or equal to 2861 (number of pages in the category), the return value is nothing (the value in the || – in this case nothing but could be other text). Because 10 is not greater than or equal to 2861, the return value is ( 2861 ; Gjuhë shqipe ; ; [[:Category:Faqe me burime në shqip (sq)]]) which the value that Module:Chart operates on.
Trappist the monk (talk) 12:13, 27 April 2020 (UTC)Reply

Yes, I saw that when experimenting with the code hoping to fix the links and the chart malfunctioned. Scary. :P If I upload the same image without the shading and change the line 115 to interact with the new image instead, would it be a good solution of removing the shading without displaying what must not be displayed? :P Is that what you suggested me to do anyway? As for the "code translation", thank you for your explanation! Very clear. What other keywords can we put instead of "pages"? Maybe "subcategories"? Or does changing it require removing it, not literally changing it? And sorry for the added curiosity but why the letter R?

Finally, if you ever find the time to experiment/enhance the chart module, or any other module related to it, know that I'd be interested so I would appreciate a ping about that. Whenever that may be, if ever. :) - Klein Muçi (talk) 13:37, 27 April 2020 (UTC)Reply

I think that creating a new File:Circle frame.svg file as a different name and with fill="#FFFFFF" and changing line 115 to reflect that new name should work. It's as good a solution as I can imagine right now.
The keywords are defined in the documentation: all, pages, subcats, files.
Keyword R is required because digit-grouping separators confuse {{#ifexpr:}}.
Trappist the monk (talk) 14:05, 27 April 2020 (UTC)Reply
Thank you! For the R part I didn't make myself clear. I meant why "R" and not "S" since we're talking about separators, for example? Why that particular letter? Is there any reason, you know of, behind it? - Klein Muçi (talk) 14:41, 27 April 2020 (UTC)Reply
Oh, it stands for "Raw numbers". Only now I opened the documentation page. Thank you! :)) - Klein Muçi (talk) 14:44, 27 April 2020 (UTC)Reply
I finished working with the chart. Everything works as it should. I have only problem now and that's the legend part. On its own, we can say it's good but used like I have in here, it could really benefit from a side legend similar to the second example you gave me. To be honest, I like the second one better from the aesthetic side (slice colors, legend rendering in its details) and I'd go on and use that if it wasn't for the missing linking feature. (Although I do understand that's completely a different thing from a technical point of view and I'd have to deal with the code from scratch.) If you ever are able "fix" that detail about the legend positioning, please ping me.
1 more question: I don't think it would be possible to have percent numbers in the slices, would it? For example: 50%, 35%, and the rest of the slices are grouped together in 15% (keeping their own colors). Or maybe just the biggest slices? - Klein Muçi (talk) 19:18, 27 April 2020 (UTC)Reply
Also, assuming I'd like to raise the number of maximum slices, all I would need to do is add to the number of colors at Module:Plotter/DefaultColors? Or would there be extra steps to be taken besides that? - Klein Muçi (talk) 22:41, 27 April 2020 (UTC)Reply
I spent some time yesterday thinking about how to move the legend to the side without making any real progress. I also spend some time thinking about how it should be possible to interleave all of the 216 web-safe colors into a list where adjacent colors in a pie can be distinguished one from another. I made some progress with that. I still think that more than about twenty slices practically meaningless because the slices are so small that they get lost in the noise.
There is no reason why you can't use the other charting tool. My objection to {{Graph:Chart}} is that it has separate lists for values and legends so the two can become unsynchronized. A way around that might be to write a module that takes as input a list of category names. The module would make a table of category counts and associated legends and then supply extracts from that table to the graph template.
Trappist the monk (talk) 13:32, 28 April 2020 (UTC)Reply

I see. Thank you for trying to deal with it! :) Well, I guess for the moment being I'm good with the first method. Which would be even better if those added functionalities would be added. The only reason I liked the second option was because of the visual side, the colors and legend "flags" were better (in my opinion) and the side legend was a big plus. As for having bigger entry lists, I totally agree with what you say regarding slices. (That was what I was thinking yesterday too and that's why I asked for the "grouped slices" with percentages on top of them.) But bigger lists would serve for 3 reasons, mostly all of them connected to charts being used with categories like I've done. Firstly it would make the legend work as a complete list of the entries involved (which, in many times regarding maint categories is what you want to have because you want to have a complete list of the things that need to be fixed - imagine excluding tens of categories that have only 8 pages on them, soon after you'd have 80 - 160 pages, or more depending on the excluded categories, to fix that are never addressed this way), secondly and most importantly, it would not "crash" the chart if more than 26 entries start existing (I write "start existing" because if you've seen the way we've set up our chart, you will have seen that we've used more than 180 entries for it but fortunately only 25 are currently represented in the chart because of the >9 expression - if more start existing then the only choice we'll have for the future will be to raise that limit and this will make the problem in the aforementioned point even bigger) and thirdly it affects the data in percentages (the chart only shows the percentage of the entries used in the chart - obviously - and doesn't include in the percentage the categories that are excluded, so that "noise" is totally missing from the data statistics, affecting bigger slices in the process). But all these belongs to the future if you or someone else can ever upgrade that module. Thank you for what you've done until now! :) - Klein Muçi (talk) 16:41, 28 April 2020 (UTC)Reply

Fun question: What trick can I use here (if any) to make the charts appear in a more organised way? I tried using a table but the results weren't that good. The order doesn't matter. This is just for personal use so take your time to answer it. :) - Klein Muçi (talk) 16:07, 4 May 2020 (UTC)Reply

one way might be:
{| 
|style="vertical-align:top"|{{Grafiku i kategorive të mirëmbajtjes CS1}}
|rowspan="2" style="vertical-align:top"|{{GGJB}}
|-
|style="vertical-align:top"|{{Grafiku i kategorive të gabimeve CS1}}
|}
Trappist the monk (talk) 17:05, 4 May 2020 (UTC)Reply
Much love for you! <3 - Klein Muçi (talk) 20:05, 4 May 2020 (UTC)Reply

pie chart experiment

edit
 Category:CS1 Arabic-language sources (ar)Category:CS1 Japanese-language sources (ja)0+186 others: 0 (0.0%)
  •   Arabic: 1 (50.0%)
  •   Japanese: 1 (50.0%)
  •   0+186 others: 0 (0.0%)

Here is an experiment that I've hacked that takes the whole list of categories in Category:CS1 foreign language sources (188 of them), gets the number of pages in each and extracts a legend from the category name. Then, the results are sorted in a descending sort. The first 25 are charted and the remaining are tallied into an 'others' group.

Trappist the monk (talk) 10:37, 29 April 2020 (UTC)Reply

That's very good! I like the results a lot! But why are the others expressed as 146+17? - Klein Muçi (talk) 12:11, 29 April 2020 (UTC)Reply
17 empty cats
Trappist the monk (talk) 12:33, 29 April 2020 (UTC)Reply
Ooh, I see. 1 more question: Theoretically, if all the categories were empty, what would happen with the chart? - Klein Muçi (talk) 12:48, 29 April 2020 (UTC)Reply
Module:Chart chokes and dies; can't make a whole pie from a finite number of zero-width slices. Error handling in that module leaves a lot to be desired.
Trappist the monk (talk) 13:20, 29 April 2020 (UTC)Reply
I see. But it seems as a better option than the actual graph that I made. Using simple explanations, how can I have the same result at SqWiki? - Klein Muçi (talk) 14:44, 29 April 2020 (UTC)Reply
And by the way, I don't believe the legend position is "fixed" now, is it? - Klein Muçi (talk) 15:01, 29 April 2020 (UTC)Reply
If by legend position is "fixed" you mean that it can now be moved to the side, it is not fixed because its position is 'fixed' to below the chart. I haven't revisited the legend-position issue.
Trappist the monk (talk) 15:30, 29 April 2020 (UTC)Reply
If you mean to use Module:Sandbox/trappist the monk/cat chart properties at sq.wiki then I'm going to say not ready yet. But, if you want, you can certainly import it and play with it. New code seldom survives first contact with real life so you playing with it will be beneficial.
The module takes three four named parameters:
|link= – takes a single value yes to create links to the categories in the pie slices
|delimiter= – must be the same as |delimiter= for Module:Chart; defaults to colon; may be omitted when not required
|pattern= – a lua pattern to extract legend text from category name; in my example, CS1 (.+)%-language, the capture value, (.+), is the language name; if omitted, legend is full category name without namespace
|selector={{PAGESINCATEGORY:<category name>|<selector>|R}}</nowiki> may be one of all, pages, subcats, files; defaults to pages
Category names without namespace are listed in individual positional parameters
Trappist the monk (talk) 15:30, 29 April 2020 (UTC) 14:04, 30 April 2020 (UTC) +|selector=Reply

I see... Well Lua is not yet my strongest point in Wiki editing, as you may have already noticed, (at least in it I suck a bit less than in Javascript) so I wouldn't be much of help in that direction. I thought maybe I could put it to use directly but since you say it's not ready yet, then... Maybe the future will hold better news for me. Thank you for demonstrating patience and true volunteering spirit in every one of my requests! :) - Klein Muçi (talk) 23:01, 29 April 2020 (UTC)Reply

Ought to be usable now. I've added |selector= and error reporting. Error conditions are indicated with a single slice in the standard en.wiki error color #d33. There is a tooltip message that can be one of:
error no slices – when Module:Sandbox/trappist the monk/cat chart properties called without positional parameters (slices)
error duplicate names <duplicate name> – when one or more of the positional parameters have the same name
error slice values all zero – when none of the slices is non-zero (all categories empty)
I would recommend modifying your Module:Chart line 41. Change from:
if #legends > 1 and not hideGroupLegends then
to:
if 0 ~= #legends and not hideGroupLegends then
As it is now, a single slice does not get a legend. I think that all slices should have legends unless they are disabled with |hide group legends=yes.
Trappist the monk (talk) 14:04, 30 April 2020 (UTC)Reply
Oh, thank you! So, what would be my course of action now? I should get the module from your sandbox or have you fused the code in there with the chart's module's code? If I do get it from your sandbox, how should I name it? I'll ask for other details after these are answered. :P :) - Klein Muçi (talk) 12:12, 1 May 2020 (UTC)Reply
Not part of Module:Chart. Name it anything that you'd like. I don't imagine that I will publish this code to en.wiki.
Trappist the monk (talk) 12:46, 1 May 2020 (UTC)Reply
Okay then. Assuming I did get the code and changed line 41 in Module:Chart, what exactly I must do to the chart's template in SqWiki? - Klein Muçi (talk) 14:30, 1 May 2020 (UTC)Reply
That seems to be a chart that mixes different things; missing |language=, unknown languages, and ISO 639-2/-3 codes with the list of ISO 639-1 language names. Should you be mixing things that way?
First:
|slices={{#invoke:Sandbox/trappist the monk/cat chart properties|cat_info_get |link=yes |delimiter=; |pattern=CS1 (.+)%-language|selector=all
your template links the pie slices so |link=yes
because you include sq:Kategoria:Gabime CS1: mungon parametri i gjuhës you must use |delimiter=; which must be the same as the same parameter used in the call to Module:Chart
because you are using the all selector in {{PAGESINCATEGORY:}} set |selector=all
no need to use the complete category name in legends so set |pattern=Faqe me burime në ([^%(]+) %(%l%l%)
this extracts and returns the language name (the ([^%(]+) part of the pattern) for the legend
Second:
create a positional parameter for each category without the Kategoria namespace
starting out with just a few might be helpful ...
Third:
close the {{#invoke: with }}
That should be it ...
Trappist the monk (talk) 15:39, 1 May 2020 (UTC)Reply

So, I imported that module in Module:Chart/cat properties and I changed line 41 at Module:Chart. I then imported the template at my sandbox and I'm working there. I added the "slices code" but I'm having difficulties with it. First I'm not totally sure if I should use the |Pattern= parameter because, as you noticed, the chart is mixed and it is supposed to be like that. (I've created a category dealing with everything related to the |Language= parameter in CS1 templates.) So if I understand it correctly the pattern is broken, no? Keeping that in mind, can you take a look at my sandbox and see if the first part of code is correct? (Ignore the rest of it as I'm yet to work with it.) If it is, should I be adding every single category in this format: Category:X|Category:Y|Category:Z|...? - Klein Muçi (talk) 03:19, 2 May 2020 (UTC)Reply

|Pattern= will not work; the module accepts only lowercase parameter names. I have tweaked the module code so that when the pattern matches the cat name, the legend is the pattern's capture; full cat name else. I guess that you have to approve these edits.
No. Leave off the namespace so |X|Y|Z
Trappist the monk (talk) 11:47, 2 May 2020 (UTC)Reply
Here a regex find and replace that will make creating the list from the current markup easier:
Search for: *\{\{[^\[]+\[\[:Kategoria:([^\}]+\(\w\w\))[^\n\r]+
Replace with: $1
this works with the search and replace tool in the wikitext editor
Trappist the monk (talk) 12:02, 2 May 2020 (UTC)Reply
Yeah, about that... It's been some months I'm missing certain features from editing. That search and replace tool included. I also miss the syntax highlighter, which has made editing code seem like another circle in the Dante's Inferno, and the numbered lines when editing modules. I've been busy dealing with other wiki things and I haven't had time to find how to fix these problems, most probably related to preferences. I was planning to do a Google search about it tomorrow but maybe you know a shortcut? :P NavPopups and Content Translation Tool don't work for me either for many months now unfortunately. I don't know if that's related. I've tried different configurations in the preferences (even in different browsers) and asked for help in the gadgets' and Mediawiki help pages but I found no solution. It all started when I couldn't edit pages in SqWiki. Xaosflux advised me to try and turn off the Visual Editor and when that didn't help immediately, we tried turning off other preferences related to editing and while doing this the problem was solved, not sure why. Maybe it was the VE, I just didn't wait enough time for the change to take place. Since then, I've had the problems described above when editing in SqWiki. If you have any tips, I'd appreciate that, if not, I'll go on and try to use a third party regex tool. I'll also approve your edits on the module. Thank you! :) - Klein Muçi (talk) 12:30, 2 May 2020 (UTC)Reply
At the far left of the module code editing window is an icon that looks like <>. Click that to get syntax highlighting and line numbers. At sq:Speciale:Preferencat#mw-prefsection-editing is "Aktizoni redaktimin e zgjeruar të shiritit të mjeteve" checked? Syntax highlighting for wiki text editing is controlled by the pencil icon (next to advanced menu dropdown on the tool bar). I don't use nav popups or the content translation tool so can't help with those.
Trappist the monk (talk) 12:52, 2 May 2020 (UTC)Reply
Well, that's the problem. I don't have that toolbar so I have neither of those signs. I have that preference checked in my global preferences though. - Klein Muçi (talk) 14:15, 2 May 2020 (UTC)Reply

I was able to use online one free F&R regex tool and it worked very good. Here are the results. The legend needs 2 fixes, I think. Firstly the ability to move and then, I don't know if it can be done something for cases like Faqe me burime në gjermanisht (de) or Faqe me burime në boshnjakisht (bs). See how the number is forced to appear at the colors side. Secondly, I'm not totally sure where the module gets its colors from (Maybe by module "Plotter"?) but please, can you change the orange color "at the end" with something different? Is very hard to distinguish it from the first red color. Both our charts suffer from the same problem. - Klein Muçi (talk) 13:10, 3 May 2020 (UTC)Reply

(edit conflict)
The first three slices should not have the Kategoria: namespace designation. {{PAGESINCATEGORY:}} cannot find Category:Kategoria:Gabime CS1: mungon parametri i gjuhës‎ (double namespace designations).
The long category names wrap to the next line because the long category names are longer than the diameter of the pie. Making the pie larger is one solution. Alternately, you can avoid most of this by setting |pattern=Faqe me burime në ([^%(]+) %(%l%l%) so that the legend for most of the slices is only the language name. If used in a template, you might want to wrap the call to sq:Moduli:Chart in a <div>...</div> that holds a title so that readers can know what the chart means; perhaps like this:
<div style="float:{{{1|left}}}"><div style="text-align:center"><strong>{{{2|Title}}}</strong></div>{{#invoke:Chart|...}}</div>
For the color issue, you can, for example, swap the last two items in sq:Moduli:Plotter/DefaultColors so that zinnia occurs before xanthin; or pick some other color to swap with zinnia.
Trappist the monk (talk) 14:19, 3 May 2020 (UTC)Reply
Oh, I thought those 3 non-pattern-following entries should have the namespace but now I understand what you mean. I thought I had added the pattern parameter but now I see I had forgotten that. Actually I did add it but I removed it again as I liked it more like this, the legends seemed to have more uniformity. I also tried the div tags but since we're using some explanations along regarding the legend along with the title, I thought it would be better as it is, at the bottom of the chart so I removed those again. And I was able to easily fix the color problem. That's all for now. Thank you again! - Klein Muçi (talk) 15:03, 3 May 2020 (UTC)Reply

bar chart

edit

Assuming I'd want to make a bar chart (not sure yet if I ever use it outside of my sandbox), what am I doing wrong here? I'll add the links and x legends later. Mostly I just want to learn how to create the chart correctly. - Klein Muçi (talk) 01:55, 29 April 2020 (UTC)Reply

Several things:
left-to-right-marker character at the end of groups 5, 8, 15, 18 (U+200E)
missing group 3
Rsilver is not a color
missing |delimiter=; because BOT: gjendja e adresës origjinale është e panjohur has a colon
Mirëmbajtje CS1: Mirëmbajtje CS1: ASIN përdor ISBN is not a category name
groups, colors, and group names must all have the same number of items
Trappist the monk (talk) 10:15, 29 April 2020 (UTC)Reply

Can you take a look again? I had trouble with the U+200E characters. I think I fixed most of the problems, though. - Klein Muçi (talk) 11:54, 29 April 2020 (UTC)Reply

left-to-right-marker character now at the end of groups 4, 7, 14, 17. Put the text cursor between the } and } at the end of the group 3 line. Press and then again. Cursor moves to the start of the group 4 line. Do the same at the end of the group 4 line; the cursor does not move to the start of the group 5 line; that's the left-to-right-marker; press ← Backspace to delete it.
Trappist the monk (talk) 12:07, 29 April 2020 (UTC)Reply
Thank you! It works now! Any tool to be able to find these characters easily in the future? Or just the blind method described above? - Klein Muçi (talk) 12:16, 29 April 2020 (UTC)Reply
Better would be to omit them when constructing the template call in the first place. Where did you get those particular category names? Did you use an external editor?
Trappist the monk (talk) 12:37, 29 April 2020 (UTC)Reply
Just copy-pasting from the main maintenance category of CS1. - Klein Muçi (talk) 12:50, 29 April 2020 (UTC)Reply

A barnstar for you!

edit
  The Technical Barnstar
For your continuous and tireless help in technical matters regarding citations and more. Klein Muçi (talk) 20:08, 4 May 2020 (UTC)Reply

Need help to solve a issue on the Macedonian Wikipedia

edit

Hi Trappist the monk, I have implemented the Module:Citation/CS1, and all the other modules that go with it, the issue that I have is with a categories that show up in articles for alleged CS1 maint: unrecognized language and the other categories like CS1 англиски-language sources (en). This are not mistakes in our Wikipedia and will be very thankful if you can spare some of your time to look up in our modules and make changes to the code to hide this categories or remove the code that puts this categories. Thank you Инокентиј (talk) 12:56, 6 May 2020 (UTC)Reply

mk:Category:CS1 maint: unrecognized language holds articles where |language= names a source's language in a way that isn't recognized by MediaWiki for mk.wiki. I picked an article at random from that category: mk:Алекс Сандро. In that article, there are four citations that show the unrecognized language message. The first three show the unrecognized language message because the value assigned to |language= is a template. |language= accepts language names in your language or ISO 639 language codes for languages that are supported by MediaWiki. The html and category wikilinks produced by the {{it}} and {{pt}} templates is not a language name or code that Module:Citation/CS1 will ever recognize.
  1. mk:Алекс Сандро#cite_note-1|language={{it}}(италијански)
    <span class="languageicon" style="font-size:0.95em; font-weight:bold; color:#808080ff;">(италијански)</span>[[Категорија:Статии со надворешни врски на италијански]]
  2. mk:Алекс Сандро#cite_note-10|language={{pt}}(португалски)
    <span class="languageicon" style="font-size:0.95em; font-weight:bold; color:#808080ff;">(португалски)</span>[[Категорија:Статии со надворешни врски на португалски]]
  3. mk:Алекс Сандро#cite_note-13|language={{it}}
  4. mk:Алекс Сандро#cite_note-33|language=Italian – language name written in English; not in Macedonian so not recognized as a language name
All of the above are unrecognized so are errors that should be repaired.
mk:Category:CS1 англиски-language sources (en) holds articles where |language= names a source's language as English. There are three in mk:Алекс Сандро:
  1. mk:Алекс Сандро#cite_note-23|language=en-GB
  2. mk:Алекс Сандро#cite_note-26|language=en
  3. mk:Алекс Сандро#cite_note-27|language=en-GB
These are recognized so are not errors. The language is rendered correctly in Macedonian: англиски.
You might consider adding these to mk:Корисник:Инокентиј/common.css:
.mw-parser-output span.cs1-maint {display: inline;} /* display Citation Style 1 maintenance messages */
.mw-parser-output span.cs1-hidden-error {display: inline;} /* display cs1|2 error messages */
The css will show cs1|2 error and maintenance messages.
You might also consider importing:
Template:Citation_Style_documentation/language/doc – lists all languages that MediaWiki and cs1|2 support
Module:cs1 documentation support – required for Citation_Style_documentation/language/doc, this module does the actual listing of language names and codes
Trappist the monk (talk) 14:17, 6 May 2020 (UTC)Reply
Thank you Trappist the monk, I see that and will be fixing it slowly because I dont have a bot to change those problematic 2000+ pages, also I dont have a bot to delete the dead link parameter in the citations that shows up in 3000+ pages. Still have a favor to ask about this categories from the module that show from which language the citations are. (examples:CS1 италијански-language sources (it), CS1 португалски-language sources (pt), ) Is there a way this categories to be hidden or to not show at all. Thank you again for the speedy answer and the help.Инокентиј (talk) 15:33, 6 May 2020 (UTC)Reply
At en.wiki we have a template {{Tracking category}}. When we add that template to a cs1|2 error, maintenance, or property category here, that category is placed in Category:Hidden categories. Categories in Category:Hidden categories are not visible to readers. Categories in Category:Hidden categories are not visible to logged-in editors unless they have checked the 'Show hidden categories' (Прикажувај ги скриените категории) checkbox at Special:Preferences#mw-prefsection-rendering (mk:Специјална:Нагодувања#mw-prefsection-rendering). I do not know the mk.wiki equivalent name for the en.wiki Category:Hidden categories but there must be one.
Trappist the monk (talk) 16:06, 6 May 2020 (UTC)Reply
Sorry for interfering but why not just place the magic word for that? If they want a fast solution. Also Инокентиј seems to be confusing CS1 errors with maintenance categories, an error I've made too when I first started dealing with the module. @Инокентиј: The errors are what are shown beside the citations in red at the reference section while the maintenance categories are shown together with all the other categories of the article at the bottom of it (below references). When an article has a certain citation with a certain technical error, it renders an error message and the article gets automatically categorized in a certain category. So most of the times, they come together and can be confused. Especially if the category doesn't exist yet, it will be in red, similar to the error, and therefore help make the confusion worse. However if you fix the problem, the error, both the message and the category will disappear simultaneously, like they came. There are cases when maintenance categories are not coming from errors but rather properties of the citations and can't be really "fixed", as there is nothing to fix there, but most of the time you just need to solve the error to get rid of them. What I'm trying to emphasize here is that the right mindset should be about trying to find ways to solve errors efficiently, not how to "get rid of the categories". That comes by itself as a side effect if you deal with the errors. :) I deal with the CS1 module at the Albanian Wikipedia and we've set all our errors' categories not hidden so we can draw attention to them by our users so we can solve them. However, if you still want them to be hidden on the meanwhile, I'm sure Trappist will be able to help you, either by a template for it, or by the magic word for it itself. - Klein Muçi (talk) 21:47, 6 May 2020 (UTC)Reply
The magic word is __HIDDENCAT__.
Yeah, you can use just the magic word in a category but that by itself doesn't tell a casual editor who stumbles upon the category anything. The template adds enough text and links to at least offer some explanation about the what and the why. That is only a general solution, every cs1|2 category at en.wiki has additional text to further explain why the category exists and, where appropriate, offers suggestions to editors so that they can clear the category.
Trappist the monk (talk) 22:09, 6 May 2020 (UTC)Reply
Yeah, that's why I was a bit reluctant of suggesting that and I went on and on regarding the mindset of solving the problem. Ideally, worrying about removing the category in itself should be the last thing on the to-do list, even though it is usually the first with the majority of users worldwide. Sometimes though, given enough nerves, you can utilize that desire for removing categories as a fuel for solving the problems themselves (if errors showing aren't motivating enough :P ). It's usually a good motivating mechanism for small wiki-s, not sure about the large ones, given their large number of errors that will be present no matter what steps you take. - Klein Muçi (talk) 22:45, 6 May 2020 (UTC)Reply

Need help to solve an issue on the Balinese Wikipedia

edit

I need your help for revised Modul:Citation/CS1/Utilities. I have messages like this in all references Lua error in Modul:Citation/CS1/Utilities at line 54: bad argument #1 to 'message.newRawMessage' (string expected, got nil). I am not sure what's wrong. You can check also here ban:Burundi. Thank you in advance. Joseagush (talk) 05:08, 8 May 2020 (UTC)Reply

@Joseagush: Long story short, you need to update your module pages. Make sure you have all of the subpages listed here: Module:Citation/CS1 (including that one), you have the latest version of them (the ones in the sandbox might be the latest but the main ones are the most stable, you choose) and make sure you do the needed translations and other modifications to your wiki's need. The error will fix itself after that.
Module CS1 requires continued periodical maintenance because it's constantly on the change, adding new features and evolving so, if you leave it some months without checking, you're usually prone to get errors like that. It's good if you have one or more specific users from your wiki to be its maintainers and check periodically here for updates. Every 2-3 months would be a good period. Trappist is the expert here so he can talk you more specifically when he comes. :) - Klein Muçi (talk) 10:31, 8 May 2020 (UTC)Reply
The cause of the lua script error is ban:Modul:Citation/CS1/Configuration. That module appears to be a mix of old and new. For the errors in ban:Burundi, the module is looking for messages['archived-live'] which should be in ~/Configuration but is not.
I would add to what Editor Klein Muçi wrote. It is good practice to update from the en.wiki live modules to your sandbox modules. Make the changes that ban.wiki requires in the sandbox modules, test them, and then, update your live modules from your sandbox modules.
Trappist the monk (talk) 10:56, 8 May 2020 (UTC)Reply
Hi @Klein Muçi and Trappist the monk:, Thanks for the info. Its work. Joseagush (talk) 11:03, 8 May 2020 (UTC)Reply

Question about Lang Module

edit

Hi! I saw you seemed to be the user most familiar with Module:Lang, and I had a question about it. I'm doing some cleanup on a page with foreign text where the same text corresponds to two languages (e.g. ser humano is both the Spanish and Portuguese for human being). Is there an accepted (or expected) way to represent this properly using one {{lang}} template? Or should I (or must I) use two and duplicate the term (e.g. ser humano and ser humano)?

Thanks! Seoltoir22 (talk) 19:22, 8 May 2020 (UTC)Reply

The primary purpose of {{lang}} is to create correct html markup around non-English text in an English en.wiki article:
{{lang|es|ser humano}}<span title="Spanish-language text"><i lang="es">ser humano</i></span>
{{lang|pt|ser humano}}<span title="Portuguese-language text"><i lang="pt">ser humano</i></span>
The html standard does not support multiple languages in the lang= attribute. This makes sense because screen readers, for example, use the lang= attribute to determine how non-English text will be pronounced when verbalized.
Editorial creativity will be required so that use of both the Spanish and Portuguese text is marked-up for proper rendering (and machine pronunciation) so that it makes sense when read by English-speakers. I'm afraid that the template can't help you with that.
Trappist the monk (talk) 19:34, 8 May 2020 (UTC)Reply

Thank you for you polite and informative response

edit

To my error in reverting your edit on the citation at Chronic fatigue syndrome. I have reterted my edit. Ward20 (talk) 01:07, 28 May 2020 (UTC)Reply

Andrewl1995

edit

Hi Trappist the monk, you may like to have a look at Wikipedia:Administrators'_noticeboard/Incidents#Andrewl1995_reported_by_Smuckola. Best regards, ~ ToBeFree (talk) 00:52, 5 June 2020 (UTC)Reply