Module talk:ISO 3166: Difference between revisions

Content deleted Content added
Guinea-Bissau error: comment out broken testcases, since they cause long page load times
Guinea-Bissau error: Special:Diff/1100609312/1240674198
Line 257:
::I'm not sure if that's cause for concern. {{ping|Sdkb|Jonesey95|Trappist the monk|Johnuniq}}  —[[User:Wqnvlz|wqnvlz]] ([[User talk:Wqnvlz|talk]] '''·''' [[Special:Contributions/Wqnvlz|contribs]]);  19:34, 5 April 2022 (UTC)
:::Those testcases are failing because /test puts the input as argument 3, core puts it as argument 2, and then [[Module:Arguments]] is blending the frame args and the parent frame args and the input is getting duplicated (it's as if you entered {{mlx|ISO 3166|name|Canada|Canada}}). <span class="nowrap">--[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<b style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:middle;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</b>]])</span> 17:23, 16 August 2024 (UTC)
:@[[User:Jonesey95|Jonesey95]] I implemented your suggestion to remove the hyphen only after the initial lookup fails in the sandbox at [[Special:Diff/1100609312/12406726171240674198]]. The logic ended up being a little more complicated since the lookup is done differently depending on whether there is a second parameter:
:# If there is no second parameter and the lookup fails, then split it on the hyphen and try again
:# If there is a second parameter and the first parameter lookup succeeds and the second parameter lookup fails, and the second parameter is hyphenated, move the first part back to the first parameter (so if #1 split "Guinea-Bissau-Leste" into "Guinea" and "Bissau-Leste", try again with "Guinea-Bissau" and "Leste")