Jump to content

Template talk:Include-USGov: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Cewbot (talk | contribs)
m Maintain {{WPBS}}: 1 WikiProject template. Create {{WPBS}}.
 
(41 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{WikiProject United States|class=Template|importance=NA}}
{{WikiProject banner shell|
{{WikiProject United States|importance=NA}}
}}
==Comment on including articles in categories ==
==Comment on including articles in categories ==
I removed <tt><nowiki><includeonly>[[Category:Wikipedia articles incorporating text from public domain works of the United States Government]]</includeonly></nowiki></tt> because some templates (see {{tl|Bioguide}} for example) includes a subcategory. This template should not add articles to the cat. Templates that use this template (sub-templates?) should add articles to cats.&mdash;'''''[[User:G716|<font color="Purple">G716</font>]]'''''&nbsp;&lt;[[User talk:G716|<sup>T</sup>]]·[[Special:Contributions/G716|<sub>C</sub>]]&gt; 03:23, 18 April 2009 (UTC)
I removed <code><nowiki><includeonly>[[Category:Wikipedia articles incorporating text from public domain works of the United States Government]]</includeonly></nowiki></code> because some templates (see {{tl|Bioguide}} for example) includes a subcategory. This template should not add articles to the cat. Templates that use this template (sub-templates?) should add articles to cats.&mdash;'''''[[User:G716|<span style="color:Purple;">G716</span>]]'''''&nbsp;&lt;[[User talk:G716|<sup>T</sup>]]·[[Special:Contributions/G716|<sub>C</sub>]]&gt; 03:23, 18 April 2009 (UTC)


:Great catch! Thanks for fixing! —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 21:15, 18 April 2009 (UTC)
:Great catch! Thanks for fixing! —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 21:15, 18 April 2009 (UTC)


::The number of articles in [[:Category:Wikipedia articles incorporating text from public domain works of the United States Government]] is down from nearly 8,000 before I made the change to about 1,800 now, and I think that there are still some more that will be removed as the server cache purges. &mdash;'''''[[User:G716|<font color="Purple">G716</font>]]'''''&nbsp;&lt;[[User talk:G716|<sup>T</sup>]]·[[Special:Contributions/G716|<sub>C</sub>]]&gt; 22:40, 18 April 2009 (UTC)
::The number of articles in [[:Category:Wikipedia articles incorporating text from public domain works of the United States Government]] is down from nearly 8,000 before I made the change to about 1,800 now, and I think that there are still some more that will be removed as the server cache purges. &mdash;'''''[[User:G716|<span style="color:Purple;">G716</span>]]'''''&nbsp;&lt;[[User talk:G716|<sup>T</sup>]]·[[Special:Contributions/G716|<sub>C</sub>]]&gt; 22:40, 18 April 2009 (UTC)


== Italicize "document" ==
== Italicize "document" ==
Line 20: Line 22:


