Module talk:Country alias: Difference between revisions

Content deleted Content added
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB)
 
(15 intermediate revisions by 5 users not shown)
Line 1:
#REDIRECT [[Template talk:Country alias]]
 
{{Rcat shell|
{{R from remote talk page}}
}}
Putting a redirect here so that non-technical discussions about this module can take place at the template that calls it.
{{split article|from=Module talk:Country alias|to=Template talk:Country alias|date=15 January 2017|from_oldid=760120444|diff=760120590}}
 
==Getting this module started==
I'm going to start this discussion here rather than on any user talk pages mostly for a central discussion to take place.
Line 25 ⟶ 33:
 
Perhaps something like the following would work, taking PUR as an example.
<sourcesyntaxhighlight lang="Lua">
local countries = {
-- Option 1.
Line 50 ⟶ 58:
},
}
</syntaxhighlight>
</source>
I need to know what inputs would cause "1948 Summer Olympics" and similar entries to be used. I don't understand what the idea is there. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 10:25, 8 December 2016 (UTC)
:Option 2 is far superior, mostly because it would mean not having to combine "year" and "games". It would also mean Chinese Taipei would be easier to code (it has a different flag depending on which games they're playing). As far as what's actually calling this module: most would be from {{t|infobox country at games}}, which requires year, games, and country code. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 13:02, 8 December 2016 (UTC)
Line 56 ⟶ 64:
===Format 2===
I'm now thinking of using the following format. The following shows a simple case and a more complex example based on PUR. There is no need to use 3000 as a special code.
<sourcesyntaxhighlight lang="Lua">
local countries = {
["ADN"] = {
Line 74 ⟶ 82:
},
}
</syntaxhighlight>
</source>
 
Here is how I think it would work.
Line 141 ⟶ 149:
::No, it should not insert the prefix. While it would be fine in some usage (like {{t|flagIPC}}), infoboxes invoke [[Module:InfoboxImage|InfoboxImage]], which requires only the name. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 17:50, 9 December 2016 (UTC)
 
== flagIOC2 ==
== Non-trivial changes should be discussed in advance ==
 
{{ping|Primefac}} See [https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmprop=title&cmlimit=500&cmnamespace=0&format=xml&cmtitle=Category:Pages_with_script_errors articles with script errors] for articles in [[:Category:Pages with script errors]]. I don't have time to investigate further at the moment but the problem seems to be that the original flagIOC in [[Module:Country alias]] had the following line:
{{ping|Joeyline|Primefac|Raymarcbadz|Sportsfan 1234|VEO15}}
<pre>
 
games = games and (games .. ' Olympics') or 'Olympics'
The module is transcluded in 34,664 pages and even minor edit wars are inappropriate when changes have such an impact. Editing the module should be done with care and any disagreements should be discussed on the talk page. I recommend using [[Template talk:Country alias]] as it is the template that appears in articles and it is conventional for discussions about changes affecting the template to occur on its talk. The module talk page is usually either a redirect to the template talk, or is for discussion about technical issues regarding the module (that is, how the code works, not whether some data should be "Ivory Coast" or "Côte d'Ivoire").
</pre>
 
Bybut thethere wayis Primefac,no itequivalent isin timeflagIOC2. toThat removeline thesets TODOa notedefault atof 'Olympics' if the topgames parameter is not set. YouI maydon't likeknow toif alsothe articles in the error category actually should have a games keepparameter or removewhether thea EXAdefault andshould EXXbe examples:applied whateverin youthe thinkmodule. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 0109:2734, 152 JanuaryDecember 20172019 (UTC)
:I've added a {{para|games|<nowiki>{{{2|{{PAGENAME}}}}}</nowiki>}} to {{t|FlagIOC2}}, much the same as it's set up in {{t|country alias}} itself, but it doesn't seem to be fixing the error. It ''should'' just take the pagename if none is given, but given the relatively small number of pages this is affecting I don't mind terribly if that default isn't possible. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 10:56, 2 December 2019 (UTC)
::It looks like a purge was all that was needed as there are no articles in the error category now. I could move that default into the module but it's ok in the template. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 21:41, 2 December 2019 (UTC)