Module talk:Template test case: Difference between revisions

Content deleted Content added
Works: Reply
Line 191:
 
My question is, '''''why'''''??? If these templates are a "family", and so often used together, doesn't it make sense for {{tlx|Test case nowiki}} to take the same set of arguments that {{tlx|Test case}} and all the others take? Even if it's not strictly ''necessary'' for them to be preceded by underscores? It would make converting test cases between the non-nowiki and nowiki versions a lot quicker and more convenient. Am I really the only person who finds themselves doing that pretty frequently? [[User:FeRDNYC|FeRDNYC]] ([[User talk:FeRDNYC|talk]]) 06:33, 15 July 2023 (UTC)
 
:The technical reason for why comes down to [[Module:Template test case#L-770|this bit of code]], in which the nowiki wrapper has its arguments done differently. The reason I think this was done in practice is because the only reason the underscores are used in the {{tl|Test case}} version is because you have to provide the real arguments, so prefixing the options with _ prevents conflicts. Since the nowiki version just takes the parameter 1, it had no need for the underscores. [[User:Aidan9382|Aidan9382]] <sub>([[User talk:Aidan9382|talk]])</sub> 06:57, 15 July 2023 (UTC)