Jump to content

Template talk:Track listing

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Track listing)

Template-protected edit request on 11 May 2025

[edit]

Description of suggested change:

Change lines 295-311 of Module:Track listing from:

function TrackListing:makeIntro()
	if self.all_writing then
		return string.format(cfg.tracks_written, self.all_writing)
	elseif self.all_lyrics and self.all_music then
		return mw.message.newRawMessage(
			cfg.lyrics_written_music_composed,
			self.all_lyrics,
			self.all_music
		):plain()
	elseif self.all_lyrics then
		return string.format(cfg.lyrics_written, self.all_lyrics)
	elseif self.all_music then
		return string.format(cfg.music_composed, self.all_music)
	else
		return nil
	end
end

to:

--------------------------------------------------------------------------------
-- Function for automatic punctuation for parameters:
--      all_writing, all_lyrics, all_music
-- Punctuation defaults to '.' unless ':' or '.' already exist
-- Automatic punctuation limited to parameter values not containing parser tags
--      i.e. <ref>Text</ref>, <nowiki></nowiki>, etc.
--------------------------------------------------------------------------------
function fullstop(a)
  if a ~= mw.text.killMarkers(mw.getCurrentFrame():preprocess(a)) or 
     a:sub(-1,-1) == ":" or 
     a:sub(-1,-1) == "." then
  	return a
  else
  	return a .. '.'
  end
end

function TrackListing:makeIntro()
	if self.all_writing then
		return string.format(cfg.tracks_written, fullstop(self.all_writing))
	elseif self.all_lyrics and self.all_music then
		return mw.message.newRawMessage(
			cfg.lyrics_written_music_composed,
			self.all_lyrics,
			fullstop(self.all_music)
		):plain()
	elseif self.all_lyrics then
		return string.format(cfg.lyrics_written, fullstop(self.all_lyrics))
	elseif self.all_music then
		return string.format(cfg.music_composed, fullstop(self.all_music))
	else
		return nil
	end
end

This is the edit to the primary module which required the recently-implemented edit to the config. This upgrades the parameters all_writing, all_lyrics, and all_music to output with automatic punctuation in most cases. The added function, "fullstop", works as such:

  • If parameter value contains any parser tags, or if the parameter already ends with ":" or ".", then don't alter anything.
  • Otherwise, add "." to the end of the parameter value.

The function is then applied to the aforementioned parameters within the already-existing function "TrackListing:makeIntro()". Note: in the case where all_lyrics and all_music are both present, it is important to only apply the function to all_music as shown above.

If implemented, feel free to alter the comments at the top or the function name for clarity if necessary. Fundgy (talk) 14:21, 11 May 2025 (UTC)[reply]

@Fundgy:  Done. Est. 2021 (talk · contribs) 04:37, 12 May 2025 (UTC)[reply]

A sub-list for a song is needed

[edit]

At Flower Power (The Flower Kings album)#Track listing, editors there attempted to indent the 18 parts of the song. However, while the hacks they used might work visually (and they don't really), they completely fail in how tables are read. Is there a way this can be supported by the template? Gonnym (talk) 18:29, 25 August 2025 (UTC)[reply]

"Length" should be an optional column

[edit]

This would be for when track lengths are unknown or irrelevant. For example, in Fuck (2005 film) § Track listing, the track lengths are not included because they would be pointless and distracting, but the "Length" column header remains frustratingly visible. I am unfamiliar with Lua, so I cannot make an exact edit request for this. CopperyMarrow15 (talk edits) 22:23, 25 August 2025 (UTC)[reply]

From the template's documentation: This template is an optional way to organize track listings in articles about albums and singles. Does that film even have a soundtrack album? If it does, the track lengths should be sourced from the album, or from a site listing the contents of the album. If there is no soundtrack album that can be sourced, the section should be removed as WP:OR. The whole section containing the track listing is unreferenced. I don't think it's a good example to use for a request to change this template's code. – Jonesey95 (talk) 00:14, 26 August 2025 (UTC)[reply]
MOS:FILMMUSIC says: A soundtrack may refer to [...] a collection of prerecorded songs compiled for the film. [...] For collections of prerecorded songs, a track listing can be presented to identify the songs and their artists. The {{Track listing}} template can be used for this presentation. I assume that a tracklist of prerecorded songs can be sourced from the film itself, in the same way that a plot summary or a cast list can, but I'm not sure. I'll be honest: I wasn't expecting a Featured Article to have such a mistake, so I just assumed that the tracklist is fine. I would ask the article's main author Cirt for input, but it looks like they're blocked.
Regardless, I still think that being able to hide the "Length" column header might be useful in some situations. Consider, for example, a film that uses a set of ancient hymns as its background soundtrack, and that although this soundtrack was never released as an album, sufficient sources exist for the tracklist to be included on Wikipedia. In this hypothetical case, it wouldn't make sense to include a "Length" column in the tracklist. CopperyMarrow15 (talk edits) 03:52, 26 August 2025 (UTC)[reply]
The tracklist was there when the article was promoted to FA by Ian Rose in November 2013, so I'm pinging him instead. I'm curious what he thinks. CopperyMarrow15 (talk edits) 04:07, 26 August 2025 (UTC)[reply]

Collapsed description requires copy editing

[edit]

Consider the table, Template parameters at the Description for |collapsed=. It currently includes a sentence beginning with "Use of this category will added the article to" (emphasis mine). This could be modified to "Use of this parameter will add the article to" or "Use of this parameter will have the article added to" (changes bolded).Didier Landner (talk) 22:56, 6 September 2025 (UTC)[reply]

The documentation is not protected. – Jonesey95 (talk) 21:37, 8 September 2025 (UTC)[reply]

Edit request 1 November 2025

[edit]

Description of suggested change: How about inplementing arrangements, too? The arranger is often identical with the composer. To mention the arranger here, would avoid the always somewhat awkward listing with the instruments (current e.g. "George Duke – vocals, keyboards, percussion (5), arrangements"), and not seldomly even sorted under production credits (probably ok for productions that are created at the mixing desk (like oftentimes Hip-hop a.o.).

Diff: red-outlined triangle containing exclamation point Warning Unnamed parameter |1= set to default value. Please change it. Failure to use {{Text diff}} to specify your requested text changes, if not adequately described above, may lead to your request being denied.
MenkinAlRire 21:29, 1 November 2025 (UTC)[reply]