::: Hmm, from the way it's being used I'd say both the italics and the icon should be removed. The random samples I just looked at all had it listed in the references or the external links section ([[Ackermann_function#External_links|1]], [[Transport_in_Belarus#References|2]], [[Lake_Tahoe#Notes|3]]).<br>But then I'm not quite sure I'm getting the purpose of this template. In the three cases from above I'd just use a normal citation template, and in other ones like [[Charles C. Krulak#References|this]] where there is no link to the source material I don't see the point at all, since the attributions isn't really necessary.<br>[[User talk:Amalthea|<span style="font-family:Verdana;font-variant:small-caps;color:#823824;font-weight:normal">Amalthea</span>]] 19:32, 19 April 2009 (UTC)
::: Hmm, from the way it's being used I'd say both the italics and the icon should be removed. The random samples I just looked at all had it listed in the references or the external links section ([[Ackermann_function#External_links|1]], [[Transport_in_Belarus#References|2]], [[Lake_Tahoe#Notes|3]]).<br>But then I'm not quite sure I'm getting the purpose of this template. In the three cases from above I'd just use a normal citation template, and in other ones like [[Charles C. Krulak#References|this]] where there is no link to the source material I don't see the point at all, since the attributions isn't really necessary.<br>[[User talk:Amalthea|<span style="font-family:Verdana;font-variant:small-caps;color:#823824;font-weight:normal">Amalthea</span>]] 19:32, 19 April 2009 (UTC)


{{edit protected|answered=yes}}
The trend over the last couple of years has been for the removal of italics on stand-alone article notices (see [[:Category:Attribution templates]]). Please remove the italics from this template. -- [[User:PBS|PBS]] ([[User talk:PBS|talk]]) 10:13, 26 April 2013 (UTC)
:[[File:Yes check.svg|20px|link=|alt=]] '''Done'''<!-- Template:EP -->. Please remember to update the documentation as well. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 21:52, 7 May 2013 (UTC)


== Accessibility improvement ==
== Accessibility improvement ==
Line 32: Line 39:


==Date==
==Date==
Sometimes federal government documents (especially press releases or other announcements) include the date that they were issued. Could a date parameter be included in this template? <font face="MS Gothic">[[User:Eastmain|Eastmain]] ([[User talk:Eastmain|talk]] • [[Special:Contributions/Eastmain|contribs]])</font > 18:37, 14 March 2010 (UTC)
Sometimes federal government documents (especially press releases or other announcements) include the date that they were issued. Could a date parameter be included in this template? <span style="font-family:MS Gothic;">[[User:Eastmain|Eastmain]] ([[User talk:Eastmain|talk]] • [[Special:Contributions/Eastmain|contribs]])</span> 18:37, 14 March 2010 (UTC)


== add source parameter ==
== add source parameter ==
Line 49: Line 56:
::Note that I revamped the test cases to match the documentation, so we won't have this problem in the future. —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 09:45, 30 December 2011 (UTC)
::Note that I revamped the test cases to match the documentation, so we won't have this problem in the future. —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 09:45, 30 December 2011 (UTC)
:::Done. [[User:Killiondude|Killiondude]] ([[User talk:Killiondude|talk]]) 18:47, 30 December 2011 (UTC)
:::Done. [[User:Killiondude|Killiondude]] ([[User talk:Killiondude|talk]]) 18:47, 30 December 2011 (UTC)

== Whitespace issue ==

There's an extraneous paragraph break being introduced, I think by the sub-template {{t1|GSA building}}. See [[Union Station (Tacoma, Washington)#Attribution]] for an example. [[User:Mackensen|Mackensen]] [[User_talk:Mackensen|(talk)]] 16:02, 1 September 2013 (UTC)
:{{Fixed}} It was indeed extra white space in {{tl|GSA building}} —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 00:59, 2 September 2013 (UTC)
::Thanks!--[[User:Mackensen|Mackensen]] [[User_talk:Mackensen|(talk)]] 12:16, 2 September 2013 (UTC)

== Editable by templateeditor? ==
This seems like a sort of template that should be editable by people with templateeditor rights. Can an admin change it? Thanks! —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 09:22, 4 January 2015 (UTC)
: Bringing back this request: can we make this template editable by templateeditors? —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 03:01, 28 June 2015 (UTC)

== Where in an article are this template and its derivatives supposed to be transcluded? ==

It looks like this template and its derivates are often placed in the References section, like https://en.wikipedia.org/wiki/Telecommunications_in_Bosnia_and_Herzegovina#References. But it doesn't look so good. It looks kind of messy to mix different kinds of lists that are about different things into one big list. Is there an official best practice of where to place this form of information? A special section in which to place them, for instance? --[[User:Jhertel|Jhertel]] ([[User talk:Jhertel|talk]]) 14:14, 11 July 2016 (UTC)

:The custom of putting PD attribution templates at the top of the references is an old one, used in thousands of pages. [[WP:FREECOPYING]] supports this custom. However, many editors prefer inline citations when copying free material. [[WP:FREECOPYING]] also supports this. This template can be used as an inline citation. A pattern (which I support) is to mark every paragraph that is copied with an inline citation that uses this template. See, e.g., [[Rocky Mountains]]. —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 10:52, 13 July 2016 (UTC)
:: Thank you so much for the information and pointers! I personally agree that marking every copied paragraph is best. Otherwise it's hard to know what sentences or paragraphs were copied. --[[User:Jhertel|Jhertel]] ([[User talk:Jhertel|talk]]) 11:55, 13 July 2016 (UTC)

::: {{Reply to|Jhertel|Hike395}} I know I'm reviving a nearly four-year-old discussion here...but I came here (truthfully, from {{Tl|NTSB}}) to determine where this template is supposed to be placed. [[Template:Include-USGov/doc|The documentation]] doesn't say. Judging from your discussion, there is no consensus. Can we find a way to give some guidance (i.e. best practice) to editors new to this template or its derivatives? I realize the preference may be complete freedom, but for the doc to avoid the subject entirely is to promote tribal knowledge among experienced editors. –&nbsp;<kbd>[[User:voidxor|<span style="color: #00F">void</span>]][[User talk:voidxor|<span style="color: #000">xor</span>]]</kbd> 19:28, 23 April 2020 (UTC)

== No parens around accessdate ==
{{edit protected|answered=yes}}
{{U|Shelbystripes}} modified the sandbox so that the accessdate is a standalone sentence at the end of the transclusion, rather than a parenthetical phrase. I think it looks better this new proposed way! Thanks for doing this! —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 06:33, 31 December 2017 (UTC)
:Thanks, I was just trying to write up my description of the proposed edit. It makes the accessdate text render in the same manner as {{tl|cite web}} format, as a separate sentence following the document description. The edit also adjusts the span headers so that all the accessdate text generated is within <code><nowiki><span class="reference-accessdate"></span></nowiki></code> so that the text is excluded for users that hide the accessdate. I would appreciate a reviewer copying [[:Template:Include-USGov/sandbox]] to [[:Template:Include-USGov]] to incorporate these changes. [[User:Shelbystripes|Shelbystripes]] ([[User talk:Shelbystripes|talk]]) 06:40, 31 December 2017 (UTC)
::{{Done}} Looks good! —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 12:06, 31 December 2017 (UTC)

== Hatnote class ==
The template needs the hatnote class; the page popup will display the template as raw text and ignore other content and the formatting looks off. <span style="font-family: monospace;">[[User talk:ElijahPepe|elijahpepe@wikipedia]]</span> 23:04, 4 March 2022 (UTC)

:Hatnotes are for pointing people to other places, not for article content. This is, so far as I can tell, treated as article content. It's categorically not a hatnote.
:Separately, if this is displaying in a page popup, that indicates to me that the page needs to be refactored, redirected, or expanded. No popups should be displaying this because they simply shouldn't be short enough to display it. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 23:10, 4 March 2022 (UTC)

== No-prescript ==

Sometimes the text from a USGov work that was copied into a Wikipedia article has over time been edited in such a way that although the summary text still relies on the USGov, the content of the work, it no longer needs the PD notice to meet the [[WP:PLAGIARISM|plagiarism guideline]]. As in the case of the template {{tlx|CIA World Factbook}} the template wrapper is still useful (for example displaying the correct archived version), and converting the current information displayed wrapper template into the same display using just {{tlx|cite web}} would be time consuming, I think it would be useful to have a boolean parameter called ''no-prescript'' which if set stops the display of the prescript. -- [[User:PBS|PBS]] ([[User talk:PBS|talk]]) [[User:PBS|PBS]] ([[User talk:PBS|talk]]) 09:48, 28 September 2022 (UTC)

:Unless {{para|article}} and {{para|url}} are both set, there isn't a {{tlx|cite web}} template that is wrapped. To take a common case, consider <code><nowiki>{{Include-USGov|agency=[[Men in black]]}}</nowiki></code>, which produces
::{{Include-USGov|agency=[[Men in black]]}}
:I don't think {{para|no-prefix}} could return anything like a standalone citation in this case.
:Perhaps it would be better to understand what you're trying to accomplish with the new parameter? If you're looking for a version of {{tlx|CIA World Factbook}} that does not have a PD prefix, may I suggest {{tl|CIA World Factbook link}}? It has the same country / archiving logic. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 03:49, 29 September 2022 (UTC)

:::I thought I had made it fairly obvious in my first post to this thread. It is not just {{tlx|CIA World Factbook}} but other templates for example like {{tlx|US government sources}} (another one I am familiar with). Indeed your example of {{tl|CIA World Factbook link}} is another good example, because if a {{para|no-prefix}} existed then {{tl|CIA World Factbook link}} could wrap around {{tl|CIA World Factbook}} with {{code|1=no-prefix=y}} set reducing the need to code two different templates (which I see you have been doing to keep them synchronised).
:::That there will be examples where it is not necessary, but that is no reason for not coding it, when it could be useful in other cases.
:::As an aside I think your example <code><nowiki>{{Include-USGov|agency=[[Men in black]]}}</nowiki></code> is better done with the template {{tl|source-attribution}}, <code><nowiki>{{source-attribution|[[Men in black]]}}</nowiki></code> (as described in the [[WP:FREECOPY|plagiarism guideline]]):
:::{{source-attribution|[[Men in black]]}}
:::As another aside I think {{tl|CIA World Factbook link}} ought to be moved to {{tl|Cite CIA World Factbook}} to bring it in line with other templates such as {{tl|Cite web}}, {{tl|Cite DNB}} (with its companion {{tl|DNB}}) , {{tl|Cite EB1911}} (with it companion {{tl|EB1911}} [[user:PBS/Notes#List of PD Templates|etc]], [[:Category:Attribution templates|etc]].
:::-- [[User:PBS|PBS]] ([[User talk:PBS|talk]]) 08:06, 29 September 2022 (UTC)
::::This template is getting creaky and old, and is used as a base for hundreds of other PD templates (e.g., {{tlx|USGS}}, {{tlx|NPS.Gov}}), both as a display and inline as a citation. At this point, adding logic to sometimes strip away the PD prefix and otherwise warn would be major template surgery. I think the whole template needs to be ported to Lua, and if we're going to do that, the design should be carefully rethought. I'll think about this and come back with a proposal. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 15:48, 29 September 2022 (UTC)
{{od|4}} As part of a refactoring of this template (which I'll propose shortly), I created {{tl|Cite USGov}}. I think it will fulfill your needs: it is a template that accepts all of the same arguments as {{tl|Include-USGov}}, but produces a CS1 citation:
:<code><nowiki>{{Cite USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|access-date=2022-10-01}}</nowiki></code> → {{Cite USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|access-date=2022-10-01}}
We can add documentation to this template to suggest use of {{tl|Cite USGov}} when the material is no longer included verbatim, but needs to be cited anyway. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 17:14, 1 October 2022 (UTC)
::Sorry I am busy in the real world an will look at this solution and the one next section when I have time. But it certainly looks like a big step in the right direction. -- [[User:PBS|PBS]] ([[User talk:PBS|talk]]) 14:19, 25 October 2022 (UTC)

== Simplification and refactoring ==

I'm proposing simplifying and refactoring the template for three reasons:

# Over the years, the logic of the template has gotten messy and hard to change.
# Now that this template wraps CS1, there is a chance that it will produce redundant citations through wrapper templates. For example, via {{tl|USGS}}, it's easy to generate:
#: <code><nowiki>{{USGS|work=USGS|title=Geology of Something|url=https://usgs.gov/something.html}}</nowiki></code> &rarr; {{USGS|work=USGS|title=Geology of Something|url=https://usgs.gov/something.html}}
# {{U|PBS}} wanted a version of the template that produced a stand-alone citation (without a PD inclusion warning)

These issues are now solved in [[Template:Include-USGov/sandbox|the sandbox]], see [[Template:Include-USGov/testcases|test cases for new behavior]].

What I've done is push as much information into the citation as possible. That means not mentioning the PD source in the preamble. The preamble will consist simply of:
:[[File:PD-icon.svg|12px|class=noviewer|link=|alt=Public Domain]]&nbsp;This article incorporates [[Copyright status of works by the federal government of the United States|public domain material]] from
and then is followed by the generated citation. For example:
:<code><nowiki>{{Include-USGov|agency=USGS|article=Reference document|url=http://www.usgs.gov/doc.html|first=John Q.|last=Public|accessdate=2022-08-08}}</nowiki></code> &rarr; {{Include-USGov/sandbox|agency=USGS|article=Reference document|url=http://www.usgs.gov/doc.html|first=John Q.|last=Public|accessdate=2022-08-08}}

The code is now very simple: it produces the preamble, and then generates a citation (if there is any information at all), or else will fall back to a generic statement (e.g., "websites or documents of the [[USGS]]"). The citation generation template is now available at {{tl|Cite USGov}}.

Comments? Thoughts? Suggestions? — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 04:10, 3 October 2022 (UTC)

:{{Implemented}} -- I forgot to update this Talk page: because there were no comments, I went ahead and implemented the change on October 6 and went live. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 13:43, 26 October 2022 (UTC)

Latest revision as of 13:46, 1 July 2024

Comment on including articles in categories

[edit]

I removed <includeonly>[[Category:Wikipedia articles incorporating text from public domain works of the United States Government]]</includeonly> because some templates (see {{Bioguide}} for example) includes a subcategory. This template should not add articles to the cat. Templates that use this template (sub-templates?) should add articles to cats.—G716 <T·C> 03:23, 18 April 2009 (UTC)[reply]

Great catch! Thanks for fixing! —hike395 (talk) 21:15, 18 April 2009 (UTC)[reply]
The number of articles in Category:Wikipedia articles incorporating text from public domain works of the United States Government is down from nearly 8,000 before I made the change to about 1,800 now, and I think that there are still some more that will be removed as the server cache purges. —G716 <T·C> 22:40, 18 April 2009 (UTC)[reply]

Italicize "document"

[edit]

{{editprotected}}

See Template:Include-USGov/Sandbox for proposed change. --- when I wrote the doc subpage, I noticed that the word "document" was not italicized. Please note that Sandbox does not include <noinclude></noinclude> material, which should be preserved in real template. Thanks! —hike395 (talk) 17:00, 19 April 2009 (UTC)[reply]

Hike, what about the rest of the non-italicized parts I see in the examples at Template:Include-USGov/doc? Shouldn't the whole text be italicized, including the document name, author, comment, ...? Amalthea 17:15, 19 April 2009 (UTC)[reply]
This meta-template is designed for use both as a stand-alone article notice (which tend to be italicized), and as an inline reference (which are not). I think it would look odd to be completely italicized, so I thought the compromise was to change from italics to non-italics at the specific document name.
Perhaps the italics should just be removed entirely. —hike395 (talk) 18:16, 19 April 2009 (UTC)[reply]
Hmm, from the way it's being used I'd say both the italics and the icon should be removed. The random samples I just looked at all had it listed in the references or the external links section (1, 2, 3).
But then I'm not quite sure I'm getting the purpose of this template. In the three cases from above I'd just use a normal citation template, and in other ones like this where there is no link to the source material I don't see the point at all, since the attributions isn't really necessary.
Amalthea 19:32, 19 April 2009 (UTC)[reply]


The trend over the last couple of years has been for the removal of italics on stand-alone article notices (see Category:Attribution templates). Please remove the italics from this template. -- PBS (talk) 10:13, 26 April 2013 (UTC)[reply]

Done. Please remember to update the documentation as well. Best — Mr. Stradivarius ♪ talk ♪ 21:52, 7 May 2013 (UTC)[reply]

Accessibility improvement

[edit]

{{editprotected}} For WP:ACCESSIBILITY by visually impaired readers, the purely decorative image that this template generates should have "|link=" as per WP:ALT #Purely decorative images. To do this, please install the obvious sandbox patch. Thanks. Eubulides (talk) 16:12, 7 September 2009 (UTC)[reply]

Done. — RockMFR 21:52, 7 September 2009 (UTC)[reply]

{{editprotected}}

Following up on the previous request, the Mediawiki software has changed since then, so the template now needs an empty |alt= as well as a |link=. Please install this further sandbox patch to accommodate this. I discovered the problem when reviewing the alt text for the featured article candidate Smedley Butler. Thanks. Eubulides (talk) 23:55, 24 January 2010 (UTC)[reply]
 DoneTheDJ (talkcontribs) 19:09, 25 January 2010 (UTC)[reply]

Date

[edit]

Sometimes federal government documents (especially press releases or other announcements) include the date that they were issued. Could a date parameter be included in this template? Eastmain (talkcontribs) 18:37, 14 March 2010 (UTC)[reply]

add source parameter

[edit]

Please copy Template:Include-USGov/sandbox to Template:Include-USGov. This will accomplish three things:

  1. adding a source parameter, useful for using sub-templates such as {{cite web}}, where this template is being called as an inline citation;
  2. performing error checking for a missing agency parameter; and
  3. fixing a long-standing style issue with misitalicization when used as an inline citation.

Thanks! —hike395 (talk) 00:10, 25 December 2011 (UTC)[reply]

Done. Killiondude (talk) 08:30, 30 December 2011 (UTC)[reply]
As I was preparing to update the documentation, I noticed a serious bug that affected many of the templates that called {{Include-USGov}}: if the template is given an agency and a URL, but no article, it used to create an external link under the agency name, now it doesn't .. I fixed this bug in the sandbox version --- please recopy the sandbox up to the main template.
Note that I revamped the test cases to match the documentation, so we won't have this problem in the future. —hike395 (talk) 09:45, 30 December 2011 (UTC)[reply]
Done. Killiondude (talk) 18:47, 30 December 2011 (UTC)[reply]

Whitespace issue

[edit]

There's an extraneous paragraph break being introduced, I think by the sub-template {{GSA building}}. See Union Station (Tacoma, Washington)#Attribution for an example. Mackensen (talk) 16:02, 1 September 2013 (UTC)[reply]

 Fixed It was indeed extra white space in {{GSA building}}hike395 (talk) 00:59, 2 September 2013 (UTC)[reply]
Thanks!--Mackensen (talk) 12:16, 2 September 2013 (UTC)[reply]

Editable by templateeditor?

[edit]

This seems like a sort of template that should be editable by people with templateeditor rights. Can an admin change it? Thanks! —hike395 (talk) 09:22, 4 January 2015 (UTC)[reply]

Bringing back this request: can we make this template editable by templateeditors? —hike395 (talk) 03:01, 28 June 2015 (UTC)[reply]

Where in an article are this template and its derivatives supposed to be transcluded?

[edit]

It looks like this template and its derivates are often placed in the References section, like https://en.wikipedia.org/wiki/Telecommunications_in_Bosnia_and_Herzegovina#References. But it doesn't look so good. It looks kind of messy to mix different kinds of lists that are about different things into one big list. Is there an official best practice of where to place this form of information? A special section in which to place them, for instance? --Jhertel (talk) 14:14, 11 July 2016 (UTC)[reply]

The custom of putting PD attribution templates at the top of the references is an old one, used in thousands of pages. WP:FREECOPYING supports this custom. However, many editors prefer inline citations when copying free material. WP:FREECOPYING also supports this. This template can be used as an inline citation. A pattern (which I support) is to mark every paragraph that is copied with an inline citation that uses this template. See, e.g., Rocky Mountains. —hike395 (talk) 10:52, 13 July 2016 (UTC)[reply]
Thank you so much for the information and pointers! I personally agree that marking every copied paragraph is best. Otherwise it's hard to know what sentences or paragraphs were copied. --Jhertel (talk) 11:55, 13 July 2016 (UTC)[reply]
@Jhertel and Hike395: I know I'm reviving a nearly four-year-old discussion here...but I came here (truthfully, from {{NTSB}}) to determine where this template is supposed to be placed. The documentation doesn't say. Judging from your discussion, there is no consensus. Can we find a way to give some guidance (i.e. best practice) to editors new to this template or its derivatives? I realize the preference may be complete freedom, but for the doc to avoid the subject entirely is to promote tribal knowledge among experienced editors. – voidxor 19:28, 23 April 2020 (UTC)[reply]

No parens around accessdate

[edit]

Shelbystripes modified the sandbox so that the accessdate is a standalone sentence at the end of the transclusion, rather than a parenthetical phrase. I think it looks better this new proposed way! Thanks for doing this! —hike395 (talk) 06:33, 31 December 2017 (UTC)[reply]

Thanks, I was just trying to write up my description of the proposed edit. It makes the accessdate text render in the same manner as {{cite web}} format, as a separate sentence following the document description. The edit also adjusts the span headers so that all the accessdate text generated is within <span class="reference-accessdate"></span> so that the text is excluded for users that hide the accessdate. I would appreciate a reviewer copying Template:Include-USGov/sandbox to Template:Include-USGov to incorporate these changes. Shelbystripes (talk) 06:40, 31 December 2017 (UTC)[reply]
 Done Looks good! —hike395 (talk) 12:06, 31 December 2017 (UTC)[reply]

Hatnote class

[edit]

The template needs the hatnote class; the page popup will display the template as raw text and ignore other content and the formatting looks off. elijahpepe@wikipedia 23:04, 4 March 2022 (UTC)[reply]

Hatnotes are for pointing people to other places, not for article content. This is, so far as I can tell, treated as article content. It's categorically not a hatnote.
Separately, if this is displaying in a page popup, that indicates to me that the page needs to be refactored, redirected, or expanded. No popups should be displaying this because they simply shouldn't be short enough to display it. Izno (talk) 23:10, 4 March 2022 (UTC)[reply]

No-prescript

[edit]

Sometimes the text from a USGov work that was copied into a Wikipedia article has over time been edited in such a way that although the summary text still relies on the USGov, the content of the work, it no longer needs the PD notice to meet the plagiarism guideline. As in the case of the template {{CIA World Factbook}} the template wrapper is still useful (for example displaying the correct archived version), and converting the current information displayed wrapper template into the same display using just {{cite web}} would be time consuming, I think it would be useful to have a boolean parameter called no-prescript which if set stops the display of the prescript. -- PBS (talk) PBS (talk) 09:48, 28 September 2022 (UTC)[reply]

Unless |article= and |url= are both set, there isn't a {{cite web}} template that is wrapped. To take a common case, consider {{Include-USGov|agency=[[Men in black]]}}, which produces
Public Domain This article incorporates public domain material from websites or documents of the Men in black.
I don't think |no-prefix= could return anything like a standalone citation in this case.
Perhaps it would be better to understand what you're trying to accomplish with the new parameter? If you're looking for a version of {{CIA World Factbook}} that does not have a PD prefix, may I suggest {{CIA World Factbook link}}? It has the same country / archiving logic. — hike395 (talk) 03:49, 29 September 2022 (UTC)[reply]
I thought I had made it fairly obvious in my first post to this thread. It is not just {{CIA World Factbook}} but other templates for example like {{US government sources}} (another one I am familiar with). Indeed your example of {{CIA World Factbook link}} is another good example, because if a |no-prefix= existed then {{CIA World Factbook link}} could wrap around {{CIA World Factbook}} with no-prefix=y set reducing the need to code two different templates (which I see you have been doing to keep them synchronised).
That there will be examples where it is not necessary, but that is no reason for not coding it, when it could be useful in other cases.
As an aside I think your example {{Include-USGov|agency=[[Men in black]]}} is better done with the template {{source-attribution}}, {{source-attribution|[[Men in black]]}} (as described in the plagiarism guideline):
Public Domain This article incorporates text from this source, which is in the public domain: Men in black
As another aside I think {{CIA World Factbook link}} ought to be moved to {{Cite CIA World Factbook}} to bring it in line with other templates such as {{Cite web}}, {{Cite DNB}} (with its companion {{DNB}}) , {{Cite EB1911}} (with it companion {{EB1911}} etc, etc.
-- PBS (talk) 08:06, 29 September 2022 (UTC)[reply]
This template is getting creaky and old, and is used as a base for hundreds of other PD templates (e.g., {{USGS}}, {{NPS.Gov}}), both as a display and inline as a citation. At this point, adding logic to sometimes strip away the PD prefix and otherwise warn would be major template surgery. I think the whole template needs to be ported to Lua, and if we're going to do that, the design should be carefully rethought. I'll think about this and come back with a proposal. — hike395 (talk) 15:48, 29 September 2022 (UTC)[reply]

As part of a refactoring of this template (which I'll propose shortly), I created {{Cite USGov}}. I think it will fulfill your needs: it is a template that accepts all of the same arguments as {{Include-USGov}}, but produces a CS1 citation:

{{Cite USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|access-date=2022-10-01}}John Q. Public. Reference document. United States Department. Retrieved 2022-10-01.

We can add documentation to this template to suggest use of {{Cite USGov}} when the material is no longer included verbatim, but needs to be cited anyway. — hike395 (talk) 17:14, 1 October 2022 (UTC)[reply]

Sorry I am busy in the real world an will look at this solution and the one next section when I have time. But it certainly looks like a big step in the right direction. -- PBS (talk) 14:19, 25 October 2022 (UTC)[reply]

Simplification and refactoring

[edit]

I'm proposing simplifying and refactoring the template for three reasons:

  1. Over the years, the logic of the template has gotten messy and hard to change.
  2. Now that this template wraps CS1, there is a chance that it will produce redundant citations through wrapper templates. For example, via {{USGS}}, it's easy to generate:
    {{USGS|work=USGS|title=Geology of Something|url=https://usgs.gov/something.html}}Public Domain This article incorporates public domain material from "Geology of Something". USGS. United States Geological Survey.
  3. PBS wanted a version of the template that produced a stand-alone citation (without a PD inclusion warning)

These issues are now solved in the sandbox, see test cases for new behavior.

What I've done is push as much information into the citation as possible. That means not mentioning the PD source in the preamble. The preamble will consist simply of:

Public Domain This article incorporates public domain material from

and then is followed by the generated citation. For example:

{{Include-USGov|agency=USGS|article=Reference document|url=http://www.usgs.gov/doc.html|first=John Q.|last=Public|accessdate=2022-08-08}}Public Domain This article incorporates public domain material from Public, John Q. Reference document. USGS. Retrieved 2022-08-08.

The code is now very simple: it produces the preamble, and then generates a citation (if there is any information at all), or else will fall back to a generic statement (e.g., "websites or documents of the USGS"). The citation generation template is now available at {{Cite USGov}}.

Comments? Thoughts? Suggestions? — hike395 (talk) 04:10, 3 October 2022 (UTC)[reply]

 Implemented -- I forgot to update this Talk page: because there were no comments, I went ahead and implemented the change on October 6 and went live. — hike395 (talk) 13:43, 26 October 2022 (UTC)[reply]