Module:Sandbox/Innesw/Infobox Australian place-upgrade/doc
![]() | This is a documentation subpage for Module:Sandbox/Innesw/Infobox Australian place-upgrade. It may contain usage information, categories and other content that is not part of the original module page. |
This module is the existing Infobox Australian place template (as of March 2024) transferred from normal template syntax to a Lua module, and then further modified.
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 still in development, and further changes are likely.
Some of the changes in behaviour actually involve changes to other modules that this one calls:
- changed version at Australian place map-upgrade. Details of changes are mentioned below.
- changed version at PopulationFromWikidata-upgrade. These changes are mentioned here, but full details appear at that link.
All of the changes detailed here are subject to further discussion - as individual items. It should not be assumed these changes have to be implemented or rejected as a whole set. There is a talk page specifically for that purpose.
New values for |type=
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. |
|
|
locality
|
A rural locality, generally equivalent to |type=suburb .
|
|
|
townandlocality
|
Where the article is about a town, and a surrounding locality with the same name. |
|
New Parameters
There are some additional parameters implemented:
Parameter | Available for |type=
|
Description | Notes | Potential sources | Values |
---|---|---|---|---|---|
native_name_footnotes | all | A reference demonstrating the Indigenous name | Prerequisite parameters:
|
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:
|
Plain text or wikitext. | |
logo_caption | all | Caption for the logo image | Prerequisite parameters:
|
Plain text or wikitext. |
General Changes
- if the module is called with no parameters, it returns an empty string
- the parameter
|short description=
is no longer supported - both error messages for the non-existence of (or unsupported values for)
|type=
and|state=
are in the heading of the infobox - new parameter native_name_footnotes
- 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, _noautocat) 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
- force 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
- the local_map (if shown) can have a caption, by setting
|local_map_caption=
- if
|pop=<blank>
, and therefore replaced by wikidata population data:- populations for a number of ABS geographies may be shown if they are in the wikidata linked to the article
- a value for
|pop2=
(with|pop2_year=
and|pop2_footnotes=
) is still shown - a value for
|poprank=
is still shown - the citation references for populations in the infobox now integrate with references created by other calls to PopulationFromWikidata
- if
|type=cadastral
or|type=protected
, no population from Wikidata is ever shown
- for details of these changes, see PopulationFromWikidata-upgrade
- the space between the density and its reference (
|density_footnotes=
) has been removed - the logo (if shown) can have a caption, by setting
|logo_caption=
- 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
Changes to Categories
Auto Categories
- when adding to the [[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
)
Tracking Categories
- obsolete parameters (alt, alt2, image_alt2, imagesize, image_size, imagesize2, image_size2, logo_alt, logosize) are now simply ignored. Any use of them will add the page to [[Category:Pages using infobox Australian place with unknown parameters]]
- articles are added to a new category {{Pages using infobox Australian place with parameter issues}} if:
- there are formatting errors in the template call
|type=
or|state=
are missing- population (
|pop=
or|pop2=
) are set, but no related year (|pop_year=
or|pop2_year=
) is given - a parameter with an associated reference parameter (
|..._footnotes=
) is given, but the reference parameter is missing (eg:|pop=
is given, but no|pop_footnotes=
, or|elevation=
but no|elevation_footnotes=
) - there are density errors, ie: where
|pop=
and|area=
are both given, but one of them is not a number (so a density cannot be calculated) - the automatic categories are explicitly suppressed , ie:
|_noautocat=
is not blank
Testing
This module can be tested with a call to {{Sandbox/Innesw/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.
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
|type=indigenouscommunity
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
|type=region
. It is currently 'LGA', but maybe it should be 'SA3'. - should showing a value for
|poprank=
be suppressed unless|type=city
- would it be better for each of the individual parameter issues (eg: a value without its ...footnotes) to have their own sub-category, with {{Pages using infobox Australian place with parameter issues}} just a container category