Content deleted Content added
→Request to output log: um... |
→Handling disambiguation terms: new section |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 9:
:::{{ping|Tom.Reding|Erutuon}} I'm doubtful of the value of [[Module talk:TaxonItalics/testcases]], because it's the <em>visual appearance</em> of the output that matters, not the exact HTML that achieves this. During development, I've changed the way the code de-italicizes components like the hybrid symbol and connecting terms more than once, partly to simplify the algorithm and partly for consistency. It could be changed again, e.g. depending on the discussion at [[Wikipedia talk:WikiProject Plants#Hybrid symbol ×]], without changing the visual appearance of cases currently handled correctly. In development, I've relied on tests like those at [[User:Peter coxhead/Test#Module:TaxonItalics#main]], just looking at the output. [[User:Peter coxhead|Peter coxhead]] ([[User talk:Peter coxhead|talk]]) 16:47, 24 August 2018 (UTC)
:::: {{reply to|Peter coxhead}} Well, I see your point, but I've updated them so that they all pass again. Perhaps they can serve as a demonstration of what the function does, since they are not very useful when editing the module. — [[User:Erutuon|Eru]]·[[User talk:Erutuon|tuon]] 20:54, 24 August 2018 (UTC)
:::::Well, if you're happy to do the work, I agree they are a good demonstration.
:::::Any thoughts about other cases, as per my question below? [[User:Peter coxhead|Peter coxhead]] ([[User talk:Peter coxhead|talk]]) 20:58, 24 August 2018 (UTC)
:::::: Not right now, but I'll post there if any occur to me. — [[User:Erutuon|Eru]]·[[User talk:Erutuon|tuon]] 06:03, 25 August 2018 (UTC)
== Work remaining ==
Line 21 ⟶ 25:
*Genus (Subgenus) species [abbreviated] → {{#invoke:TaxonItalics|main|Genus (Subgenus) species|abbreviated=yes}}
Are there any more cases that the code should handle? [[User:Peter coxhead|Peter coxhead]] ([[User talk:Peter coxhead|talk]]) 16:41, 24 August 2018 (UTC)
== Handling disambiguation terms ==
By default, the code assumes that a parenthesized term is a subgenus and italicizes it:
* <nowiki>{{#invoke:TaxonItalics |main |Varanus (Hapturosaurus)}}</nowiki> → {{#invoke:TaxonItalics|main|Varanus (Hapturosaurus)}}
However, this is wrong if it is actually a disambiguation term:
* <nowiki>{{#invoke:TaxonItalics |main |Caia (plant)}}</nowiki> → {{#invoke:TaxonItalics|main|Caia (plant)}}
I've just added a parameter {{para|dab}} to treat a parenthesized part as a disambiguation term:
* <nowiki>{{#invoke:TaxonItalics |main |Caia (plant) |dab=yes}}</nowiki> → {{#invoke:TaxonItalics|main|Caia (plant)|dab=yes}}
[[User:Peter coxhead|Peter coxhead]] ([[User talk:Peter coxhead|talk]]) 06:54, 5 October 2021 (UTC)
|