What are the guidelines (if there are any) for the notability a certain place should be to have its own Country data page? Thanks! Cran32 (talk) 01:24, 1 September 2017 (UTC)
Greetings! I wasn't sure if anyone was going to see my note on Template talk:Shipboxflag or not, so I thought I would post it here. The proposed change looks to be simple enough, though given the protection status I can't actually implement it; however, assuming the idea is sound and people agree, I can create the code and test it in a sandbox. I would go ahead and proceed with my mockup, but it is clear in the template that links, alt text, and tooltips were explicitly left out, at least by the creator. Are these behaviors not wanted in the infobox icon image? (As a user I was kind of frustrated with none of them being available, as I could not determine by looking what the two images were of, but I may be in the minority in thinking that.) CThomas3 (talk) 23:34, 9 October 2017 (UTC)
Renaming "country data" templates to "flag data" templates
The discussion for which notice was given above has closed, albeit with very sparse participation. This serves as a notice and reminder of the intent to transition to this new naming convention. I believe that the old "country data" templates should still work as template redirects after templates are moved to the new name. Anyone more familiar with this template system who has any concerns, advice or who wants to help with this change please speak up now. Thanks, wbm1058 (talk) 20:11, 20 October 2017 (UTC)
Seconding. Since the title of the article Swaziland itself (and the article on the Flag of Swaziland) have had their page titles changed, Template:Country data Swaziland should be renamed to Template:Country data eSwatini to match the articles' titles (with the redirects of "Swaziland", "SWZ", "eSwatini", and "Eswatini" all needing to be listed on the template's documentation - as it stands only the first two are listed). Paintspot Infez (talk) 00:03, 24 October 2018 (UTC)
MarcusTraianus, Your comment here is the only place in your contributions for today where I can see you've used it, and as you say, it works. Where is it not working? Links please. Cabayi (talk) 22:13, 31 December 2018 (UTC)
@JFG: I have the same problem viewing the flag in that template. Looking into edit histories, it appears this change to the flag image used in that country data template is behind it. Do not know why, but I cannot see the flag in the new image. Hope that helps. Yosemiter (talk) 00:41, 1 January 2019 (UTC)
I'm writing about {{CZE}}. My understanding is that this series of templates should use the country's short name as given in ISO 3166-1, which is now Czechia. Can the template be updated accordingly? (It requires administrator powers, I gather.) Or am I mistaken about how this works? Q·L·1968☿16:41, 26 June 2018 (UTC)
Had not noticed this moratorium, thanks. Note that the short name change in flag templates is unrelated to any potential future decision about the article title. — JFGtalk19:33, 30 December 2018 (UTC)
I don't see how any links have been "broken". The {{CZE}} template now displays "Czechia" instead of "Czech Republic", and the link to the country article still works. The situation is similar to {{COG}} displaying "Congo", not "Republic of the Congo", and {{IRL}} displaying "Ireland", not "Republic of Ireland". There are 777 entity names whose short form is different from the long form, listed at Category:Country data templates with distinct shortname. — JFGtalk19:33, 30 December 2018 (UTC)
@JFG: Every national sports team is affected. And your statement contradicts Wikipedia:WikiProject Flag Template#National sport team flag templates where it is used for every instance that is not the Olympics. In otherwords, for every time the team appears in an international competition, which is the the majority of the time the national team plays, the name and link are broken or wrong. Again, I am not trying to change the rules, but the one small change affects thousands of articles. Yosemiter (talk) 20:03, 30 December 2018 (UTC)
I see the problem and contradiction. Let me dig deeper. I fixed the hockey situation by creating an alias for the Czech team. That had been done for football since 2012. Will look at other sports, and the relevant templates and modules, to develop a generic solution. — JFGtalk20:06, 30 December 2018 (UTC)
@JFG: I looked into it too, it means using the "variant" parameter in every instance to make it display the name the team is known as in any listing. As none of the teams are called Czechia, even redirecting isn't enough. The hockey, football, korfball, etc, should all display "Czech Republic". Maybe a bot to add the variant parameter to every use of CZE would be of use. Yosemiter (talk) 20:12, 30 December 2018 (UTC)
This also affects Eurovision Song Contest-related articles. They are known as the Czech Republic in the network, and now all articles using the template {{Esc|Czech Republic|y=2018}} now display as Czech Republic, which is a dead link. Can this be fixed? LexPro4 (talk) 05:49, 31 December 2018 (UTC)
The question of the appropriate short name in this case has been much discussed on Talk:Czech Republic, and the longstanding consensus there is that the most common English short-form is "Czech Republic".
I'd also suggest from a practical perspective that if the template default has to be overridden in the same way at nigh-on every instance of the template, then the template default is wrong. Kahastoktalk12:57, 31 December 2018 (UTC)
I understand that the traditional "Czech Republic" name is still widely used today in sports leagues, and it will probably take several years to fully switch. In other contexts, Czechia is gaining ground, as it is being actively pushed by the country's government since 2016. With my changes, Wikipedia can follow usage more precisely depending on context. If tomorrow the Czech football association decides to display their team name as "Czechia", we will just need to change a parameter in the football template. Note that for example, in the FIFA World Cup article series, there are footnotes stating that the Czech Republic's team was formerly competing under the "Czechoslovakia" name; they've been through this process already a couple decades ago. — JFGtalk22:11, 31 December 2018 (UTC)
Let us be clear on what is being said here. You are unilaterally - without consensus here or elsewhere - overruling a strong and repeatedly-expressed consensus in favour of "Czech Republic" found at appropriate pages such as Talk:Czech Republic. In the circumstances, it would be appropriate for you to revert back to "Czech Republic", and - if you wish to see this change - gain consensus for it first. Kahastoktalk15:58, 5 January 2019 (UTC)
I agree, the consensus is that Czech Republic is still the most WP:COMMONNAME and usage. WP follows the sources, not make a change in anticipation of the sources / common usage changing. Spike 'em (talk) 19:42, 5 January 2019 (UTC)
You should give back Czech Republic, when article Czech Republic was decided to remain with that name by Wikipedia Community. After this article will change, you should also change templates. This move is bad and should be reverted as varies on different matters. --ThecentreCZ (talk) 00:57, 1 January 2019 (UTC)
Please see User_talk:Jonesey95#Consensus for a list of requested changes to flag templates that were modified in significant ways by one editor, often in error. I do not have the expertise to sort out the valid changes from the spurious ones. Help is welcome. If the discussion should be moved to this page, that is fine with me. – Jonesey95 (talk) 20:27, 7 January 2019 (UTC)
The list is of both fixes to the improper edits, as discussed on Jonesey95's talk page, and "normal requests" that I found opportunity to suggest as I was searching for the bad/unsourced templates--Havsjö (talk) 09:36, 8 January 2019 (UTC)
The point is that there is a consensus as this is the sourced information on the "flag of X" articles on this very site for the different flags i try to change the template off (including the sources i link to in my reasons for change), the previous version is not the agreed upon situation I want to change because of my opinions, but the unsourced mass-edits by one man going against the information on the flag article (who has now even has his template editing license revoked because of this...) --Havsjö (talk) 17:26, 7 January 2019 (UTC)
Please make a list of templates where you believe that Illegitimate Barrister has made inappropriate edits. I have seen (and reverted) a few of them, so I understand the basics of what you are talking about. I will take a look at each template's history. Some of your proposed edits have not corresponded with the information in the articles about that country's flag, which has cast doubt in my mind about your other proposed edits. I am sure that you have some valid requests, but since I am responsible for any edits that I implement, I feel an obligation to proceed carefully.
In the meantime, please be careful to avoid deleting other editors' contributions to talk pages. And you might consider having your own talk page set to archive, rather than deleting messages that other editors leave for you. – Jonesey95 (talk) 18:14, 7 January 2019 (UTC)
not include the NSDAP party flag, but instead have the national flag on "Germany" template. Though I can see how this particular point could denied.
To make the disputed "1949" variant from Barrister named "gold" to make into an actual variant, in order to still preserve it in some way
to use the oppurtunity also add the common "state" version of the current german flag to an alias, as I noticed it was missing when doing the request
Link "qing" to the chinese qing dynasty flag as well as the year (like both "1866" and "empire" on Germany)
Other than these minor changes I have only request the removal of the unsourced colour variants and CIA factbook versions
--Havsjö (talk) 18:29, 7 January 2019 (UTC)
I added to your list above, based on your edit contribution history. Some of them may have already been edited to your satisfaction. In those cases, you are welcome to add <s>...</s> tags to those entries. I have posted a link to this discussion at Wikipedia talk:WikiProject Flag Template. – Jonesey95 (talk) 20:33, 7 January 2019 (UTC)
Thought I should maybe just point out that the ones you added, like empire of japan and mongolia were kind of just "normal requests" separate from the whole barrister-edit thing though, but why not I guess :P--Havsjö (talk) 21:25, 7 January 2019 (UTC)
Thanks for clarifying. They all looked like the same sort of duck to me (someone who doesn't really know flags, but who edits templates a lot), so I figured that I would include them in case you forgot them, or in case any flag project members wanted to comment on any of your proposals. – Jonesey95 (talk) 21:39, 7 January 2019 (UTC)
I'm hesitant about implementing the requests. "This flag should not have been added" is not the same as "This flag is not used and it's safe to remove it". The requests need to show they're non-breaking. Cabayi (talk) 14:47, 8 January 2019 (UTC)
[end of moved section]
I have moved the above discussion from my personal user talk page to this page, since the number of requests keeps growing, and they should be evaluated systematically. – Jonesey95 (talk) 14:58, 8 January 2019 (UTC)
I've done the French one but it needed the evidence from "What links here" on each of the flag variants, plus the "What links here" from one other flag variant to show that the results were meaningful. The request also omitted to request the removal of the accompanying |var= variables. Cabayi (talk) 23:08, 8 January 2019 (UTC)
ah, I see, I thought I only needed to tell "exactly" that I wanted "exactly" X and Y removed, for example. Not all "background" code changes as well. I will be sure to included this--Havsjö (talk) 23:12, 8 January 2019 (UTC)
@Cabayi:@Pigsonthewing: Okay, so I took a long while, but I have put the exact code and for the suggested changes and I have also checked the usage of all the aliases up for removal, I fixed some manually, but noticed that they auto-revert to the default flag if the |year is invalid. Some sports pages even hade a |year for all flags on the page for the year the sports-event took place, even if they had no alias, and it works... They will auto correct to the correct flag and since the fake flags are just minor color variants of the current flag in 99% of the cases, otherwise I have fixed it manually. So the proper code is there for the exact change and nothing should be broken by it. Other than that, the sources for changes which is not just for removing fake flags is of course there and changes only reflect the current situation on countries/flags article.--Havsjö (talk) 01:12, 9 January 2019 (UTC)
I guess that would be for the best, I cant really see any purpose they would serve. but I guess im a bit "partial" in this discussion!--Havsjö (talk) 17:08, 17 January 2019 (UTC)
The flag names for Switzerland and Nepal seem to have extra leading spaces. This results in incorrect sorting if a list of nations is copied out of Wikipedia and sorted. Most have one leading space, but Switzerland has 2 and Nepal has 3. Can the extra leading spaces be removed? Greg Lovern (talk) 21:18, 12 October 2019 (UTC)
Some large flag-filled sports pages are making pages that are more than 2MB in HTML. Replacing flag icons with the flags in Regional Indicator Symbol will cut out hundreds of chararters er flag.
This can allow some sports pages that are mostly tables to grow another 10-20% or more before they hit Wikipedia's 2MB "expanded template" limit.
Adding these flags represented in Template:Country data United States and similar templates and making it the default flag alias will be a big help. Even adding it without making it the default will be a big help, as long as the templates that call "Country data..." templates have parameters added to expose the unicode version of the flag instead of the [[File:...]] version.
The long-term solution is to eliminate the 2MB limit, but that's probably years away.
It probably depends on how many browsers / operating systems / screen reader applications can correctly interpret "🇺🇸" as an American flag icon. Also, how are you getting those byte counts? I can't reproduce them. – Jonesey95 (talk) 05:54, 4 February 2020 (UTC)
@Jonesey95: Regarding interpretation, yes, that is a consideration. Even if the flag were interpreted as a funny-looking set of two letters that identified the country, that would be okay if the flag were used as an country- or region-identifier, rather than as the flag itself. What is a problem is if it is interpreted as a generic unknown character.
I got the byte counts by viewing this page in HTML, saving the HTML that corresponded to my use of {{huge}} to a text file, then doing the same with the HTML that corresponded to my use of {{flagicon}}. They came out to 244 characters and 591 characters in a character-counting tool. I'm not sure if that tool counted characters or bytes, but either way the difference is at least 347 bytes. On very long "sports tables" pages, you may have several hundred flags. I figure the savings would be about 10% in 2019–20 EuroLeague Regular Season. davidwr/(talk)/(contribs) 15:35, 4 February 2020 (UTC)
Another space and time saving option is to cut the flag cruft completely. See WP:FLAGS and don't forget the image policy: 'to inform and illustrate, not to decorate'. --Red King (talk) 17:22, 4 February 2020 (UTC)
The point of the flag template system is to display an image of a flag, it would defeat the purpose if flags no longer appeared for many readers. Also, using the flag images from Commons ensures the latest, correct version and design of flags are used. S.A. Julio (talk) 20:24, 4 February 2020 (UTC)
I am withdrawing this as some modern browsers on some modern operating systems in certain situations still show "letter pairs" instead of "flags" for the flags in Regional Indicator Symbol. This is unfortunate. See Flags at emojipedia.org. As of 2020-02-04 it says " Emoji flags are supported on all major platforms except Windows, which displays two-letter country codes instead of emoji flag images." Well, when Microsoft starts to support flags, then this can be revisited. davidwr/(talk)/(contribs) 20:50, 4 February 2020 (UTC)
Edit template-protected - remove parameters no longer used
I believe that the blank link= and the blank alt= are intentional, per MOS/Accessibility. Your sandbox code links the image to the flag image, which is a change in functionality that should be discussed before implementation. – Jonesey95 (talk) 23:55, 12 February 2020 (UTC)
Another idea for reducing impact of flags on Wikipedia's template limits
Flag icons on sports articles are causing many to hit Wikipedia's template limits (list as of earlier today).
It would help if {{flagicon|USA}} could expand to
<span class="flagicon">[[File:Flag of the United States.svg|23x15px|border|alt=|link=]]</span>[[United States]]
quickly without expanding a bunch of intermediate templates.
Proposal: Have bot create a bunch of country-specific templates such as Template:Country data United States/currentflag, along with some surrounding "noinclude" code with a link to "ping the bot" so an editor could force the bot to re-generate a particular flag template on-demand.
The bot would run daily, checking dependencies like Template:Country data United States and Template:flagicon/core, then making any necessary changes. On most days, no dependencies would change so the bot would exit without any edits. Change Template:Flagicon to first check if [[Template:Country data {{{1}}}/currentflag]] file exist and if it does, just use it directly. Only do the full template call if the flag does not exist. I expect that well over half of the flag icons in international-sports articles would result in this much smaller "template expansion size footprint" if we adopt this scheme.
The one obvious negative side effect would be that changes to the intermediate templates would not have immediate effect. This will surprise some editors. Edit-notices on those templates along with an "alert the bot" link that will cause the bot to re-run its daily task immediately for all affected templates can take care of this.
@Davidwr: Seems like a quite complex solution, especially with a bot needing to mirror all the changes. This system would also require a large number of subpages, many of which would also need to be template protection. If someone were to edit the subpage directly, then it would be out of sync with the main template. I think a better idea would be to convert all the flag templates to use Module:Flagg. This basically could bypass the need for flag templates to call the country data template through the core template. For example, if you look at the code {{#invoke:Flagg|main|cxx|USA}}, which displays the same as {{Flagicon}}, the post-expand include size is 181 bytes, compared to 552 for calling {{flagicon|USA}}. Pinging the module creator, SiBr4, if you have any thoughts on this (though the user seems to be inactive recently). S.A. Julio (talk) 22:00, 21 February 2020 (UTC)
I noticed that there are two different flag sizes for templates:naval and marines, which standardize flag size as 23x20 px and templates:army, air force, and space force, which standardize flag size to 23x17 px. I have no clue which is the optimal size, but considering they are usually in the same infoboxes, I figured it would make sense to standardize them. In essence, I am here to ask, and gain consensus, on if 23x17 or 23x20 is the preferred size.Garuda28 (talk) 14:26, 19 May 2020 (UTC)
Is there any reason NOT to migrate Template:flagicon to use modules?
It's been around since 2015, so I assume there was a good reason NOT to use it back then. That reason could've just been that everyone was too busy or that there was no pressing need at the time. Or it might have been something serious.
Is there any good reason today to not to migrate flag templates to call that module? I would want someone familiar with modules to review the code to make sure it's solid before we do this. Preferably several "someones" reviewing the code independently. davidwr/(talk)/(contribs) 22:14, 21 February 2020 (UTC)
I agree the current system is a bit complex, unwieldy and outdated. The Olympic flag templates have already been converted to use a module. The only thing I notice in the documentation of Module:Flagg is that it says normal flag templates ... are probably faster because they only do two transclusions without invoking Lua. I'm not familiar enough with modules to know if there is a considerable difference, including for pages with a high number of invocations. But the module allows for a lot of customization, every template in Category:Flag template system could probably be converted without too much difficulty (though a large amount of testing is probably needed to prevent any errors being introduced). For example, replacing {{flagicon}} with {{#invoke:Flagg|main|cxx|{{{1|}}}|{{{variant|{{{2|}}}}}}|size={{{size|}}}}} would achieve the same output, and the post-expand include size is reduced from 552 to 288 bytes for the invocation of the USA flagicon. Last year I did make a change to some of the core flag templates to allow for a better way to pass the size for flags with abnormal proportions, for example see Template:Country data Switzerland. This change is not supported currently by the module, and would need to be fixed. S.A. Julio (talk) 22:42, 21 February 2020 (UTC)
In the spirit of "going slow" we should consider changing Template:Flagicon so it it was surrounded with some "if there is only one parameter and it's not Switzerland or Vatican City then call the module otherwise do what you normally do." We would need to test this for correctness and if it helped or hurt the effort to reduce template-expansion size. davidwr/(talk)/(contribs) 22:55, 21 February 2020 (UTC)
The main reason I suspected the module would be slower is that it still uses data from the existing country data templates using frame:expandTemplate and string parsing, which doesn't seem ideal. If some or all of the main flag templates are changed to use the module, moving the data itself over to Lua would probably be a good idea performance-wise, if only because Scribunto's mw.loadData would remove the need to reload a data module every time it is used on the same page. I don't know how the module currently compares to the "normal" templates, though; it might well do as good as them as is.
A quick test using the edit preview's parser profiling data seems to suggest the module is slower than {{Flag}} but faster than {{Flagicon}}, and reduces the expansion size and depth greatly in both cases (as was mentioned above). It does show a Lua memory usage of about 1 MB on a test page of 10 flags (the limit being 50 MB), which might be a possible new issue to take into account before changing the templates, given some articles use hundreds of flag templates. SiBr4 (talk) 16:19, 24 February 2020 (UTC)
@Ahecht: Looks good. I could make a sandbox version of Flagg using the current format for specific improvements and to compare performances. Some thoughts for now:
The grouping of parameters based on key names with hyphens is a nice idea. I don't think it's helpful in some cases (for example Canada's "1867-official"), but the flag module can be made to treat hyphenated keys and nested tables equally. Regarding the grouping, the default value is better placed at the top of each table rather than the bottom.
Keys or values with parser functions will be tricky to implement in Lua form. I see your JS has a function to handle variant-based #switches, but there's a few dozens of templates using #ifeq, #if and possibly others based on various parameters. This obviously doesn't have to be implemented into the automated conversion, since that's a one-time thing and edge cases can be corrected manually afterwards. As for fields containing parameters in triple braces (mainly link aliases for sports), the value could be changed to some kind of format string to be fed to string.format, but it's probably easier for everyone to keep the value as is and use string replacement in Flagg to fill in the values for {{{mw}}} and {{{age}}}.
The pass-through parameters (name, variant, size, altvar, altlink) can be removed, or (for size) replaced with the default value if there is one.
border = "" and its variant equivalents could be a Boolean false instead of an empty string for clarity. I've also noticed the border parameters for Poland aren't separated properly because the template has them on the same line as the corresponding flag aliases; other templates might have the same problem.
The numbered keys (var..., redir... and related...) are specific to the automatic documentation through {{Country showdata}}. If these are kept, it would be useful to convert them to lists (e.g. ["var"] = {"1776","1777",...}), though ideally they wouldn't be included with the country data itself. A Lua version of Country showdata could simply be called from the documentation page (with the lists of redirects and related templates there) intead of being integrated with the main data template and sharing its parameters. Unlike a template, it could also directly get a list of the defined variants, although two reasons I can think of to keep some sort of control over the list are omitting variants that shouldn't be shown (e.g. deprecated ones) and possibly specifying the order they are to be listed in.
I'm also curious why your test modules use a nested outer table of the form {["country"] = {...}} – is it to support having multiple entities on the same page as discussed below? I've been thinking on whether combining some of the smaller templates to reduce the total number of pages would make things easier. It's probably doable if entries in /redirects can point to specific data tables on a page, or even specific variants (which would allow historical countries like Kingdom of France to be merged with the current country using different link aliases), but might also only complicate the whole system further. SiBr4 (talk) 17:51, 18 June 2020 (UTC)
Subkeys are now sorted alphabetically, which should place #default on top.
The only other parser function call I was tempted to replace was {{#ifeq:{{{altlink}}}|A national rugby union team|link alias-rugby union|empty}}, which appears frequently, but I wasn't sure exactly what it's function was. Beyond that, I think any parser functions could be dealt with manually or detected and dealt with in Lua (worst case, they could be detected and then just those keys/values would sent to frame:preprocess()).
Pass-through parameters (e.g. anything of the form xyz = {{{xyz|}}}) are now excluded.
Blank values now return false. The script always assumes that there is one parameter per line, because otherwise it would have to have a way of parsing parameters and parser functions to tell which pipes actually are the start of a new parameter. I searched for "svg | " and only found it in 7 templates, which I have corrected manually. Any other templates trying to put multiple parameters on a single line would likewide need manual correction.
Any parameters between <noinclude>...</noinclude> tags, which is mainly the numbered keys, are now excluded.
I don't think alphabetizing all keys is an improvement, as they are currently often in a logical order; only #default should be moved back to the top (e.g., when populating output, check if params['#default'] exists and add it before looping over the other params).
These ifeqs seem to have been added by S.A. Julio to change the link alias for {{ruA}} without affecting it for {{ru}}, placing the ruA alias in a throwaway empty parameter in the latter case. I think the best solution is to give ruA a separate altvar and implement some sort of fallback in the module so it can still share other aliases with rugby union. For the data module this means changing the key to something like link alias-rugby union-A. SiBr4 (talk) 21:40, 18 June 2020 (UTC)
@SiBr4: Done. #default moved to top without alphabetizing, and some #ifeq statements parsed.
ifeqs like {{#ifeq:{{{altlink}}}|MNO PQR|ABC DEF-GHI JKL|empty}} are parsed to ABC DEF-GHI JKL-MNO, so the rugby union ones are parsed to link alias-rugby union-A per your suggestion.
@Davidwr and S.A. Julio: I've been playing around with lua module replacements for some of the more common flag templates on pages that are exceeding the limit. I created Module:Flag as a front-end for Module:Flagg, to allow for more widespread testing of these modules before flipping the switch for tens of thousands of pages all at once. I've implemented {{#invoke:flag|flag}}, {{#invoke:flag|deco}}, {{#invoke:flag|icon}}, and {{#invoke:flag|+link}} on several pages and templates without issue and without running into the Lua memory limit. The module is also substable, so I've taken advantage of that on several pages to convert the template calls to static images.
I agree with SiBr4 that long term, converting the entire country data system over to a lua database would be preferable. It should be easy enough to do initially with a one-time bot run, but the challenge would be to get editors to accept the new format for updates. We were able to do it successfully for gridiron football teams a couple of years ago at Module:Gridiron color/data, so it's not insurmountable. --Ahecht (TALK PAGE) 03:28, 12 June 2020 (UTC)
@Ahecht: Great, it would definitely be useful to have the expand size reduced. One thing I did notice though is that the custom size parameter (for example in Template:Country data New Caledonia, Template:Country data Nepal, etc.) still needs to be supported by Module:Flagg. While {{flagicon|New Caledonia}} currently outputs , the code {{#invoke:flag|icon|New Caledonia}} outputs . I also agree, it would be great to have the entire flag template system converted to Lua. It would be a more efficient method, and the data could be well-structured. Unfortunately I'm not much of a help when it comes to Lua, though if this were to be done I'd be glad to assist in all other aspects of the conversion. For such a system, would each country have its own module subpage? While all the modern countries would need to be protected, it would be beneficial to still allow editors without such permissions to create/edit data for smaller/older regions. S.A. Julio (talk) 05:12, 12 June 2020 (UTC)
There is now a sandbox of Flagg that uses Ahecht's data modules (as well as one I created for manual testing) and that I've gotten to work in the few cases I've tested so far. In a quick comparison with the current module through the parser profiling data on the list of US flags in my sandbox, all values go down by varying amounts, including a further reduction of the post-expand include size by about a third. This is probably not very representative, though, since it only uses a single country module and thus takes advantage of mw.loadData only having to load it once. When using several different countries, the differences are smaller, and Lua memory usage is even slightly higher for the sandbox version. SiBr4 (talk) 12:51, 20 June 2020 (UTC)
Some of the above comments seem to suggest wanting to move "country data" used by the current flag templating system from data stored and queried in wikitext-based templates to similar tables stored in Lua-based Scribunto modules. The consideration to use mw.loadData() is not without merit, however, I would highly recommend against moving "country data" from local wikitext-based templates to local Lua-based Scribunto modules. One really big issue with current flag templating system is that it is basically an English Wikipedia database (albeit somewhat makeshift in its design or lack thereof). To that end, despite much of its data being highly useful and applicable across multiple countries and languages, this "country data" database is accessible from (and must be maintained at) English Wikipedia alone. We should think bigger. This data should be internationalized, localized (e.g., country names, etc.) and shared across WMF wikis and not just English Wikipedia. To accomplish this, I recommend moving to a global WMF database such as Wikidata or if that cannot support such, consider mw.ext.data.get() and Tabular Data. Tabular Data means converting the "country data" to JSON and storing and querying it from Commons, the same place where most of the flag images are stored. It also means it can be localized for other languages and used from other WMF wikis allowing the porting of templates and modules to other WMF wikis. To accomplish such a maneuver, I recommend devising a plan to move all the flag templating interfaces to Lua Scribunto modules (it seems like that is already well on its way) but for now keep them querying "country data" from the existing wikitext-based templating system (using the likes of frame:expandTemplate({title="Country data "..country;args=params})). Once you have everything fetching data via a single interface like Module:Flagg (or Module:CountryData or similar so that nothing else attempts to use local wikitext-base "country data" directly), then change it to support querying Wikidata or Commons tabular data first and fallback to its current wiki-local template-based database. This will allow for a transition of local "country data" from just English Wikipedia to a global WMF solution usable from any of its wikis. Designing a replacement for the current "country data" is key. I really like Wikidata and I believe the flag data really could easily be stored there (if much of it isn't already). That said, the existing "country data" query interface seems potentially incompatible with a migration to Wikidata. However, I do believe it is possible. We could attempt to map "country data" country names to Wikidata item entity IDs and query that way, etc. It is likely this mapping could use Wikidata labels and aliases (or possibly sitelinks). The point is moving to a single "country data" interface which allows us to eventually improve the database implementation is a good thing, however, just moving from one local database format (wikitext templates) to another local database format (Lua Scribunto modules), even if it is a better format, is likely not the best way to go. —Uzume (talk) 13:14, 3 July 2020 (UTC)
Why does Wikipedia need to wait for the legislature to adopt it? It seems to me that a flag which is likely to be the new official flag (given 72% vote in the referendum) is preferable to a blank placeholder in the template. skeptical scientist (talk) 03:24, 14 November 2020 (UTC)
It's for the same reason we shouldn't have a redirect President Joe Biden --> Joe Biden until he is inaugurated (we do, but it's not worth going to WP:RFD over, that would be POINTY). Heaven forbid, but there could be a cataclysmic disaster that ends the world as we know it before either the Mississippi legislature meets or Joe Biden is inaugurated President of the United States. It's also why we don't have articles about undiscovered atoms, even though we are nearly 100% sure the next few on the list can be made and, barring an "end of the world as we know it event," will be made in the next decade or two. As a more practical example, we don't make articles about tropical systems or even sections about them in "tropical cyclones by year" pages until the cyclone is "officially declared."
That said, it is right and proper that this flag and its current status and likely future status be mentioned in articles about the Mississippi State Flag. But it shouldn't be put into the flag template system until it's officially declared, and maybe not even until the date it becomes official (that is a debate worth having, start a new section if you want to start that debate now). davidwr/(talk)/(contribs) 14:55, 14 November 2020 (UTC)
Is there a list of pages that use non-module version which are approaching WP:PEIS limit
Is there a list of pages that are approaching the WP:PEIS limit that haven't converted over to the new module-based {{flagg}} system?
Hi! The {{Country data Azerbaijan}} is edit-protected at the moment. Currently, {{Air force|Azerbaijan}} shows the flag of Azerbaijan, rather than the flag of its Air Forces, as seen here. I believe it is related to the country data template. Seems like there is no code for Air force, and the template adds the default flag because of it. There is one for Army and Navy, but not Air force. --► Sincerely: SolaVirum17:00, 7 December 2020 (UTC)
I posted to following to WikiProject France but no one responded and the situation hasn't changed. I've copied it here so that, hopefully, somebody can lend some clarity on what flag is correct.
As best I can tell, the blank white flag was the national flag and the one with the crest was the royal flag (state ensign?). Regardless, the template isn't consistent with the article. 5225C (talk • contributions) 07:54, 30 December 2020 (UTC)
Hello! Can you add the right Saint Lucian flags from 1875 until 1967. The flag variant from 1875 should have the flag Flag of Saint Lucia (1875-1939) and the 1939 variant should have the flag Flag of Saint Lucia (1939-1966).
Yours sincerely, Sondre --80.212.169.236 (talk) 12:39, 23 April 2021 (UTC)
Done, although the task would have been made easier by the addition of the .svg to the request and the correct name for the 1939 flag. Mjroots (talk) 10:04, 5 May 2021 (UTC)
Romanian flags
Hello! Can you correct the three Romanian flags from 1948 until 1989. The first one should be Flag of Romania (1948–1952).svg. The second one should be Flag of Romania (1952–1965).svg. And the last one should be Flag of Romania (1965–1989).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 18:22, 12 May 2021 (UTC)
Flags of Iran
Hello! Can you correct the flags of Iran the two state variants. The first one which is the 1925 variant should be State Flag of Iran (1933–1964).svg. And the second flag which is the 1964 variant should be State Flag of Iran (1964-1980).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 18:24, 12 May 2021 (UTC)
Hello! Can you correct the 1869 variant for the flag template of Bahamas that should be Flag of the Bahamas (1869–1904).svg. And can you add the 1964 variant to the flag template of Bahamas that should be Flag of the Bahamas (1964–1973).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 18:35, 12 May 2021 (UTC)
Bulgarian flags
Hello! Can you add the 1946 variant in the flag template of Bulgaria that should be Flag of Bulgaria (1946-1948).svg and the 1948 variant should be Flag of Bulgaria (1948-1967).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 20:33, 12 May 2021 (UTC)
Saint Lucian flags
Hello! Can you add the right flag for the 1967 variant for Saint Lucia. That should beFlag of Saint Lucia (1967–1979).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 09:29, 13 May 2021 (UTC)
Comoros flags
Hello! Can you add the 1963 variant for the flag template of Comoros?. The flag should beFlag of the Comoros (1963–1975).svg they also used that flag from 1975 to 1976.
Yours sincerely, Sondre --88.89.103.4 (talk) 10:01, 13 May 2021 (UTC)
Dominica flags
Hello! Can you add the right variant on the 1955 variant on the Dominica flag template Flag of Dominica (1955–1965).svg. And can you add the variant for 1988 that should be Flag of Dominica (1988–1990).svg. And can you correct the 1981 variant to Flag of Dominica (1981–1988).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 13:18, 13 May 2021 (UTC)
Antigua and Barbuda flag
Hello! Can you add the 1962 variant for Antigua and Barbuda flag template. That isColonial ensigns of Antigua and Barbuda (1962-1967).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 15:35, 13 May 2021 (UTC)
Suriname flag
Hello! Can you add the 1975 variant to the flag template of Surinam that should beFlag of Suriname (1959–1975).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 15:39, 13 May 2021 (UTC)
Peru
Hello! Can you add the 1822 variant of Peru. That should be Flag of Peru (1822-1825).svg.
Yours sincerely, Sondre --88.89.103.4 (talk) 20:47, 18 May 2021 (UTC)
Sandbox
Hello! How can i make sandbox templates without being registered?. That will make it much easier to propose changes to templates with many flag variants and so forth.
Yours sincerely, Sondre --88.89.103.4 (talk) 09:38, 22 May 2021 (UTC)
I strongly recommend creating an account, editing is much easier with one. Anyway, I would put {{Edit semi-protected|Template:Whatever/sandbox}} on the talk page of the template whose sandbox you want created. Explain very clearly what you want in the edit request and say that to the best of your knowledge there is no better process for making the request - I certainly can't find anything else. User:GKFXtalk18:43, 25 May 2021 (UTC)
Sandbox for the templates of Spain, Afghanistan and Russia
Hello! Is it possible to create sandbox templates for Russia, Spain and Afghanistan?. It can be good to have a sandbox template for the country data template in itself. This templates are protected because of vandalism and so forth. Template:Country data Russia, Spain and Afghanistan/sandbox.
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.
Done You should have left a request on the pages of each relevant template (to avoid me having to search for them). In addition, I'd echo GKFX's suggestion to create an account, which will make things much easier. Cheers, RandomCanadian (talk / contribs) 22:09, 29 May 2021 (UTC)
@Certes: Not necessarily since the redirect is also in the form of {{Country data X}} in addition to the target. Therefore, both {{R from country data}} and {{R to country data}} would be equally valid. –MJL‐Talk‐☖19:41, 7 December 2021 (UTC)
@Qwerfjkl: I was just going to have {{R country data}} detect the sortkey automatically in most cases since it is generally obvious what it should be (the thing after country data). Though, I actually need to revise the code because it currently doesn't work right. –MJL‐Talk‐☖18:50, 12 December 2021 (UTC)