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 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, so further changes are still possible.
Some of the changes in behaviour actually involve changes to other modules that this one calls:
- Module:Australian_place_map, version called by this module upgrade at Australian place map-upgrade. Details of changes are mentioned below.
- Module:PopulationFromWikidata, version called by this module upgrade 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. 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 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=
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. |
Changes to Wikidata Population
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.
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 show,
|density=
is not shown - because the area the population is for is not in the Wikidata
Other Changes
- 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
- No categories are now output unless the page that calls the template is in the article namespace
Auto Categories
- fixes the response to
|_noautocat=no
, so it = <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 toCategory:Localities in <lga>
(if it exists) - if
|type=townandlocality
, the article is added toCategory:Towns in <state>
, and toCategory: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 Category:Pages using infobox Australian place with unknown parameters
- articles are added to a new category 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 - 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) - 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=
) - the automatic categories are explicitly suppressed, ie:
|_noautocat=
is not blank
- if
|type=lga
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|type=lga
.)
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)
- is
|type=indigenouscommunity
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' or 'SA4'. - should showing a value for
|poprank=
be suppressed unless|type=city
? - how (where) should
|poprank=
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 Category:Pages using infobox Australian place with parameter issues just a container category?