Template talk:Ig

Replacing this with Template:Idgames
See overall proposal here. Feel free to edit this post if needed; I'm permalinking in anticipation of multiple drafts.

Cases 7 through 10 are obviously not exhaustive, but they encompass all the real transclusions I was able to find. (In particular there are ways of entering contradictory parameter values, which all editors thus far seem to have avoided! That implies a very low risk of accidentally creating broken links during this task.)  If there are stragglers after the bot's main run, I'll migrate those manually.

For backward compatibility we have to set the linkonly flag 100% of the time (unless, per the documentation, the original editor had supplied neither file nor ID values, but it appears there are no live examples).

As in prior scripted tasks, I'm assuming it's OK to be more fastidious with syntax than a human would be, for ease of debugging. I have no intention of removing existing shortcuts from Template:Idgames, in case humans continue to find them convenient.


 * Case 1&#58; File as first named parameter without extension, no other parameters
 * Preserve the file value and assign "Doomworld/idgames" as the title (it's the default here but not in the older template).


 * Case 2&#58; File as first named parameter including extension, no other parameters
 * Strip off the extension per the third bullet here, then treat as case 1.


 * Case 3&#58; File as first named parameter without extension, title as named parameter
 * Preserve the file and title values respectively.


 * Case 4&#58; File as first named parameter including extension, title as named parameter
 * Strip off the extension, then treat as case 3.


 * Case 5&#58; File as first named parameter without extension, title as unnamed parameter
 * Preserve the file and title values respectively. I couldn't find any situations where a file was the first named parameter, followed by multiple unnamed parameters, so I suggest it is safe to treat the second parameter as a title unconditionally.


 * Case 6&#58; File as first named parameter including extension, title as unnamed parameter
 * Strip off the extension, then treat as case 5.


 * Case 7&#58; ID as first named parameter, no other parameters
 * Preserve the ID value and assign "Doomworld/idgames" as the title (similar to case 1). If Xymph agrees to make a subsequent pass to synchronize IDs and file paths as stated here, then arguably this does not violate the letter of the documentation. :>


 * Case 8&#58; ID as first named parameter, title as named parameter
 * Preserve the ID and title values respectively.


 * Case 9&#58; ID as first named parameter, title as unnamed parameter
 * Preserve the ID and title values respectively (same proviso as case 5).


 * Case 10&#58; ID as first named parameter, title as unnamed parameter, link text as subsequent unnamed parameter which is ignored
 * Hmmm. This might be an attempt to include hover text, which isn't supported.  Based on the examples I've seen, I tentatively propose preserving the ID and concatenating the strings, e.g. .  That might be awkward or stylistically wrong.  Is there a way to list all occurrences beforehand, so perhaps our regular "body of work" contributors can opine?

Examples
HTH. Ryan W (living fossil) 19:38, 22 January 2020 (CST)