User:Ohconfucius/script/flagcruft

{{Message

| bgcolor = lightblue

| border-color = royalblue

| color =

| linkcolor =

| message = bug report or suggestion

| link = User talk:Ohconfucius/script

| extra-style = extra styles, like border-radius etc...

| width =

| margin = 20px

| padding = 20px

| text-align = left

}}

Preamble

This tool was developed for my own personal use to speedily removing swathes of abused icons, it may help you to pare back extreme instances of over reliance on flags in a single manipulation.

;Within-article consistency of formatting

By long-standing convention and as detailed at the Manual of Style, a Wikipedia article needs to use consistent formatting. Despite there being long standing guidelines as to their use, flag icons are much abused within Wikipedia. Users, particularly in sporting and political fields, are wont to plaster certain articles with so many tiny flag icons that it's difficult to make sense of which country they are meant to refer to, or what they mean.

  • There is, for example, no benefit to using flags (and flags only) to give the location of a stadium where a match was played, as was done [https://en.wikipedia.org/w/index.php?title=Uganda_national_baseball_team&oldid=565531672 here], or where a tournament was hosted, as [https://en.wikipedia.org/w/index.php?title=United_Arab_Emirates_national_cricket_team&oldid=613549472#Tournament_History here].
  • Using flags for team managers' nationalities (as [https://en.wikipedia.org/w/index.php?title=Portugal_national_baseball_team&oldid=600097569 here] and [https://en.wikipedia.org/w/index.php?title=Chile_national_baseball_team&oldid=611225861 here]) is irrelevant at best.

= Caveat =

  • The script should be used with care. Its use may provoke ire or controversy because many editors seem anchored to the aesthetic appeal of those coloured rectangles dotted all over a page and the security that these may impart. Some cite familiarity with flag use on some external websites and seeking to apply them here.
  • It may not be appropriate to simply sweep away all flag icons, some icons may need to be replaced with the country name. Thus there are instances where different sections of an article may require separate treatment, or the use of the two script buttons in different combinations (see [https://en.wikipedia.org/w/index.php?title=South_Korea_national_baseball_team&dir=prev&offset=20140513221340&limit=5&action=history this series] of edits).

Functions

Functions performed include:

  • remove bare flag images, denoted by the syntax "[[File:Flag of Country.svg|[23]px..." or "[[Image:Flag of Country.svg|[23]px...", and trailing space (if any)
  • Removes flag icons that rely on the {{tl|flagicon}} template
  • Replaces flag icons with the corresponding country name without wikilink
  • Where required, the script will decode the ISO 3166-1 alpha-3 associated with the flag (and most commonly used 3-lettered abbreviations) and give the country name.

{{User:Ohconfucius/script/install}}

Actions

Once you are in edit mode, there is a button in the toolbox in the left margin

:* FLAGCRUFT function – Removes flag icons and blanks icons called by the {{para|nat}} or {{para|clubnat}} parameters within certain templates.

:* FLAG->COUNTRY function – Removes flag icons, replaces with the corresponding country name without wikilink.

Miniature flag icons called by other sporting templates that link to national sporting/team articles should not be affected

= Bug reports =

Feedback is appreciated at User talk:Ohconfucius/script. Please report false negatives as well as false positives.

Essays

  • [https://en.wikipedia.org/w/index.php?title=User:Ohconfucius/sandbox&oldid=608919759 Flags are being seriously abused on Wikipedia]

See also