Template talk:Infobox book
![]() | This template was nominated for deletion or considered for merging. Please review the prior discussions if you are considering re-nomination:
|
![]() | Template:Infobox book is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Index
|
|||||||||
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III. |
Category:Pages to import images to Wikidata has been nominated for discussion
[edit]
Category:Pages to import images to Wikidata, which is populated by this template, has been nominated for deletion. A discussion is taking place to decide whether this proposal complies with the categorization guidelines. If you would like to participate in the discussion, you are invited to add your comments at the category's entry on the categories for discussion page. Thank you.
Mobile app bug
[edit]There seems to be a bug when the name
parameter is left blank. If the title contains an apostrophe, it appears broken into separate lines. The error is only visible when using the mobile app, as the desktop version does not show this error. R.L (talk) 20:04, 7 August 2024 (UTC)
- Please link to an affected article or other example page. – Jonesey95 (talk) 20:54, 7 August 2024 (UTC)
- Try I'm Glad My Mom Died. Upon further inspection, it appears that I may be wrong about fixing it with the
name
parameter. I have edited A Good Girl's Guide to Murder, and it still appears broken in the mobile app. R.L (talk) 23:58, 7 August 2024 (UTC)
- Try I'm Glad My Mom Died. Upon further inspection, it appears that I may be wrong about fixing it with the
Here are some screenshots taken from the mobile app:
- https://imgur.com/a/5ISPAqd
- https://imgur.com/a/YxGoiP1 R.L (talk) 00:04, 8 August 2024 (UTC)
- Thanks for the details, links and screen shots. Those will be helpful. What OS are you running on? I can't reproduce this in Safari on iOS, but it's clearly broken for you. Does it also happen if you log out? – Jonesey95 (talk) 05:00, 8 August 2024 (UTC)
- @Jonesey95
- I am using the Android app Version 2.7.50495-r-2024-07-23. It is still broken, even when I log out. Thanks! R.L (talk) 14:21, 8 August 2024 (UTC)
- Good work. I have reported this as bug T372062. – Jonesey95 (talk) 14:32, 8 August 2024 (UTC)
- Also, entering the
name
parameter does seem to work. The screenshot that showed a broken title for A Good Girl's Guide to Murder was probably due to an error with cache purging, as now it appears correct. R.L (talk) 14:58, 8 August 2024 (UTC)
- Thanks for the details, links and screen shots. Those will be helpful. What OS are you running on? I can't reproduce this in Safari on iOS, but it's clearly broken for you. Does it also happen if you log out? – Jonesey95 (talk) 05:00, 8 August 2024 (UTC)
Bug for native_wikisource ?
[edit]I attempted to add a value for this field on Salammbô, and for some reason it's rendering the wikitext instead of a link. I can't find anything wrong with my code, so perhaps it's a problem with the template? I've commented out the value for now, but if you uncomment it and preview you'll see what I mean. Nicknimh (talk) 05:40, 11 August 2024 (UTC)
- Looks like the template breaks when
|title_orig=
is present but empty. For now I've removed|title_orig=
at the article linked to, and added the breaking example as a new testcase, but not sure how to fix this without resorting to lots of nested #if: statements, or converting the template to a module. --YodinT 10:02, 11 August 2024 (UTC)- I think that I have fixed the problem with a short #if statement. – Jonesey95 (talk) 13:58, 11 August 2024 (UTC)
- The documentation does require
|title_orig=
. Omission of that parameter is the reason for the OP's complaint: someone did not provide the required|title_orig=
. When|title_orig=
is omitted and some output of the template needs it, shouldn't there be an error message? Also, if it is decided that|title_orig=
is not required, shouldn't one option for the wikisource link label be the name supplied in|native_wikisource=
(which is required to get the wikisource link)? - I'm perplexed that the resulting interproject link did not render correctly in the template. This (copied from the testcase rendered with this version of the template) renders correctly both here and in the Salammbô article body:
[[s:fr:Salammbô|]]
→ fr:Salammbô
- Why doesn't it render correctly in the article's infobox or the ~/testcases infobox?
- —Trappist the monk (talk) 15:11, 11 August 2024 (UTC)
- I agree that omission of a required parameter should result in an error message, or at least a tracking category, not a silent failure. My fix addressed the silent failure; if the parameter is truly required, someone should test for it and apply an error message, category, or both. As for the "why", maybe copy the previous version into the /sandbox and run it through ExpandTemplates to see what happens. When I do that, I get [[s:fr:Salammbô|]] as output. I can't explain it. – Jonesey95 (talk) 16:52, 11 August 2024 (UTC)
- Right, I have hacked a function into Module:Infobox/utilities. The function assumes that
|title_orig=
is required. The code looks for the required parameter and if not found (present-but-empty or omitted) emits an error message.|orig_lang_code=
is checked against the list of languages known to MediaWiki. In the current live version, any of the 8000+ languages known to Module:lang will be accepted. MediaWiki supports far far fewer; see the list at Template:Citation Style documentation/language/doc. - Because
|title_orig=
is required, support for|name=
and the {{PAGENAME}} magic word is superfluous. {{Infobox book/sandbox}}
calls the new function at|data36=
and examples are available at Template:Infobox book/testcases § Using native wikisource and orig lang code, § With Spanish title (italics) instead of Chinese characters (no italics), and § native wikisource with empty title orig.- Keep? Discard?
- —Trappist the monk (talk) 14:30, 12 August 2024 (UTC)
- Apologies for not raising this before, but I don't know if we should require
|title_orig=
in order to link to the original language Wikisource, in cases like Salammbô, where the original language title is the same as the translated title, or in other cases, (like for example Dichtung und Wahrheit), where the article title/common name is in the original language. There might be an alternative to using|name=
or{{PAGENAME}}
as a fallback, e.g. something like a|name_lang=
parameter for these cases, which would allow non-English titles to be appropriately lang-tagged, and could also support titles that are in a different language from the book's text, like Principia Mathematica? --YodinT 15:17, 12 August 2024 (UTC)- What you are saying is not at all clear to me. Did you mean Philosophiæ Naturalis Principia Mathematica? Dichtung und Wahrheit does not have
{{infobox book}}
so how is that article relevant to this discussion? - I will note (off topic): according to the title pages of the 1729 and 1846 translations, the translated name for Newton should probably be The Mathematical Principles of Natural Philosophy (the target dab page at wikisource); neither work uses the Latin name.
- The proposed change has nothing to do with translations or translated titles. It is about creating correctly marked up links to the appropriate original-language edition of wikisource. I did not write the documentation for
{{infobox book}}
. The documentation requires|title_orig=
when linking to wikisource:- title_orig
- Original title, if not in English; required if using
|native_external_url=
or|native_wikisource=
- orig_lang_code
- ISO 639 code of original language, required if using
|title_orig=
,|native_wikisource=
or|native_external_url=
- Perhaps there is discussion about those requirements in the archives of WT:BOOKS or of this talk page. If you find any such discussions, please link them here so that we may all read them.
- —Trappist the monk (talk) 16:15, 12 August 2024 (UTC)
|native_wikisource=
was added in 2013, and has always supported|name=
and{{PAGENAME}}
as fallbacks in case|title_orig=
was missing. When I wrote the documentation for|native_wikisource=
the following day, I said that|orig_lang_code=
wasrequired if using
, but I deliberately did not add that|title_orig=
,|native_wikisource=
or|native_external_url=
|title_orig=
was required for|native_wikisource=
. This 'requirement' was not added to the documentation until 2019 in this edit, without any explanation, presumably because they assumed that if|orig_lang_code=
was required, so was|title_orig=
. No one seems to have noticed this at the time, and so it stood as-is until today. Unfortunately it's not uncommon for template documentation to be wrong, and it looks like we all missed this being added at the time! The specific examples I give don't currently have an infobox, but if they did, it would be wrong, I think, to require them to have|title_orig=
in the infobox, when|name=
is the same. I'm sure there are book articles that have non-English titles, and also have an infobox, but as it would take a while to find these, I thought the same point would be made by showing examples of articles that have non-English titles, even if they don't have an infobox at the moment. If you want, I can find better examples, but I think the point is essentially the same – requiring|title_orig=
seems unnecessary in these cases. (P. S. Principia Mathematica shows that sometimes titles aren't in the same language as the book; I can see that discussing this at the same time might be muddying the waters, so I'll leave that for now!) --YodinT 19:49, 12 August 2024 (UTC)- P.P.S. I'd forgotten this, but it turns out I wrote the sandbox version of
|native_wikisource=
, before it was added in 2013 –|title_orig=
was never intended to be required for|native_wikisource=
. That said, I don't want to throw away the work you've done! My main point was that there are only a few exceptions when we should use|name=
instead of|title_orig=
(when|name=
is not in English). By adding a parameter like|name_lang=
, we could check for these cases (and correctly lang-tag them at the same time – currently the html says the titles of all infoboxes are in English). The error message you created could be added if both|title_orig=
and|name_lang=
are missing. Hope this is a bit clearer! What do you think? --YodinT 20:16, 12 August 2024 (UTC)- If you edit (don't save) this version (permalink) of the template and then use that version to preview Template:Infobox book/testcases, you will see that
|title_orig=
present-but-empty was broken then. Doing the same thing for this version (permalink), which was current at the time that the documentation required|title_orig=
, shows the same broken wikisource link for|title_orig=
present-but-empty (ignore the script errors;name_from_code()
in Module:Lang has since been renamed toname_from_tag()
). Perhaps the broken wikilink is why Editor Sheila1988 added the documentation requiring|title_orig=
? - I have tweaked the module so that the fallback is
|title_orig=
→|name=
→ {{PAGENAME}}. I have added several more testcases at Template:Infobox book/testcases § native wikisource with empty title orig; notice that the live template fails at the|title_orig=
present but empty;|name=Salammbô
test. - —Trappist the monk (talk) 23:23, 12 August 2024 (UTC)
- Thanks; that looks very good to me, and I guess anything like
|name_lang=
can wait for a separate discussion. --YodinT 20:18, 13 August 2024 (UTC)- Live template updated from the sandbox. Template documentation is on you.
- Yes; separate discussion that should include handling of non-Latin scripts (cjk, Cyrillic, etc).
- —Trappist the monk (talk) 14:01, 14 August 2024 (UTC)
- Thanks; that looks very good to me, and I guess anything like
- If you edit (don't save) this version (permalink) of the template and then use that version to preview Template:Infobox book/testcases, you will see that
- What you are saying is not at all clear to me. Did you mean Philosophiæ Naturalis Principia Mathematica? Dichtung und Wahrheit does not have
- Apologies for not raising this before, but I don't know if we should require
New field request: word count
[edit]As fields go, "Pages" is not very useful to readers. It fails to provide any real point of comparison because pages are not of standardised length across the literary industry. Word count, meanwhile, is precise. This is a commonly requested addition for this template. As an editor working actively in this space, I would like to present some analysis on why pages are not especially useful to readers:
- A Game of Thrones (1ed) has 694 pages and 298,000 words; 429 words per page.
- Dracula (1ed) has 418 pages and 161,000 words; avg. 385 words per page.
- Gone Girl (1ed) has 432 pages and 148,000 words; 342 words per page.
- Frankenstein (1ed) has 280 pages and 78,000 words; avg. 273 words per page.
- It Ends With Us (1ed) has 376 pages and 105,000 words; avg. 280 words per page.
The variation is significant: It Ends With Us has 54% of A Game of Thrones's pages, but 34% of its word count.
Previous objections include verifiability (it is trivially verifiable for public-domain texts) and variation between editions (a problem that already exists with page count for the 1818 and 1831 editions of Frankenstein).
I have recently nominated Dracula for FAC and, moving to Frankenstein, believe there is value here. This would be especially valuable for classic texts, to provide a better indication of a work's size. This is not going to make the field mandatory for every book, but provides an editor with the ability to include it. — ImaginesTigers (talk∙contribs) 11:42, 9 February 2025 (UTC)
- Is it easily verifiable though? Even with regard to public-domain texts. As one user wrote in 2010, "Pages [are] a regular feature of bibliographic details provided by publishers etc. and [are] very easily verifiable. Word count is less easily verified." Nikkimaria opposed the proposal back in 2016 on the same grounds. Word counts would mostly be the result of WP:ORIGINAL, and I believe result in endless nitpicking revisions. You yourself rounded the figures of your examples. When I try to find word count figures for classic texts, I find differing figures for seemingly the same editions. The figures could be presented in prose when supported by reliable secondary sources, but such a parameter seems problematic to me. The calculation method of word counts is also not exactly obvious, which would fail WP:CALC.
- Pinging other users who participated in the past three discussions and are still active on Wiki: Cybercobra, MZMcBride, Odie5533, TAnthony. Οἶδα (talk) 09:46, 21 February 2025 (UTC)
- It's odd to me that I am prevented from adding it. If the information is verifiable, I should be able to provide it. Framing the issue around "people will argue" is fine: if there is consensus against inclusion (as with any content dispute), it shouldn't be included. — ImaginesTigers (talk∙contribs) 10:32, 21 February 2025 (UTC)
- There is no parameter for cover colour; for protagonist name; for number of chapters. All of these things are easily verifiable in at least some cases. From that perspective you're "prevented" from adding many things, although you really could add any of them elsewhere if you felt it warranted. Nikkimaria (talk) 01:27, 22 February 2025 (UTC)
- "Prevented" implies you wish to add infobox parameters without consensus. But I am not sure that consensus will be built for a parameter that is not easily verifiable nor widely applicable. As mentioned above, you are free to it to the article's prose instead. I would be curious to see secondary sources that actually mention word count calculations because I've had a hard time finding any. An easy one should be Harry Potter and the Philosopher's Stone, which many unusable sources claim to have a word count of 76,944. But when I search for that number in reliable sources, I cannot find the figure. The closest I could find was an Oprah Daily article merely mentioning that Rowling's books each include more than 76,000 words. Even for Pride and Prejudice, I can find varying literary sources claiming over 122,000 or 124,000 words, but no exact figures. Οἶδα (talk) 07:38, 22 February 2025 (UTC)
- I am not requesting any of those parameters, and would oppose any attempt to add them.
- IMO, the fetishism over verifiability is a bit silly in this instance. Anyone can check word count. If someone disagrees with it, that's fine. They can discuss on the Talk if the number is wrong, and someone can go check. This looks like dislike of change for the sake of it to me. 🤷♂️ That's the nature of this site, I guess... status quo is best. — ImaginesTigers (talk∙contribs) 13:00, 24 February 2025 (UTC)
- Okay, but I feel as if you ignored most of what I wrote and did not entertain my appeal for such sources. You even cited the same guideline as proof of the opposite. "Anyone checking word count" is original research and I believe involve more than a routine calculation. It is brave to assume that there woud be "consensus among editors that the results of the calculations are correct, and a meaningful reflection of the sources." I am not finding an obvious method of calculating a book's exact word count. And as I alluded to, such sources are severely lacking and even when they exist they are imprecise and contradictory. But more importantly, you seem to be convinced that there is a significant need for this parameter due to the fact that there was one request 17 years ago, another 15 years ago, and a third 8 years ago. I would not characterise that as reflecting a significant demand from the community. In fact, those discussion all resulted in either confusion or disapproval. I would hope other participants could chime in on this discussion. Οἶδα (talk) 21:16, 26 February 2025 (UTC)
- I agree this is useful. Recently I had some discussion on classification of works into novels, novellas, short stories and like, based on some definitions of word count. It would be good to have this number research and displayed more prominently. Piotr Konieczny aka Prokonsul Piotrus| reply here 00:20, 11 April 2025 (UTC)
- I get the idea but I don't think checking it yourself is as easy as you indicate. PARAKANYAA (talk) 00:31, 11 April 2025 (UTC)
followed - title by publication date, or reading order? For later prequels
[edit]See Talk:Rozdroże_kruków#Followed_by_The_Last_Wish???. A 7th book in a series, but a prequel. Is it the first or the last in the infobox order? PS. I would think the former (publication date). Should we have an option to list works by reading order (in-universe chronology)? Piotr Konieczny aka Prokonsul Piotrus| reply here 16:05, 10 April 2025 (UTC)