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.
Proposal to deprecate "country" in favor of "location"
[edit]I would like to propose a change here to change the |country=
parameter to |location=
or |pub_location=
to clear up confusion and match the usage in {{Cite book}}. In my wide experience of observing and editing book articles, there is a constant confusion and misuse of this parameter. Using |country=
to mean country of original publication is confusing as books, nearly without exception, are published in specific locations. Usually a city, the city where the publisher is based. The standalone city name, not country, is THE standard in publishing. But |country=
is endlessly used for the writer's nationality. Typically, the author's country of origin is indeed the country where their given book was published. However, that is not always the case. {{Infobox book}} favors the 1st edition publication of a book. First editions are periodically published first in countries that differ from the author's nationality or citizenships. Especially in today's globalized world. A book by an Indian-born writer first published in New York by Simon & Schuster should not have India in the country parameter. And yet, I cannot count how many these instances I have come across. This trend only seems to be getting worse. |location=
, but especially |pub_location=
, removes confusion here and more clearly states what that parameter is for. Οἶδα (talk) 19:04, 14 February 2023 (UTC)
|country=
is indeed confusing, and for novels it often gets used for the country or countries in which the action takes place (should be|set_in=
). I may have been guilty of that myself once or twice - oops.|pub_location=
would be much clearer on all counts. — Preceding unsigned comment added by MichaelMaggs (talk • contribs) 19:52, 14 February 2023 (UTC)
- I note that Template:Citation uses
|publication-place=
(and synonymously,|place=
or|location=
) and defines it as "The city of publication. If more than one town/city is listed on the title page, give the first one or the location of the publisher's head office." Do we still want to refer to the country (not the city) of publication, and if so, should we draw a distinction in naming the default parameter? (|publication-country=
?) TheFeds 19:59, 28 March 2023 (UTC)- I believe location takes precedence over country as the latter is not present on title pages and is merely a practical extension of a location. However, realistically the longstanding country parameter will likely remain. As such, a distinction must be made because the ambiguity of "country" was a problem in the first place. Confusion has persisted despite the template documentation clearly delineating it as the "Country of original publication". Also, I suppose 'country' is needed because some books were published in cities that–at the time of publication–were located in countries that no longer exist (i.e. East Germany, USSR, Yugoslavia etc.)
|pub_place=
or|pub_location=
, and|pub_country=
should suffice. We already make the distinction for Date (|pub_date=
). These should follow. Οἶδα (talk) 20:55, 30 March 2023 (UTC)- I mentioned the citation template to provide an example of another thing the parameter could be called, and to point out the conventions that have arisen in that context, which may be instructive here.
- An added wrinkle, I suppose is that it is theoretically possible for the publication to have been simultaneous in multiple places—e.g. coordinated releases of language versions on the same day by different publishers who specialize in their own markets and languages—so the parameter might more correctly allow for a list of places when required. (Infoboxes sometimes deal with this with a
<br />
-separated list.) - Given that the parameter contents might have to be a list, disambiguating with the form
city, country
doesn't seem unreasonable when necessary or desirable. - For cities that don't exist any longer, or whose name or country has changed, the name of the city should be linkable to the most correct placename at the time of publication. So if something was published in Danzig, Weimar Germany, which is modern Gdańsk, Poland (see Timeline of Gdańsk), we could link to Danzig and there would either be a redirect or a separate article there. (There are other considerations at Wikipedia:Naming conventions (geographic names).)
- I guess as a bottom line, if there is a consensus to change something, but existing usage is messy and inconsistent, the consensus can drive efforts to improve in the long term. For example a simple one would be to add
|country=<!--of original publication-->
to the copyable template example on the documentation page. This would induce a particular usage in new instances. More complex ones could involve manual or automated review via the bot process. TheFeds 00:31, 3 April 2023 (UTC)- I would support disambiguating with the form
city, country
. Any change that would accommodate this standard in publishing is preferable. And I agree with changing the documentation page, which I predict is a particularly non-controversial change. Οἶδα (talk) 21:28, 15 April 2023 (UTC)- I agree too. Bibliographically the publication place of (an edition of) a book is the city of its publisher and not the country. --Frognall (talk) 11:02, 4 June 2023 (UTC)
- I would support disambiguating with the form
- I believe location takes precedence over country as the latter is not present on title pages and is merely a practical extension of a location. However, realistically the longstanding country parameter will likely remain. As such, a distinction must be made because the ambiguity of "country" was a problem in the first place. Confusion has persisted despite the template documentation clearly delineating it as the "Country of original publication". Also, I suppose 'country' is needed because some books were published in cities that–at the time of publication–were located in countries that no longer exist (i.e. East Germany, USSR, Yugoslavia etc.)
- I note that Template:Citation uses
Would be helpful to revive this discussion because it has not aged out of relevance. Οἶδα (talk) 12:17, 17 December 2023 (UTC)
- Agreed. There seems to be general approval of the proposal, but not a lot of engagement so far. Sugegstions as to next steps? MichaelMaggs (talk) 16:40, 17 December 2023 (UTC)
- The proposal appears uncontroversial but more input is always helpful. Perhaps notifying relevant WikiProjects? Οἶδα (talk) 23:55, 24 February 2024 (UTC)
- Good idea. MichaelMaggs (talk) 10:13, 25 February 2024 (UTC)
- Just chiming in here. For electronic literature, it would be helpful to have BOTH potential fields for country of origin as well as city, country for publication. Often works are published in digital form, with many people from all over the world collaborating on a single platform. Thus, country of origin for works would help as well. Is it not possible to have both fields? Thanks! LoveElectronicLiterature (talk) 17:01, 27 February 2024 (UTC)
- I'm not sure about the scope of that and I don't think it's particularly useful to this discussion. The country parameter has always been used for publication, not for "origin", the distinction of which you are making I am not entirely sure of. There has never been a country origin parameter. Regardless, as developed in the discussion above, I am more concerned with introducing a
|pub_place=
parameter than replacing|country=
at this point. Sorry if the section header is now confusing. Οἶδα (talk) 22:39, 28 February 2024 (UTC)
- I'm not sure about the scope of that and I don't think it's particularly useful to this discussion. The country parameter has always been used for publication, not for "origin", the distinction of which you are making I am not entirely sure of. There has never been a country origin parameter. Regardless, as developed in the discussion above, I am more concerned with introducing a
- Just chiming in here. For electronic literature, it would be helpful to have BOTH potential fields for country of origin as well as city, country for publication. Often works are published in digital form, with many people from all over the world collaborating on a single platform. Thus, country of origin for works would help as well. Is it not possible to have both fields? Thanks! LoveElectronicLiterature (talk) 17:01, 27 February 2024 (UTC)
- Good idea. MichaelMaggs (talk) 10:13, 25 February 2024 (UTC)
- The proposal appears uncontroversial but more input is always helpful. Perhaps notifying relevant WikiProjects? Οἶδα (talk) 23:55, 24 February 2024 (UTC)
- So what is the status of this discussion? I came across an edit to Al-Sirah al-Nabawiyyah (Ibn Ishaq) where the "country" is listed as Medina" and an IP user changed the field to "city", which obviously broke the display. We can't set it to Saudi Arabia, as this work predates the existence of that by about 1,200 years. Zaathras (talk) 00:30, 12 March 2024 (UTC)
- I am not sure how to generate more discussion short of forcing the addition. I would boldly edit the template myself but naturally it's protected for only template editors and administrators to edit. I also do not have enough technical knowledge to edit the source. Οἶδα (talk) 08:31, 15 March 2024 (UTC)
- Suggest asking one of the template editors who have edited this template in the past, as they may well have further advice, or may be willing just to do it if they agree there's a definite consensus about exactly what change is to be made. The most recent editor is Jonesey95 who I know to be friendly and helpful. MichaelMaggs (talk) 17:47, 15 March 2024 (UTC)
- Thank you for the kind words. Based on my reading of the discussion above, it looks like adding
|pub_location=
as an alias of|country=
would work from a technical standpoint. That would allow|country=
to continue working unless|pub_location=
had a value. The documentation could then be updated to read something like|pub_location=<!--location of original publication-->
. Am I summarizing the consensus view? One unresolved issue is the text of the bold label "Country" that currently accompanies|country=
. It will need to be changed, I think, but to what? "Publication location"? – Jonesey95 (talk) 18:04, 15 March 2024 (UTC)- I'm not sure if there is an important distinction between
|pub_location=
vs|pub_place=
. Consistent with the CS1 style, they would be interchangeable. But I believe for the bold label that "Publication place" is more recognisable, natural and concise than the rhyming mouthful "Publication location". Οἶδα (talk) 21:23, 15 March 2024 (UTC)- Yes, agree with you both. MichaelMaggs (talk) 22:03, 15 March 2024 (UTC)
- OK, this became a bit more interesting when I went to make the change to the sandbox. Here is what I did:
- Moved the "Country" label to a more logical row, below "Publication date", and changed the label to "Publication place"
- Found that
|location=
was already in existence but not displayed. Since it was used in only 84 articles, I have removed it entirely, replacing it with the new|pub_place=
/|country=
combination. - Added
|pub_place=
as an alias of|country=
(|pub_place=
is used if both are present) - Marked
|location=
as unsupported, so 84 articles will have to be checked and modified to use|pub_place=
or remove|location=
, depending on what information is already present.
- Please take a look at the sandbox versions in {{Infobox book/testcases}} and provide feedback. – Jonesey95 (talk) 01:33, 16 March 2024 (UTC)
- Looking at the Cervantes example, would publication place more logically fit directly below publisher? Something about [Publisher>Date>Place>English date] looks confusing. Οἶδα (talk) 05:42, 16 March 2024 (UTC)
- Any updates on this? Οἶδα (talk) 06:31, 1 May 2024 (UTC)
- F Οἶδα (talk) 20:36, 8 June 2024 (UTC)
- Hi Jonesey95, does that give you the feeedback you need? MichaelMaggs (talk) 08:17, 9 June 2024 (UTC)
- F Οἶδα (talk) 20:36, 8 June 2024 (UTC)
- OK, this became a bit more interesting when I went to make the change to the sandbox. Here is what I did:
- Yes, agree with you both. MichaelMaggs (talk) 22:03, 15 March 2024 (UTC)
- I'm not sure if there is an important distinction between
- Thank you for the kind words. Based on my reading of the discussion above, it looks like adding
- Suggest asking one of the template editors who have edited this template in the past, as they may well have further advice, or may be willing just to do it if they agree there's a definite consensus about exactly what change is to be made. The most recent editor is Jonesey95 who I know to be friendly and helpful. MichaelMaggs (talk) 17:47, 15 March 2024 (UTC)
- I am not sure how to generate more discussion short of forcing the addition. I would boldly edit the template myself but naturally it's protected for only template editors and administrators to edit. I also do not have enough technical knowledge to edit the source. Οἶδα (talk) 08:31, 15 March 2024 (UTC)
I have deployed this this change. Please report any problems. I did not change the order of the labels; they looked fine to me. – Jonesey95 (talk) 01:07, 11 June 2024 (UTC)
- No problems on my end. Regardless of order, the addition is welcome and will be nice to finally make use of. Οἶδα (talk) 18:27, 11 June 2024 (UTC)
- Many thanks @Jonesey95. MichaelMaggs (talk) 15:32, 13 June 2024 (UTC)
A proper short description plan/proposal
[edit]Checking the previous failed attempts to add a short description, I believe that we need a complete logic system for implementing a short description on a template as large as this before adding a generator. Here's a rough pseudo-code proposal I made for a potential implementation, based on WP:SDEXAMPLES:
Adding the templates main other
should be used to prevent cluttering in non-main space articles, along with is infobox in lead
to prevent incorrect short descriptions in articles where the book is not the main topic. As with any automatically generated short description, noreplace should be used. The main flaw is that lots of books that are novels say they are novels in the lead, but not in the infobox. Parsing the lead may be useful for fixing that, and some texts with the infobox are not considered strictly books, but texts. The generator should also reject anything that results in just "Book", since at that point the short description is so short it is borderline useless.
Update
[edit]I have created a module that works as a prototype for a short description generator at Module:Sandbox/1ctinus and a template at Template:infobox book/sandbox2. It needs lots of checking to see if everything works or are missing gaps. If you are not a noob at lua like me, feel free to improve my code for performance and readability! -1ctinus📝🗨 00:38, 2 June 2024 (UTC)
- What's the rationale for this approach to genre? Nikkimaria (talk) 05:01, 2 June 2024 (UTC)
- using the genre parameter directly would be a bad idea since it sometimes includes "book" or "novel" and sometimes doesn’t, so it would read "2000 mystery novel book by John Done", or it has commas. -1ctinus📝🗨 10:42, 2 June 2024 (UTC)
- What would be the outcome for an anthology of short stories? A work of non-fiction? A non-novel with no genre provided? Nikkimaria (talk) 14:26, 2 June 2024 (UTC)
- 1. I would probably put anthology as a higher priority, so just anthology.
- 2. seeing other pages, it seems like non-fiction (outside of biographies and encyclopedias) just have “book”
- 3. I would probably just go with something generic (Literary Work) -1ctinus📝🗨 14:37, 2 June 2024 (UTC)
- What would be the outcome for an anthology of short stories? A work of non-fiction? A non-novel with no genre provided? Nikkimaria (talk) 14:26, 2 June 2024 (UTC)
- I don't think I'd be comfortable with those assumptions - not everything that is not a novel is a literary work, and not everything that is non-fiction is best described as just "book". Nikkimaria (talk) 14:57, 2 June 2024 (UTC)
- Could you please give examples of both of those? Those would be beneficial for the program. If this helps clarifies things, the format would be (year) (type, such as novel or anthology) by (author) -1ctinus📝🗨 15:07, 2 June 2024 (UTC)
- In the case of nonfiction, there are various genres beyond biography and encyclopedia, such as cookbook, narrative history, self-help book, memoir, and others. Hydrangeans (she/her | talk | edits) 16:52, 2 June 2024 (UTC)
- Could you please give examples of both of those? Those would be beneficial for the program. If this helps clarifies things, the format would be (year) (type, such as novel or anthology) by (author) -1ctinus📝🗨 15:07, 2 June 2024 (UTC)
- I don't think I'd be comfortable with those assumptions - not everything that is not a novel is a literary work, and not everything that is non-fiction is best described as just "book". Nikkimaria (talk) 14:57, 2 June 2024 (UTC)
- Here are some specific cases to consider, which currently use this template: Columbia Encyclopedia, Macquarie Dictionary, Responsible Investment Brand Index, Dungeon Masters Screen, Official Congressional Directory. How would your proposal interact with these? Nikkimaria (talk) 21:55, 2 June 2024 (UTC)
- Thank you for the list. I am really struggling for what to do with D&D stuff since I have absolutely nothing about what those books are called. I see "supplements" and "accessory" a lot of the time? Another problem has to do with books with multiple editions, such as the Columbia encyclopedia. Would it be really fair to call it a "1935" book? Looking to see how to fix that. For reference books such as dictionaries and encyclopedias I might change the format to "first published in" -1ctinus📝🗨 22:42, 2 June 2024 (UTC)
- Here are some specific cases to consider, which currently use this template: Columbia Encyclopedia, Macquarie Dictionary, Responsible Investment Brand Index, Dungeon Masters Screen, Official Congressional Directory. How would your proposal interact with these? Nikkimaria (talk) 21:55, 2 June 2024 (UTC)
- How many are there to do? This might be better done as a one-off script, especially if parsing the lead is required. MichaelMaggs (talk) 08:34, 2 June 2024 (UTC)
- 12,000 😬 -1ctinus📝🗨 10:39, 2 June 2024 (UTC)
- If I understand correctly, this quite time-intensive code would run every time a reader looks at one of the 53,000 articles that use this template. Can you do some tests to check what additional delay is introduced every time that happens? With this complexity I would strongly prefer a one-off script; it could use essentially the same logic. MichaelMaggs (talk) 08:39, 3 June 2024 (UTC)
- 1. the module should only run on articles without short description, so it would only be 15,000.
- 2. How would I go at measuring the performance of the template with and without the module? -1ctinus📝🗨 13:31, 3 June 2024 (UTC)
- I am working on a javascript script that can generate short descriptions, but it needs some work, especially with RPG stuff. -1ctinus📝🗨 15:27, 3 June 2024 (UTC)
- Update on the script: it is able to get enough information for ~80-90% of the pages to be able to generate a short description. I am going to make it so I can immediately weed out bad additions or bugs to comply with WP:MEATBOT. I also fixed the RPG issue -1ctinus📝🗨 18:59, 3 June 2024 (UTC)
An option to keep off to the side in case the above blows up
[edit]In case the above proves to be unworkable, another option is to create a temporary tracking category of articles using infobox book without a short description. Creating 12,000 manual SDs is actually not that bad of a task. You can usually copy/paste/edit something from the lead or use the SD helper gadget to import and edit the Wikidata SD. – Jonesey95 (talk) 15:24, 4 June 2024 (UTC)
- At this point, this is what I plan on doing. Ive created a really janky UI that lets me change the automatic ones in case of a parsing error. I’ve been sick so I haven’t finished it sooner than I wanted, but by tomorrow i should start publishing them. -1ctinus📝🗨 19:33, 4 June 2024 (UTC)
- I am starting to publish them. So far I have about ~500 done, including all that start with j, z, x, g, and q. -1ctinus📝🗨 13:53, 5 June 2024 (UTC)
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