Re: [Wikitech-l] tran-subst-antiation
Aryeh Gregor wrote: https://bugzilla.wikimedia.org/show_bug.cgi?id=4484 That should do what you want. Yes, this might be the equivalent of {{substonlysubst:/substonly. That RFE has been around for years, and I was aware of it. The problem is, interactions between two different kinds of markup parsing ( and {{}}) are often unpredictable, and have changed. In the beginning, {{subst:# didn't work. It does now? Having thought about such issues on more than one occasion, I'm proposing clean markup that's easier and predictably parsable, and fits well with current practices and syntax: {{# function (existing) {{## substitute-only subst:, otherwise is transclude {{ {{### substitute-only subst: for function, otherwise is {{# Obviously, a lot easier to document and for editors to type! And I've given it a cute neologism. This is also worth considering: https://bugzilla.wikimedia.org/show_bug.cgi?id=5453 If {{includeonlysubst:/includeonlyfoo}} worked as {{foo}} on transclusion and {{subst:foo}} on substitution, that would also accomplish what you want (eliminating the need for the subst=subst:). But it doesn't (or didn't) and it's already used as a hack, for example: {{#ifeq:{{NAMESPACE}}|{{includeonlysubst:/includeonlyNAMESPACE}} | | {{error:not substituted|cfd}} }} To be honest, I'm not sure how that even works, but it does Obviously, nosubst would handle that more elegantly. Should substonly and nosubst become standard, we could use them. NB:I'd prefer substituteonly and nosubstitute, spelled out like include. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
On Wed, Apr 22, 2009 at 12:18 PM, William Allen Simpson william.allen.simp...@gmail.com wrote: Having thought about such issues on more than one occasion, I'm proposing clean markup that's easier and predictably parsable, and fits well with current practices and syntax: {{# function (existing) {{## substitute-only subst:, otherwise is transclude {{ {{### substitute-only subst: for function, otherwise is {{# Again, personally I don't like magic symbols. Distinctive keywords are much better for grepping/Googling/etc. NB:I'd prefer substituteonly and nosubstitute, spelled out like include. Since the existing keyword is subst: and not substitute:, I think nosubst would be better. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
William Allen Simpson wrote: Aryeh Gregor wrote: https://bugzilla.wikimedia.org/show_bug.cgi?id=4484 That should do what you want. Yes, this might be the equivalent of {{substonlysubst:/substonly. ... Should substonly and nosubst become standard, we could use them. NB:I'd prefer substituteonly and nosubstitute, spelled out like include. And looking back at that RFE, which had a fairly simple patch, Brion decided strongly inclined to WONTFIX this. So, what do we have to do to change his mind? And, who would re-code the patch for the significantly revised parser? ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
On Wed, Apr 22, 2009 at 12:53 PM, William Allen Simpson william.allen.simp...@gmail.com wrote: And looking back at that RFE, which had a fairly simple patch, Brion decided strongly inclined to WONTFIX this. So, what do we have to do to change his mind? Well, I already tried and he never responded, so maybe he already has. And, who would re-code the patch for the significantly revised parser? Ah, now that's a good question. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
Aryeh Gregor wrote: Again, personally I don't like magic symbols. Distinctive keywords are much better for grepping/Googling/etc. That thinking would take us back to b, bold, etc. But I'll often take rough consensus and running code over purity At least sometime in the past there was some running code. NB:I'd prefer substituteonly and nosubstitute, spelled out like include. Since the existing keyword is subst: and not substitute:, I think nosubst would be better. Yeah, I'm not too happy that keywords were sometimes chosen because they match the name of a function provided by the underlying software. How about allowing synonyms, {{substitute: = {{subst: = {{::? ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
[Wikitech-l] tran-subst-antiation
I don't edit as much as I did in years past, and my memory is obviously feeble, as I find that I'm often making mistakes with subst'ing. Worse, the explosion of parser functions has made the templates incredibly complex. Subst'ing is increasingly less user friendly. It's hard to document (subst doesn't seem to translate well or mean anything to many folks), harder to remember, and hardest to type: {{subst:TEMPLATE|P1|P2|subst=subst:}} I'm often forgetting that final parameter, and conscientiously have to edit again. Others don't bother subst'ing at all! Is there a solution proposed anywhere already? === If not, here's my rough idea: Leading {{:: -- easy to type (already holding the shift key) -- same as {{subst: -- only happens in edit parsing, no change to database. Leading {{## -- easy to type (already holding the shift key) -- obviously must be different than {{:: -- used inside templates, tells the edit parsing to subst: only subst'ing, otherwise ignored and treated as concatenation. Same as C pre-processing operator. Are these already in use? Would be a heck of a lot easier to document ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
On Sun, Apr 19, 2009 at 2:16 PM, William Allen Simpson william.allen.simp...@gmail.com wrote: It's hard to document (subst doesn't seem to translate well or mean anything to many folks), harder to remember, and hardest to type: {{subst:TEMPLATE|P1|P2|subst=subst:}} I'm often forgetting that final parameter, and conscientiously have to edit again. Others don't bother subst'ing at all! Is there a solution proposed anywhere already? https://bugzilla.wikimedia.org/show_bug.cgi?id=2777 It seems like this exists in an extension. I don't know whether the extension is good enough to enable on Wikimedia and/or just add to core; I haven't looked at it. If not, here's my rough idea: Leading {{:: -- easy to type (already holding the shift key) -- same as {{subst: -- only happens in edit parsing, no change to database. Leading {{## -- easy to type (already holding the shift key) -- obviously must be different than {{:: -- used inside templates, tells the edit parsing to subst: only subst'ing, otherwise ignored and treated as concatenation. Same as C pre-processing operator. I think an actual keyword like substall is better. It's possible to Google the term to find documentation. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
2009/4/19 William Allen Simpson william.allen.simp...@gmail.com: {{subst:TEMPLATE|P1|P2|subst=subst:}} I've never seen that syntax before, what does the last bit do? ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
Thomas Dalton wrote: 2009/4/19 William Allen Simpson william.allen.simp...@gmail.com: {{subst:TEMPLATE|P1|P2|subst=subst:}} I've never seen that syntax before, what does the last bit do? They add a named parameter {{{subst|}}} (defaults null) at strategic places. You can add it after any positional parameters. The subst: substitutes during transclusion. Look at http://en.wikipedia.org/wiki/Template:Uw-vandalism1 and its siblings for simple examples. The problem with {{substall: is that it substitutes everything, and {{subst: doesn't substitute enough. I'm proposing the template designer have more control, using {{## only at similar strategic places. This is needed for templates that make tables inside templates, and such. As I mentioned, the use of parser functions has exploded. Folks are getting *very* creative! ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
2009/4/19 William Allen Simpson william.allen.simp...@gmail.com: Leading {{:: -- easy to type (already holding the shift key) -- same as Leading {{## -- easy to type (already holding the shift key) -- obviously Or not! Have a peek at [[Keyboard layout]] :) -- Niklas Laxström ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maybe something like {{Special:ExpandTemplates}}. X! On Apr 19, 2009, at 2:29 PM [Apr 19, 2009 ], Aryeh Gregor wrote: On Sun, Apr 19, 2009 at 2:16 PM, William Allen Simpson william.allen.simp...@gmail.com wrote: It's hard to document (subst doesn't seem to translate well or mean anything to many folks), harder to remember, and hardest to type: {{subst:TEMPLATE|P1|P2|subst=subst:}} I'm often forgetting that final parameter, and conscientiously have to edit again. Others don't bother subst'ing at all! Is there a solution proposed anywhere already? https://bugzilla.wikimedia.org/show_bug.cgi?id=2777 It seems like this exists in an extension. I don't know whether the extension is good enough to enable on Wikimedia and/or just add to core; I haven't looked at it. If not, here's my rough idea: Leading {{:: -- easy to type (already holding the shift key) -- same as {{subst: -- only happens in edit parsing, no change to database. Leading {{## -- easy to type (already holding the shift key) -- obviously must be different than {{:: -- used inside templates, tells the edit parsing to subst: only subst'ing, otherwise ignored and treated as concatenation. Same as C pre-processing operator. I think an actual keyword like substall is better. It's possible to Google the term to find documentation. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAknrfWYACgkQJj66ZG7fbByrmACeIoJj8/0DAHKX6hfGwxapq8PG OjkAn2nL/N9BIu+2r+arofsxLck1TMmG =sCqA -END PGP SIGNATURE- ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
Soxred93 wrote: Maybe something like {{Special:ExpandTemplates}}. That doesn't seem to apply. It doesn't allow parameters. And doesn't seem particularly editor friendly. What would be the single line edit syntax? For {{subst:uw-v1|Article|subst=subst:}} I'm thing about something like {{::uw-v1|Article}} Also {{::USD|1.23}} or {{::CAD|1.23}} or {{::Yen|1.23}} That is, something that editors would _actually_ use regularly ;-) ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
Hello, 2009/4/19 William Allen Simpson william.allen.simp...@gmail.com: Soxred93 wrote: Maybe something like {{Special:ExpandTemplates}}. That doesn't seem to apply. It doesn't allow parameters. And doesn't seem particularly editor friendly. What would be the single line edit syntax? For {{subst:uw-v1|Article|subst=subst:}} I'm thing about something like {{::uw-v1|Article}} Also {{::USD|1.23}} or {{::CAD|1.23}} or {{::Yen|1.23}} That is, something that editors would _actually_ use regularly ;-) I would disagree with trying to use a symbol combination to achieve what you want here, there are already so many and this will simply add to the confusion that currently exists. I think the earlier suggestion of substall would be satisfactory. Thanks, MinuteElectron ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
On Sun, Apr 19, 2009 at 5:05 PM, William Allen Simpson william.allen.simp...@gmail.com wrote: It doesn't allow parameters. It does, just don't subst it. http://en.wikipedia.org/wiki/Special:ExpandTemplates?input={{uw-v1|Article|subst=subst:}}+ -- Casey Brown Cbrown1023 --- Note: This e-mail address is used for mailing lists. Personal emails sent to this address will probably get lost. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] tran-subst-antiation
Casey Brown wrote: It does, just don't subst it. http://en.wikipedia.org/wiki/Special:ExpandTemplates?input={{uw-v1|Article|subst=subst:}}+ sarcasm Wow, I'm thinking, the edit box has gotten a lot more sophisticated than ever, parsing long URLs and all that So, I copied that link, pasted it into an edit box, hit preview, and I'm pretty sure that's not what folks expect to put into a user Talk page! Did you try that before posting? :-( When handling vandalism, the first step is to undo the problem, then copy the name of the article, then click the user talk link, then type some nice template shortcut, then paste the article name into the template, and then click save. Perhaps you could explain how this ExpandTemplates feature helps? You expect folks to type that long URL from memory? /sarcasm And then take a look at AfD or CfD or RfD or TfD, noting that the subst: is required to make the date constant, but that other templates inside the XfD templates cannot be subst: at the same time, so substall: won't work Anyway, it appears that nobody here knows a feature that handles the issues cleanly, and I'll probably post a bug/RFE later this week. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l