Jump to content

Module talk:Excerpt

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mathglot (talk | contribs) at 05:54, 18 January 2025 (Possible ToU attribution violation issue with copy/translation from articles with excerpts: Several possibilitie.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template-protected edit request on 27 August 2024 don't excerpt shortcuts

'[Aa]nchor',
+
'[Aa]nchor', '[Ss]hc?', '[Ss]hort', '[Ss]hortcut' '[Ss]horthand', '[Pp]olicy shortcut'

These additional templates are as problematic as {{anchor}}. Excerpting them misinforms because the shortcuts redirect to the original page. Also, {{shortcut}} has a built-in {{anchor}}. The use case is essays like [1]. 142.113.140.146 (talk) 04:54, 27 August 2024 (UTC)[reply]

Unlike anchors, those elements are designed to be seen, looks like there is already an option to not show them as was done in the example above. — xaosflux Talk 12:44, 27 August 2024 (UTC)[reply]
Yes, I had to set the manual option |templates=-policy shortcut. But Module:Excerpt/config is about defaults, and I claim that there is no use case that wants to show these elements while excerpting. 142.113.140.146 (talk) 15:47, 27 August 2024 (UTC)[reply]
 Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. --Ahecht (TALK
PAGE
)
14:45, 27 September 2024 (UTC)[reply]

Transclude lead excerpt doesn't recognize imagemaps

See User:Queen of Hearts/D#Passports; {{transclude lead excerpt}} fails to show the lead of User:Queen of Hearts/Drafts/List of passports, which begins with an WP:Imagemap. Thanks, Queen of Hearts (talk) 05:25, 7 September 2024 (UTC)[reply]

Italic title issue

The blacklist at Module:Excerpt/config currently does not filter out {{Italic}}, which redirects to {{Italic title}}. This led to Criminal law in the United States being italicized because it excerpted Res gestae which (until just now) transcluded {{Italic}}. -- Visviva (talk) 19:28, 15 September 2024 (UTC)[reply]

After a bit of fiddling I found it also does not filter out {{Italics title}} -- Brit milah was causing Religion and circumcision to italicize and I could not for the life of me figure out why. wound theology 02:48, 14 November 2024 (UTC)[reply]

displaytitle and sections

I believe parameter "displaytitle" should not be appended with the section. For example, {{excerpt|Tectonics on icy moons|Plate tectonics}} should render as "This section is an excerpt from Plate tectonics on icy moons."; currently, it's rendered as "This section is an excerpt from Plate tectonics on icy moons § Plate tectonics." fgnievinski (talk) 01:47, 19 October 2024 (UTC)[reply]

images in infobox building

It seems images in template:Infobox building are causing some difficulties; could somebody more knowledgeable take a look at this draft section, please? the problem appears at "File:1; |thumb|". thanks! fgnievinski (talk) 05:46, 22 October 2024 (UTC)[reply]

That article was drastically misusing {{Infobox building}}. I fixed it to use a normal multiple image template instead. – Jonesey95 (talk) 19:31, 22 October 2024 (UTC)[reply]
thank you! fgnievinski (talk) 01:40, 23 October 2024 (UTC)[reply]

Excerpt misses <p>...</p> in last paragraph

I have been trying to fix a bug in scripts that are not able to detect excerpts (namely, User:Caorongjin/wordcount and Wikipedia:Prosesize). However, there seems to be a bug in the Module:Excerpt. Namely, I see the <div>...</div> that has the classname of "excerpt"; but all the paragraphs with the exceptions of the last paragraph are wrapped in <p>...</p>. See for example Enhanced oil recovery#Greenhouse gas emissions. —Caorongjin 💬 21:44, 29 October 2024 (UTC)[reply]

Strange missing end tag for bold

To fix a missing end tag for bold in Portal:Companies, which uses {{Transclude random excerpt}}, I edited Sony, changing

{{Nihongo foot|'''Sony Group Corporation'''|ソニーグループ株式会社|Sonī Gurūpu Kabushiki gaisha|{{IPAc-en|ˈ|s|oʊ|n|i}}|group=lower-alpha|extra2={{respell|SOH|nee}}|lead=yes}} (formerly {{Nihongo foot|'''Tokyo Tsushin Kogyo [[Kabushiki gaisha|K.K.]]'''|東京通信工業株式会社|4=Tokyo Telecommunications Engineering Corporation|lead=yes|group=lower-alpha|Tōkyō Tsūshin Kōgyō Kabushiki gaisha}} and {{Nihongo foot|'''Sony Corporation'''|ソニー株式会社|lead=yes|group=lower-alpha|Sonī Kabushiki gaisha}})

to

{{Nihongo foot|'''Sony Group Corporation'''|ソニーグループ株式会社|Sonī Gurūpu Kabushiki gaisha|{{IPAc-en|ˈ|s|oʊ|n|i}}|group=lower-alpha|extra2={{respell|SOH|nee}}|lead=yes}} (formerly {{Nihongo foot|'''Tokyo Tsushin Kogyo''' <!-- for now, don't bold outside the wikilink, because that causes missing end tag for bold when this page is transcluded with {{Transclude random excerpt}}. -->[[Kabushiki gaisha|'''K.K.''']]|東京通信工業株式会社|4=Tokyo Telecommunications Engineering Corporation|lead=yes|group=lower-alpha|Tōkyō Tsūshin Kōgyō Kabushiki gaisha}} and {{Nihongo foot|'''Sony Corporation'''|ソニー株式会社|lead=yes|group=lower-alpha|Sonī Kabushiki gaisha}})

It did not work to change the problematic snip to {{Nihongo foot|'''Tokyo Tsushin Kogyo''' '''[[Kabushiki gaisha|K.K.]]'''...}}; it excerpted the bold from just before the wikilink but not the bold from just after the wikilink. It would be good to figure out why the original markup caused a problem and fix it. —Anomalocaris (talk) 00:39, 31 December 2024 (UTC)[reply]

The issue was to do with there being an unexpected pipe wikilink in {{Nihongo foot}}, which would cause the cleanup during stripTemplates to accidentally leave an unclosed wikilink and template, which would later get trimmed down and cause everything after it to vanish, leading to the above linter error as well as all the text dissapearing. I've fixed this in Special:Diff/1266381727. Aidan9382 (talk) 09:31, 31 December 2024 (UTC)[reply]
Aidan9382: Looks good. Thank you for fixing Module:Excerpt/portals, and for reverting my 3 edits of Sony. —Anomalocaris (talk) 18:57, 31 December 2024 (UTC)[reply]

Infobox images in dark mode

See: COVID-19_drug_development#Novel_viral_replication_inhibitors

Ideally "Module:Excerpt" should copy the CSS class from both Template:Infobox drug and Template:Chembox.

Infobox drug is currently working nicely in dark mode. See examples at:

Template:Infobox drug/testcases7images#Dark mode test

Chembox still needs some work: Template:Chembox/testcases7images#Dark_mode_tests

skin-invert
skin-invert-image

Both infobox uses: skin-invert-image and skin-invert. As "Module:Excerpt" uses the images in a thumb, it should always opt for "skin-invert-image" instead of "skin-invert", the reasons can be shown in the examples above.

Images uses background-color: var(--background-color-inverted,#f8f9fa); by default, and they should not be applied when there is a skin-invert-image class or the bg-transparent class.

We could try to adopt a similar thing to "Module:Excerpt".

Thanks! — Arthurfragoso (talk) 15:07, 10 January 2025 (UTC)[reply]

Possible ToU attribution violation issue with copy/translation from articles with excerpts

I wanted to raise a possible issue involving violation of licensing requirements as described at WP:CWW and at WMF Terms of Use, which require crediting the original authors of a copied or translated passage in the target article's edit summary (see WP:CWW and WP:TFOLWP). Proper attribution is still possible when Excerpt (or selective transclusion) is involved, but is a bit tricky and may need to be addressed at the appropriate venue. (That venue is mostly not here, but I wanted to raise the issue here first, while I think about where and how to raise it more generally; probably at WP:CWW and perhaps elsewhere.)

The problem is when an editor at Wikipedia article 'A' copies or translates material from article 'B', where the 'B' content in question is not actually in 'B's wikicode, but excerpted/transcluded from article 'C'. In this case, the authors to be credited are not the B-authors, but the C-authors. (Or both, if what was excerpted spanned content hosted at 'B' as well as content excerpted from 'C' to 'B' into the excerpt area).

A real world example is at French colonial law ('A'), in this edit of 13:12, 16 January 2025, which credits the authors of fr:Droit colonial français ('B'). Our article talks about Colonial trade under French colonial law and a trade regime known as the "Exclusif." This can be found in the French article in section § Régime de l'exclusif. If you edit that section (modifier le code) you will see that it is an Excerpt (Extrait) of French article fr:Principe de l'exclusif ('C'). It is this last article that should have been credited, but was not.

I don't think this situation is an existential threat to the {{Excerpt}} template, but people here should be aware of it. I suspect that after some discussion among transclusion folks and attribution/copyright folks, the end result will be additional documentation in a few places (including here) about how to properly attribute copied or translated content that involves transclusion of third-party content. (Fwiw: I ended up at that diff investigating a completely different issue; it turns out that both of the refs in that diff are LLM hallucinations citing non-existent sources, which is curious, but irrelevant for the attribution issue under discussion.) Thanks, Mathglot (talk) 01:14, 18 January 2025 (UTC)[reply]

How is this different from all other types of transluded pages? — xaosflux Talk 02:18, 18 January 2025 (UTC)[reply]
Not sure I understand the question, starting with the meaning of "transcluded pages". If you meant:
  • How is copying from an article section that has an {{excerpt}} in it different from copying from an article section that has WP:SELTRANS or some other transclusion method in it?
➤ They are no different.
  • What's different about this case, compared to any typical use of Excerpt (or SELTRANS, or any transclusion method)?
➤ Typical usage of excerpt does not require attribution because nothing was copied. For example, the following excerpt from Ralph Waldo Emerson does not require attribution on this page, because nothing from the Emerson page was copied here, and therefore there is no need for attribution, per the ToU:
excerpt from Ralph Waldo Emerson

Emerson was born in Boston, Massachusetts, on May 25, 1803, to Ruth Haskins and the Rev. William Emerson, a Unitarian minister. He was named after his mother's brother Ralph and his father's great-grandmother Rebecca Waldo. Ralph Waldo was the second of five sons who survived into adulthood; the others were William, Edward, Robert Bulkeley, and Charles. Three other children—Phoebe, John Clarke, and Mary Caroline—died in childhood. Emerson was of English ancestry, and his family had been in New England since the early colonial period, with Emerson being a seventh-generation descendant of Mayflower voyagers John Howland and Elizabeth Tilley through their daughter Hope.

  • How is copying from an article section that has an excerpt (or other transclusion method) in it, different from copying from an article section that does not include an excerpt?
➤ They differ in what needs to be attributed. The second case is the typical one, a simple copy (or translation) of material from one Wikipedia article to another—attribution must be given per the ToU, and this case is the one that is the entire subject of WP:Copying within Wikipedia. The first case is different. When article 'A' copies a section from article 'B', and the 'B' section contains an excerpt from 'C', then it depends how they did it, from the wikicode, or the rendered page. If they copied from the wikicode of 'B', then they have to credit the authors of 'B', and that's all; the {{Excerpt}} template targeting 'C' will get copied to 'A', but not the content, so no credit to 'C' authors id required. (Footnote: in some cases, no credit at all is needed, if the entire copy from 'B' consists of an {{Excerpt}} statement, because if no creative content from 'B' is copied over, then nothing needs accreditation.) If they select/copy from the rendered page (essentially, from 'Print view') of 'B', then they have to attribute it to both the authors of 'B' (if any creative content included) and definitely to the authors of 'C'.
If you meant something entirely different, please enlighten. Mathglot (talk) 05:54, 18 January 2025 (UTC)[reply]