Template talk:Flagg

(Redirected from Template talk:Flagg/doc)
Latest comment: 10 months ago by Ahecht in topic Flag of Martinique

Suggestion: add a table-alignment parameter

edit

At Special:Diff/1028180415, I had to swap out {{flaglist+link}} for {{flagg|unpe}} for WP:PEIS reasons, but that did mean losing the style="text-align: left" . Could I add a "T" option (table, but different to "t") that causes the alignment setting to be output at the start of the template? This would default to left but be controlled by the existing align= parameter if needed. User:GKFXtalk 17:19, 17 June 2021 (UTC)Reply

Asterisk optionality

edit

Is it possible _not_ to display the asterisk in a case, such as with the article, list of European countries by population. I find it very distracting and redundant. --Mahmudmasri (talk) 15:07, 3 June 2022 (UTC)Reply

Flagg|cxxlo for BLR/RUS players

edit

What is the four-letter abbreviation parameter for Belarus/Russian sports athletes for {{flagg}}, similar to {{flagg|cxxlo}}, equivalent to {{flagicon|}}? Qwerty284651 (talk) 12:15, 12 May 2023 (UTC)Reply

You can use {{#invoke:flag|althlete}}, which is a wrapper for Module:flagg, as an alternative to {{flagathlete}}. --Ahecht (TALK
PAGE
) 21:00, 21 January 2024 (UTC)Reply

Does not work with colspan

edit

See: User:Timeshifter/Sandbox205 and its file history.

Instead of

| colspan=4 |{{flagg|us*eft|pref=Economy of

I had to use:

| colspan=4 style=text-align:left |{{flag+link|Economy of

Here below is what shows up with

| colspan=4 |{{flagg|us*eft|pref=Economy of
All people in poverty (2020) Children ages 0-17 in poverty (2020)
90% confidence interval of estimate 90% confidence interval of estimate
States and D.C. Percent Lower Bound Upper Bound Percent Lower Bound Upper Bound
National 11.9 11.9 11.9 15.7 15.7 15.7
style="text-align:left"|  Alabama * 14.9 14.5 15.3 20.9 20 21.8
style="text-align:left"|  Alaska * 9.6 9.1 10.1 12.3 11.3 13.3

Substituting {{flagg|uspeft for {{flagg|us*eft does not help.

See bottom of section here: Help:Table#Adding links to specialized country, state, etc. articles. With asterisk. --Timeshifter (talk) 10:20, 17 June 2023 (UTC)Reply

Flag of Martinique

edit

Even though Martinique has a new flag as of 2023, the French flag still erroneously displays. As well as that, emojis depicting the flag have the racist snake flag (🇲🇶). OMGShay 92 (talk) 15:26, 30 June 2023 (UTC)Reply

@OMGShay 92 You should raise this at Template talk:Country data Martinique --Ahecht (TALK
PAGE
) 21:02, 21 January 2024 (UTC)Reply

Row moving over one cell. Table bug using Flagg template

edit
 

Copied from Wikipedia:Village pump (technical)#Row moving over one cell. Table bug using Flagg template (and others):

Wikipedia:Village pump (technical) thread
I am using Firefox on Windows 10 Pro PC. Latest standard versions on both. This does not happen to me on the Edge browser. Whether I am logged in or not. I logged out of Wikipedia and I still have the problem with Firefox. So it is not my JS and CSS files. I also disabled all my Firefox addons and then closed all my Firefox windows. I launched Firefox and I still have the problem with Firefox. No addons and not logged in.

The problem tables all use templates within the table. But it is not a problem with tables using {{flaglist}}.

See List of countries by total health expenditure per capita. Both tables there use {{flagg}}.

Open visual editor. Click to the right of the either of the 2 tables. Note the bizarre result of the row moving over one cell. Click to the right of a different row and note that row moving over one cell. If you click above or below the table the problem goes away.

I opened visual editor for Help:Table and tried clicking to the right of many tables. Closer and farther away. I have noted the problem there with only one table so far. Have to go there to use visual editor on this table:

Template output for selected table cell templates
Template usage {{Yes}} {{No}} {{Dunno}} {{N/A}} {{N/A|N/A}} {{n/a|n/a}}
Using template Yes No ? N/A n/a
Without template Yes No ? N/A n/a

I see the problem only with the middle row there. Click to the right of it, and click closer until the row moves over one cell. It doesn't happen all the time.

I removed the templates from a few rows of one of the tables in the list article. This solved the problem. And the small table above only has the bug in the middle row using templates. --Timeshifter (talk) 15:00, 14 August 2023 (UTC)Reply

If you don't get a good reply here, try posting this as a concise bug report on Phab, tagging it as Visual Editor, and maybe with some screenshots to help visualize the problem. Link to make a Phab bug report.Novem Linguae (talk) 00:01, 15 August 2023 (UTC)Reply

--Timeshifter (talk) 22:31, 19 August 2023 (UTC)Reply

Edit request 8 October 2023 for adding new "i" option to use IOC country code resolution Reply Suggestion

edit

Add an extra "i" option, to use the IOC country codes for resolving the entity string to country data, using Module:Country alias/data. This is useful primary in Olympic contexts, where codes like "BRN" always refer to Bahrain rather than Brunei as they currently do with the default resolution options.

The edit is uncontroversial because it does not change the existing template/module behavior at all, unless the new "i" option is added.

Description of suggested change: See Module:Flagg/sandbox, where the change is completed.

Add this code after line 52 local country = args[2] or "":

	local countryDataCountry = country
	if string.find(me, "i") then
	    local titleIocCountryData = mw.title.new[[Module:Country alias/data]]
	    local IocCountryData = require(tostring(titleIocCountryData))
	    local iocCountryAlias = IocCountryData.countryAliases[country] or country
	    countryDataCountry = IocCountryData.countries[iocCountryAlias]["name"]
	end

Also, change line 73:

data = CountryData.getcachedtable(frame, country, apar)
+
data = CountryData.getcachedtable(frame, countryDataCountry, apar)

Also, change line 77:

data = (args["nodata"] and {}) or CountryData.getcachedtable(frame, country, {variant=args["variant"] or args[3]})
+
data = (args["nodata"] and {}) or CountryData.getcachedtable(frame, countryDataCountry, {variant=args["variant"] or args[3]})

--Habst (talk) 16:08, 8 October 2023 (UTC)Reply

  Completed. P.I. Ellsworth , ed. put'er there 20:01, 8 October 2023 (UTC)Reply

Washington, D.C.

edit

Washington, D.C. is correct spelling according to the Wikipedia page.

Can {{flagg}} be fixed so that "Washington, D.C." shows up instead of just "Washington":

  Washington *

{{flagg|us*eft|pref=Crime in|Washington, D.C.}}

I would prefer not having to add another parameter (more work) to force the addition of D.C. to the link:

  Washington, D.C. *
{{flagg|us*eft|pref=Crime in|Washington, D.C.|name=Washington, D.C.}}

--Timeshifter (talk) 12:27, 10 October 2023 (UTC)Reply