Module talk:Template test case: Difference between revisions

Content deleted Content added
Line 292:
 
...Potentially useful? Some flaw I've overlooked in the proposed functionality? Or just not worth the effort, regardless whether or not it would work? [[User:FeRDNYC|FeRDNYC]] ([[User talk:FeRDNYC|talk]]) 18:21, 29 August 2024 (UTC)
 
:I've since decided that the parameter names {{para|template1name1}} and {{para|template1name2}} feel awkward and confusing. They '''should''' be {{para|template1name1}} and {{para|template2name1}}, if anything, but that won't work because {{para|template1}} and {{para|template2}} are existing parameters that have different, incompatible definitions in the code.
:Nevertheless, a call using e.g. {{para|template1name1|archive top}}{{para|template1name2|archive bottom}} just feels confusing. (They're '''not''' different ''names'' for the first template, they're ''different '''templates''''' to be used in the first rendering of the test case.)
:So to avoid that confusion, I think it would be better to make {{para|templatename1}} the new equivalent for {{para|template1}}, instead. The second template to use in rendering the test case would be just {{para|templatename2}}. {{para|template2name1}} would still be equivalent to {{para|template2}}, and {{para|template2name2}} would still be the corresponding equivalent to {{para|templatename2}} for the second rendering of the case. (Though often they'd not be specified, and default to the {{code|/sandbox}} versions of the templates specified for {{para|templatename1}} .. {{para|templatename<var>N</var>}}. The notion of a "{{param|template1}}" parameter would be a deprecated compatibility labeling — the "proper"/"preferred" identifiers would be {{param|templatename1}} ... {{param|templatename<var>N</var>}}. Which, handily, would also exactly correspond to the placeholder strings {{code|__TEMPLATENAME1__}} ... <code>__TEMPLATENAME<var>N</var>__</code> used to insert them into the nowiki'd code.
:The other option would be {{para|case1template1}} ... {{para|case1template<var>N</var>}} for the first rendering, then {{para|case2template1}} ... {{para|case2template<var>N</var>}} for the normally-defaulted-to-<code>/sandbox</code> versions, and so on... But that's a much bigger and more disruptive change that doesn't feel worth the upheaval. (It also changes the meaning of "template1" vs. "template2", compared to their current definition. So, still potentially confusing.) [[User:FeRDNYC|FeRDNYC]] ([[User talk:FeRDNYC|talk]]) 03:47, 7 October 2024 (UTC)
 
== Why visual matches instead of string matches? ==