Jump to content

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

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Innesw (talk | contribs) at 12:12, 17 April 2025 (further revisions). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)


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 to its output.

The original transfer from template to module syntax is here. This had only a few very minor changes in behaviour from the original template.

This upgrade version of the module includes more substantive changes to the behaviour of the template, including some additional parameters. It is ready for wider testing, therefore 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

[edit]

This module can be tested with a call to the template {{User:Innesw/sandbox/Template:Infobox_Australian_place-upgrade}}, 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 |type=

[edit]

The following values for the |type= parameter are now recognised:

Accepted value Description Effects Background
Colour
settlement A settled place too small to be a town.
  • the article short description will be 'Settlement in <State>, Australia'
  • the article will not be added to any auto categories based on the type
 
locality A rural locality, generally equivalent to |type=suburb.
  • the article short description will be 'Locality in <State>, Australia'
  • the article will be added to [[Category:Localities of <lga>]] if it exists
 
townandlocality Where the article is about a town, and a surrounding locality with the same name.
  • the article short description will be 'Town and Locality in <State>, Australia'
  • if |local_map=yes, 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 |local_map_caption= 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
 

New Parameters

[edit]

The following additional parameters are implemented:

Parameter Available for |type= Description Notes Values
native_name_footnotes all A reference demonstrating the Indigenous name Prerequisite parameters:
  • native_name
Wikitext (can contain links).
Best when used with <ref></ref> tags and a citation template.
local_map_caption all Caption for the local map Prerequisite parameters:
  • local_map
Plain text or wikitext.
logo_caption all Caption for the logo image Prerequisite parameters:
  • logo
Plain text or wikitext.

Changes to Wikidata Population

[edit]

If |pop=<blank>, the latest population figures available in Wikidata are displayed.

In the released version of the template, this was almost always a single figure, for the single geography associated with the |type= value.

In this upgrade 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 |type= 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-upgrade

Also:

  • a value for |poprank= is still shown
  • a value for |pop2= (with |pop2_year= and |pop2_footnotes=) is still shown
  • if |type=cadastral or |type=protected, no population from Wikidata is ever shown
  • if any population from Wikidata is shown, |density= is not shown - because the area the population is for is not in the Wikidata

Other Changes

[edit]
  • if the module is called with no parameters, it returns an empty string
  • the parameter |short description= is no longer supported
  • error messages for the non-existence of (or unsupported values for) |type= and |state= appear in the heading of the infobox
  • removes the difference between |type=protected 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 |map_type= now have priority over the deprecated (but still implemented) parameters |force_national_map=, |use_lga_map= and |alternative_location_map= (implemented in Australian place map-upgrade)
    • |map_type=national or |map_type=australia - forces the location map to be a map of Australia
    • |map_type=state - forces the location map to be the state map
    • |map_type=lga - forces the location map to be the map of the lga (as specified in |lga=)
    • |map_type=nomap - suppresses any location map
    • |map_type=(any other value) - 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 |pop= and |area= are supplied and |density= 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 (|density_footnotes=) 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

[edit]
  • No categories are now output unless the page that calls the template is in the article namespace

Auto Categories

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

Tracking Categories

[edit]

Unknown Parameters

[edit]

Any use of a parameter unknown to the template will add the page to Category:Pages using infobox Australian place with unknown parameters. This includes the now obsolete parameters short description, alt, alt2, image_alt2, imagesize, image_size, imagesize2, image_size2, logo_alt, logosize and official_site.

Missing Parameters, and Similar Issues

[edit]

Articles are added to a new category Category:Pages using infobox Australian place with parameter issues, according to the following table:

If this parameter is defined But this is missing use sort letter
(all) type T
name state S
native_name native_name_footnotes N
pop pop_year Y
pop2 pop2_year Y
pop pop_footnotes P
pop2 pop2_footnotes P
established established_footnotes E
elevation elevation_footnotes H
area area_footnotes A
visitation visitation_footnotes V
maxtemp maxtemp_footnotes C
mintemp mintemp_footnotes C
rainfall rainfall_footnotes C
timezone utc Z
timezone-dst utc-dst Z
_noautocat (always) Q
pop and area exist
but one or both are not numbers
density D
args[1] exists, ie: there are missing equals signs
or spurious pipes in the infobox call
(always) 1
This category would replace the following current categories, which are proposed to be deleted:

Mapping Categories

[edit]

Articles are added to a new category Category:Pages using infobox Australian place with location map issues, according to the following table (so long as |coordinates= is defined):

If this circumstance which means use sort letter
|type=lga and any of
|alternative_location_map
or |force_national_map=
or |use_lga_map are defined,
or some value of |map_type= forces a location map
location map for LGA forced on

(The default for LGAs is not to have a location map.)

L
|type=<not lga> and |map_type=nomap location map explicitly suppressed N
This category would replace the existing categories Category:Pages using infobox Australian place with an implicitly suppressed location map, Category:Pages using infobox Australian place with an explicitly suppressed location map and Category:Pages using infobox Australian place with lga type and location map, which are proposed to be deleted.

Issues for further discussion

[edit]
  • does a new parameter |pop_geog= needs to be added? It would specify an ABS geography for which a single population is shown (as opposed to the new default of possibly multiple populations, if they are in the Wikidata)
  • does a new parameter |indigenouscommunity= needs to be added? If so, uploading of ILOC populations to Wikidata will be required to make it useful.
  • what is the proper Wikidata population to show when |type=region? It is currently 'LGA', but maybe it should be 'SA3' or 'SA4'.
  • should showing a value for |poprank= be suppressed unless |type=city?