Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Tales from Chyria
Search
Editing
Module talk:Hatnote
(section)
From Tales from Chyria
Namespaces
Module
Discussion
More
More
Page actions
Read
Edit source
New topic
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Italicize == {{Edit fully-protected|answered=yes}} Hello. For legal articles, we often need to italicize. E.g., ''[[quo warranto]]'', ''[[Ex parte Quirin]]'', ''[[Toth v. Quarles]]''. However, we cannot do this currently with {{tl|format link}}. {{format link|Quo warranto#Philippines}} appears, therefore, counter to [[WP:MOS]]. While often automatically italicized as used in {{tl|hatnote}}, {{tl|see also}}, etc., I often find occasion to use this template alone. Therefore, I have fixed it: * <code><nowiki>{{format link|Quo warranto#Philippines|italicizearticle=y}}</nowiki></code> :: Now gives: {{User:Psiĥedelisto/Format link|Quo warranto#Philippines|italicizearticle=y}} * <code><nowiki>{{format link|Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|italicizesection=y}}</nowiki></code> :: Now gives: {{User:Psiĥedelisto/Format link|Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|italicizesection=y}} While I can't think of an example where it would be useful, both work together. See [[User:Psiĥedelisto/sandbox]] for examples. (Note: Italic page name not a bug, it's caused by the Supreme Court template also tested on that page.) Please therefore copy: # [[:Module:Sandbox/Psiĥedelisto/Hatnote]] → [[:Module:Hatnote]] # [[:User:Psiĥedelisto/Format link]] → [[:Template:Format link]] Thanks! [[User:Psiĥedelisto|Psiĥedelisto]] ([[User talk:Psiĥedelisto|talk]] • [[Special:Contributions/Psiĥedelisto|contribs]]) <sup>please ''always'' [[Help:Notifications|ping]]!</sup> 09:52, 13 June 2020 (UTC) :{{ping|Psiĥedelisto}} Thank you for the edit request! I added some new test cases for your code at [[Module:Hatnote/testcases]], which brought up a couple of problems, so I had a go at fixing them in [[Module:Hatnote/sandbox]]. While I was making the fix, I also changed _formatLink to use named arguments, as I thought it made the code easier to understand. For example, if you want to italicize a section, then without named arguments the function call looks like <syntaxhighlight lang=lua inline>_formatLink("Foo#Bar", nil, nil, true)</syntaxhighlight>. With named arguments this becomes <syntaxhighlight lang=lua inline>_formatLink{link = "Foo#Bar", italicizeSection = true}</syntaxhighlight>, which means that you don't have to look at the function definition to see what all the parameters do. Using named parameters will require changing dependent modules, but according to my search the only dependent modules are [[Module:Cat main]] and [[Module:Hatnote list]], so the damage is not too bad. I also changed the <code>italicizearticle</code> parameter to <code>italicizepage</code>, as this module can be used with all namespaces, not just article space. Let me know what you think, and if there's anything I've missed in my edits. Best regards — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 08:03, 14 June 2020 (UTC) ::{{ping|Mr. Stradivarius}} Your changes all seem broadly positive to me, and I haven't find any bug in your version. {{=3|8}} [[User:Psiĥedelisto|Psiĥedelisto]] ([[User talk:Psiĥedelisto|talk]] • [[Special:Contributions/Psiĥedelisto|contribs]]) <sup>please ''always'' [[Help:Notifications|ping]]!</sup> 15:18, 14 June 2020 (UTC) :::[[File:Yes check.svg|20px|link=|alt=]] '''Done'''<!-- Template:ETp --> {{ping|Psiĥedelisto}} I've updated [[Module:Hatnote]] with the new changes, and also udpated [[Module:Cat main]] and [[Module:Hatnote list]] with the new _formatList function syntax. I also updated the documentation for [[Module:Hatnote]] and [[Template:Format link]]. Let me know if you notice any problems with the various changes. Best — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 15:26, 16 June 2020 (UTC)
Summary:
Please note that all contributions to Tales from Chyria may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Chyria Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs