Template talk:Template link general/Archive 2
This is an archive of past discussions about Template:Template link general. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 |
Need version without nowiki
This edit request to Template:Tlg has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Wikipedia:Requested moves/Technical requests/Instructions (Special:PermanentLink/938164624) is currently broken because someone changed tlsp to use this template and this template does a nowiki wrap to disable the formatting.
In practice, it is quite common to want to include some manual formatting in template parameters, such as italics for things that the user should fill in. Tlg should get a wiki-enabled version. To do so, replace the chunk with {#ifeq:{{{2|¬}}}|¬ | ||{{#tag:nowiki|{{{2}}}}}}}
with:
-->{{#ifeq:{{{nowiki|}}}|y|<!--
-->{{#ifeq:{{{2|¬}}}|¬ | ||{{#tag:nowiki|{{{2}}}}}}}<!--
-->{{#ifeq:{{{3|¬}}}|¬ | ||{{#tag:nowiki|{{{3}}}}}}}<!--
-->{{#ifeq:{{{4|¬}}}|¬ | ||{{#tag:nowiki|{{{4}}}}}}}<!--
-->{{#ifeq:{{{5|¬}}}|¬ | ||{{#tag:nowiki|{{{5}}}}}}}<!--
-->{{#ifeq:{{{6|¬}}}|¬ | ||{{#tag:nowiki|{{{6}}}}}}}<!--
-->{{#ifeq:{{{7|¬}}}|¬ | ||{{#tag:nowiki|{{{7}}}}}}}<!--
-->{{#ifeq:{{{8|¬}}}|¬ | ||{{#tag:nowiki|{{{8}}}}}}}<!--
-->{{#ifeq:{{{9|¬}}}|¬ | ||{{#tag:nowiki|{{{9}}}}}}}<!--
-->{{#ifeq:{{{10|¬}}}|¬ | ||{{#tag:nowiki|{{{10}}}}}}}<!--
-->{{#ifeq:{{{11|¬}}}|¬ | ||{{#tag:nowiki|{{{11}}}}}}}<!--
-->|{{#ifeq:{{{2|¬}}}|¬ | ||{{{2}}}}}<!--
-->{{#ifeq:{{{3|¬}}}|¬ | ||{{{3}}}}}<!--
-->{{#ifeq:{{{4|¬}}}|¬ | ||{{{4}}}}}<!--
-->{{#ifeq:{{{5|¬}}}|¬ | ||{{{5}}}}}<!--
-->{{#ifeq:{{{6|¬}}}|¬ | ||{{{6}}}}}<!--
-->{{#ifeq:{{{7|¬}}}|¬ | ||{{{7}}}}}<!--
-->{{#ifeq:{{{8|¬}}}|¬ | ||{{{8}}}}}<!--
-->{{#ifeq:{{{9|¬}}}|¬ | ||{{{9}}}}}<!--
-->{{#ifeq:{{{10|¬}}}|¬ | ||{{{10}}}}}<!--
-->{{#ifeq:{{{11|¬}}}|¬ | ||{{{11}}}}}}}<!--
Why not just use the italics option? Because people may want to use a mix of italicized text and non-italicized, fixed stuff. Say you are making an example for linking to a project on GitHub: instead of https://github.com/username/project
you say https://github.com/username/project
. Explaining code "language" stuff like formatting tend to end up like that. I will fix the page that way, but it doesn't mean these sort of explanations will not go away.
Oh, and italics makes the PIPES italicized too. I want subst:RMassist|current page title|new page title|reason=reason for move
, not subst:RMassist|current page title|new page title|reason=reason for move
.
--Artoria2e5 🌉 11:06, 16 April 2020 (UTC)
- Not done for now: It sounds like you want a module, and it looks like any new code should be tested on the testcases page first. Please experiment in the sandbox and let us know when the tests are working. – Jonesey95 (talk) 16:42, 16 April 2020 (UTC)
Template-protected edit request on 16 April 2020
This edit request to Template:Tlg has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I have reimplemented the whole thing in Lua, as italicized PIPES in between is unacceptable anyways: Module:Tlg
Just replace the code with the following and bug me if it fails. I am a bit too tired to create a test page.
{{#Invoke:Tlg|main}}
Artoria2e5 🌉 12:29, 16 April 2020 (UTC)
- Partly done: I have put the module into the sandbox. I see big red errors on the testcases page. When you are better rested, please take a look at the testcases page and see if you can fix the module. – Jonesey95 (talk) 16:41, 16 April 2020 (UTC)
- @Jonesey95: I just plumbed through the cases. They now look the same except for the italics case. --Artoria2e5 🌉 23:52, 20 April 2020 (UTC)
- Nicely done. The one with | does not work. The one with = does not work. The rest of them look the same, or are improved. Just a bit more work to do. – Jonesey95 (talk) 05:32, 21 April 2020 (UTC)
- @Jonesey95: The two entity cases work now, at the cost of turning off nowiki by default, as #tag does not handle entities the same way as mw.text.whatever. frame:callParserFunction might better approximate #tag, but its use is discouraged to start with and it would mean _main needs a frame too. --Artoria2e5 🌉 10:53, 21 April 2020 (UTC)
- Nicely done. The one with | does not work. The one with = does not work. The rest of them look the same, or are improved. Just a bit more work to do. – Jonesey95 (talk) 05:32, 21 April 2020 (UTC)
- @Jonesey95: I just plumbed through the cases. They now look the same except for the italics case. --Artoria2e5 🌉 23:52, 20 April 2020 (UTC)
- Done Looks great. – Jonesey95 (talk) 14:56, 21 April 2020 (UTC)
{{spaces}} template does not function within {{tlg}}.
See {{tlg|{{space}} tlg {{space}} }}
Results:
{{[[Template: tlg | tlg ]]}}
Instead of:
See {{tlg| tlg }}
--BoldLuis (talk) 09:36, 11 May 2020 (UTC)
Um... why would you want to have spaces on either side of the tlg? Primefac (talk) 15:23, 20 November 2020 (UTC)- Okay, think I see the issue. If you're looking for
See {{tlg| tlg }}
, you want to use{{tlg|tlg|{{spaces}}tlg{{spaces}}}}
, which gives {{tlg| tlg }}; you didn't have the second parameter. Primefac (talk) 15:26, 20 November 2020 (UTC)
Requested move 21 November 2020
- The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.
The result of the move request was: IAR closed, moved. If someone doesn't like it, they are more than welcome to open an RM for going the opposite direction. Primefac (talk) 12:00, 21 November 2020 (UTC) Primefac (talk) 12:00, 21 November 2020 (UTC)
– Match name with template. * Pppery * it has begun... 00:53, 21 November 2020 (UTC)
- Support, obviously. I was going to just move it but I guess this would make it official? Primefac (talk) 02:18, 21 November 2020 (UTC)
- @Primefac: There is a request at Wikipedia:Requests for page protection#Module:Tlg to fully protect Module:Tlg. It seems to make sense for the move to happen first, then fully protect. Per IAR or whatever, I suggest you do that now, putting me down for a support if it helps. At any rate, leaving it half done doesn't seem desirable. Johnuniq (talk) 04:08, 21 November 2020 (UTC)
- The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Number of parameters
Artoria2e5, I was looking at the module and noticed that it is capping the number of parameters at 10, similar to the "old" pre-module functionality. Was this an intentional choice, or primarily stylistic to match that old functionality? Primefac (talk) 13:30, 21 November 2020 (UTC)
- Primefac, it's primarily to match the old thing. Artoria2e5 🌉 20:05, 21 November 2020 (UTC)
- Cool. Can you (or Jonesey95, who helped with the original implementation) think of a reason why we should keep it capped? My main thought would be because one doesn't necessarily need to show more than ten params. Primefac (talk) 20:07, 21 November 2020 (UTC)
- If there is a need for it, we can probably increase it by changing the number "12" in the Lua code to something higher. I am definitely not a Lua programmer, though. – Jonesey95 (talk) 00:36, 22 November 2020 (UTC)
- I guess there's never been a concern before, happy to leave as-is. Primefac (talk) 01:16, 22 November 2020 (UTC)
- If we are using a module now, I see no valid reason for this restriction. It could easily be unrestricted now. I've actually run into issues where I did not have enough parameters (making me use encoded pipe symbols
|
), see Template:Wd/doc/examples. Therefore, I'd say to remove the cap. Thayts ••• 22:16, 21 December 2020 (UTC)
- If we are using a module now, I see no valid reason for this restriction. It could easily be unrestricted now. I've actually run into issues where I did not have enough parameters (making me use encoded pipe symbols
- I guess there's never been a concern before, happy to leave as-is. Primefac (talk) 01:16, 22 November 2020 (UTC)
- If there is a need for it, we can probably increase it by changing the number "12" in the Lua code to something higher. I am definitely not a Lua programmer, though. – Jonesey95 (talk) 00:36, 22 November 2020 (UTC)
- Cool. Can you (or Jonesey95, who helped with the original implementation) think of a reason why we should keep it capped? My main thought would be because one doesn't necessarily need to show more than ten params. Primefac (talk) 20:07, 21 November 2020 (UTC)