Module:Sandbox/Innesw/Infobox Australian place-upgrade/doc explained

This module is the existing Infobox Australian place template (as of March 2024) transferred from normal template syntax to a Lua module, and then with a number of changes.

The original transfer from template to module syntax is here, and there is a testcases page comparing the two versions.

This upgrade version of the module includes more substantive changes to the behaviour of the template, including some additional parameters. It is now ready for wider testing, so further changes are still possible.

Some of the changes in behaviour actually involve changes to other modules that this one calls:

All of the changes detailed here are subject to further discussion. There is a talk page specifically for that purpose. It should not be assumed these changes have to be implemented or rejected as a whole - discussion on any of the individual changes is welcome.

Testing

This module can be tested with a call to <nowiki>{{Sandbox/Innesw/Infobox_Australian_place-upgrade}}</nowiki>, in general with any of the same parameters as the existing template.

There is a testcases page, comparing the output of this module with the existing template.

There is also a draft documentation page with changes reflecting this upgrade.

New values for

The following values for the parameter are now recognised:

Use of the <nowiki>|</nowiki>{{visible anchor|type}}= parameter! scope="col" style="background-color: whitesmoke;" | Accepted value! scope="col" style="background-color: whitesmoke;" | Description! scope="col" style="background-color: whitesmoke;" | Effects! scope="col" style="background-color: whitesmoke;" width=15% | Background
Colour|-! scope="row" | settlement| A settled place too small to be a town.|
  • the short description will be 'Settlement in ...'
  • the article will not be added to any auto categories based on the type

| style="background:#d7f9da; color:#100;" |  |-! scope="row" | locality| A rural locality, generally equivalent to .|

  • the short description will be 'Locality in ...'
  • the article will be added to [[Category:Localities of <lga>]] if it exists

| style="background:#f9de9d; color:#100;" |  |-! scope="row" | townandlocality| Where the article is about a town, and a surrounding locality with the same name.|

  • the short description will be 'Town and Locality in ...'
  • if, and a map file named <name> + ', ' + <state> + ' UCL.map' exists in Commons:Data:, the local map will show both the locality (SAL) and the urban area (UCL)
    • the default caption will be "<name>
Locality (SAL) & Urban area (UCL)", but this will be overridden if is set
    • if the map file does not exist, just the locality will be shown (as at present), and there will be no default caption
  • the article will be added to category [[Category:Towns of <state>]], and to [[Category:Localities of <lga>]] if it exists

| style="background:#f1f1b7; color:#100;" |  |-|}

New Parameters

There are some additional parameters implemented:

Parameter! scope="col" style="background-color: whitesmoke;"
Available for DescriptionNotesPotential sourcesValues
native_name_footnotesallA reference demonstrating the Indigenous namePrerequisite parameters:
  • native_name
Wikitext (can contain links).
Best when used with <ref></ref> tags and a citation template.|-! scope="row" | local_map_caption| all| Caption for the local map| Prerequisite parameters:
  • local_map

| | Plain text or wikitext.|-! scope="row" | logo_caption| all| Caption for the logo image| Prerequisite parameters:

  • logo

| | Plain text or wikitext.|}

Changes to Wikidata Population

If , the latest population figures available in Wikidata are displayed. In the released version of the template, this was almost always a single figure.

In this revised version:

  • populations for a number of ABS geographies may be shown if they are in the wikidata linked to the article. Which values may be shown depends on the value.
  • the citation references for populations in the infobox now integrate with references created by other calls to PopulationFromWikidata

For details of these changes, see PopulationFromWikidata-upgradeAlso:

  • a value for is still shown
  • a value for (with and) is still shown
  • if or, no population from Wikidata is ever shown
  • is not shown

Other Changes

  • if the module is called with no parameters, it returns an empty string
  • the parameter is no longer supported
  • error messages for the non-existence of (or unsupported values for) and appear in the heading of the infobox
  • removes the difference between and other types in the call to {{coords}}
  • fixes the response to 'flag' parameters (local_map, force_national_map, use_lga_map, relief) so 'no' = <blank>, any other value = 'yes' (implemented in Australian place map-upgrade)
  • the following values for now have priority over the deprecated (but still implemented) parameters, and (implemented in Australian place map-upgrade)
    • or - force the location map to be a map of Australia
    • - forces the location map to be the state map
    • - forces the location map to be the map of the lga (as specified in)
    • - suppresses any location map
    • - assumes the provided value is the name of a specific map to use as the location map. Multiple map names separated by '#' will show multiple maps, selectable by the user.
  • if both and are supplied and is not, but either |pop or |area are non-numeric, no density calculation is attempted and a density is not shown. The released version of the template produces an error in these circumstances.
  • the space between the density and its reference has been removed
  • the background colour of the headings for the climate and places-near sub-tables is now the same as the infobox header and the labels column
  • the colon at the end of the heading for the 'Places Near' sub-table has been removed

Changes to Categories

  • No categories are now output unless the article that calls the template is in the article namespace

Auto Categories

  • fixes the response to so 'no' = <blank>, any other value = 'yes'
  • when adding to the [[Category:Populated places established in /year/]]
    • is now treated the same as
    • an article is placed in the category no matter what the value (instead of only for)
  • if, the article is added to [[Category:Localities in <lga>]] (if it exists)
  • if, the article is added to [[Category:Towns in <state>]], and to [[Category:Localities in <lga>]] (if it exists)

Tracking Categories

  • obsolete parameters (alt, alt2, image_alt2, imagesize, image_size, imagesize2, image_size2, logo_alt, logosize, official_site) are now simply ignored. Any use of them will add the page to
  • articles are added to a new category if:
    • there are formatting errors in the template call
    • or are missing
    • population (or) are set, but no related year (or) is given
    • there are density errors, ie: where and are both given, but one of them is not a number (so a density cannot be calculated)
    • a parameter with an associated reference parameter is given, but the reference parameter is missing (eg: is given, but no, or but no)
    • the automatic categories are explicitly suppressed, ie: is not blank
  • if and no other location map is forced, adding articles to [[Category:Pages using infobox Australian place with an implicitly suppressed location map]] is now dropped. (No location map is the normal behaviour for .)

Issues for further discussion

  • whether a parameter for the Infobox is required that specifies an ABS geography for which a single population is shown (as opposed to the new default of possibly multiple populations)
  • whether is worth adding to the infobox. If so, a number of steps to upload ILOC populations to Wikidata will be required.
  • what is the proper Wikidata population to show when . It is currently 'LGA', but maybe it should be 'SA3' or 'SA4'.
  • should showing a value for be suppressed unless
  • how (where) should be shown if there is more than one population figure shown. Currently it is shown after the second pop figure.
  • categories: would it be better for each of the individual parameter issues (eg: a value without its footnotes) to have their own sub-category, with just a container category