မေႃႇၵျူး:Storm categories/doc
This is the documentation page for မေႃႇၵျူး:Storm categories
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
Lua module ဢၼ်ၼႆႉ လႆႈၸႂ်ႉဝႆႉ တီႈၼႃႈလိၵ်ႈ many ၼႃႈလိၵ်ႈ လႄႈ လွင်ႈလႅၵ်ႈလၢႆႈၸိူဝ်းၼႆႉ တေႁႂ်ႈၽၢင်ႉမႅၼ်ႈၺႃး ၵႂၢင်ႈၵႂၢင်ႈၶႂၢင်ၶႂၢင်။ ၸၢမ်းတူၺ်း လွင်ႈလႅၵ်ႈလၢႆႈ တီႈၼႂ်း မေႃႇၵျူး's /sandbox ဢမ်ႇၼၼ် ၼႃႈလိၵ်ႈၽႄ /testcases . ဝူၼ်ႉသွၼ်ႇ ဢုပ်ႇဢူဝ်း လွင်ႈလႅၵ်ႈလၢႆႈ တီႈၼႂ်း ၼႃႈလိၵ်ႈ တႃႇဢုပ်ႇ ၽွင်းမိူဝ်ႈပႆႇ ၵေႃႇသၢင်ႈၶဝ်ၼၼ်ႉ။
ႁူဝ်ၼပ်ႉ လွင်ႈၶဝ်ႈပႃးၼႆႉ မၼ်းႁဵတ်းဢၢပ်ႉတဵတ်ႉဝႆႉႁင်းမၼ်း (တူၺ်းတီႈ ၽိုၼ်လိၵ်ႈ)။ |
In order to conform to Wikipedia:Manual of Style/Accessibility#Color guidelines, do not use storm colors in conjunction with links. This is necessary to avoid problems related to lack of contrast. |
Uses Lua: |
This template is used to control a multitude of tropical cyclone-related templates: {{storm colour}}, {{storm name}}, {{storm sortkey}}, and {{storm icon}}. It acts as a centralized location for storm categories to avoid discrepancies between templates, allowing for the same ID to be used across all related templates.
Data is located in the following submodules:
- Module:Storm categories/categories for fully-detailed storm categories
- Module:Storm categories/colors for color-only IDs
- Module:Storm categories/icons for icon-only IDs
လွင်ႈၸႂ်ႉတိုဝ်း�
[မႄးထတ်းငဝ်ႈငႃႇ]This module exports three functions for templates: p.color
, p.name
, p.sortkey
, and p.icon
. It also provides p._color
, p._name
, p._sortkey
, and p._icon
for use in other modules.
All input IDs are case-insensitive, and all non-alphanumeric characters are stripped.
Color
[မႄးထတ်းငဝ်ႈငႃႇ]Provides the color of the given tropical cyclone category code. This comes in the format of their raw hexadecimal code. This function is available as a template at {{storm colour}}.
Code | Output |
---|---|
<span style="padding:4px;border:1px solid black;background-color:#{{#invoke:Storm categories|color|depression}}">depression</span>
|
<span style="padding:4px;border:1px solid black;background-color:#Script error: No such module "Storm categories/sandbox".">depression |
Name
[မႄးထတ်းငဝ်ႈငႃႇ]Provides the name of the given tropical cyclone category code. A optional basin argument can be provided as the second argument in order to slightly tweak the name of the category, if the given category definition supports it. This function is available as a template at {{storm name}}.
Code | Interpreted | Output | |
---|---|---|---|
ID | Basin | ||
{{#invoke:Storm categories|name|severe}}
|
severe | (default) | Script error: No such module "Storm categories/sandbox". |
{{#invoke:Storm categories|name|spr - cYcL -s TorM}}
|
sprcyclstorm | (default) | Script error: No such module "Storm categories/sandbox". |
{{#invoke:Storm categories|name|cat5}}
|
cat5 | (default) | Script error: No such module "Storm categories/sandbox". |
{{#invoke:Storm categories|name|cat5|ATl}}
|
cat5 | ATl | Script error: No such module "Storm categories/sandbox". |
{{#invoke:Storm categories|name|cat5|WPac}}
|
cat5 | WPac | Script error: No such module "Storm categories/sandbox". |
Sortkey
[မႄးထတ်းငဝ်ႈငႃႇ]The sortkey is a number that aids in sorting categories. Using the sortkey, it is possible to automatically sort a table of tropical cyclones given their category code. Due to the ambiguous nature of sortkeys, tables may be sorted incorrectly if values from other basins were used. For categories that span multiple basins, however, (e.g. depression
and storm
) they are given the lowest possible sortkeys in order to achieve maximum compatibility.
This sortkey is used in {{storm sortkey}} and {{Tropical cyclone season effects (cyclone)}}, a subtemplate of {{Tropical cyclone season effects}}.
The sortkey format is as follows. Note that not all values between the given ranges were used. The arrangement of these were determined by their positions in the {{Storm colour}} template.
Basin | Sortkey range |
---|---|
Global (unused) | 90000 to 99999 |
Atl/EPac/SAtl | 80000 to 89999 |
WPac | 60000 to 69999 |
Nio | 50000 to 59999 |
Aus/Fiji | 40000 to 49999 |
SWio | 30000 to 39999 |
Historical | 20000 to 29999 |
Global | 0 to 9999 |
A demonstration of a sortable table using these sortkeys can be found below. Note that it does not use categories outside of its own basin (in this case, the Atl/EPac/SAtl basin) and the global range.
Category | Sortkey | Code |
---|---|---|
cat3 | {{#invoke:Storm categories|sortkey|cat3}}
| |
cat1 | {{#invoke:Storm categories|sortkey|cat1}}
| |
cat5 | {{#invoke:Storm categories|sortkey|cat5}}
| |
cat4 | {{#invoke:Storm categories|sortkey|cat4}}
| |
depression | {{#invoke:Storm categories|sortkey|depression}}
| |
cat2 | {{#invoke:Storm categories|sortkey|cat2}}
|
Category | Sortkey | Code |
---|---|---|
typhoon | {{#invoke:Storm categories|sortkey|typhoon}}
| |
potential | {{#invoke:Storm categories|sortkey|potential}}
| |
cat5 | {{#invoke:Storm categories|sortkey|cat5}}
| |
svrcyclstorm | {{#invoke:Storm categories|sortkey|svrcyclstorm}}
| |
unknown | {{#invoke:Storm categories|sortkey|unknown}}
| |
supertyphoon | {{#invoke:Storm categories|sortkey|supertyphoon}}
| |
niodepression | {{#invoke:Storm categories|sortkey|niodepression}}
|
ႁၢင်ႈႁိင်ႈ
[မႄးထတ်းငဝ်ႈငႃႇ]Icons exist for some Storm categories for presentation purposes. This function is available as a template at {{storm icon}}. p.icon
will return wikitext of an image or formatted text.
Full list of available values
[မႄးထတ်းငဝ်ႈငႃႇ]The following table is generated by invoking the demo
function of this module. Some IDs are only available as colors or icons because they existed as parameters on old non-module template implementations and cannot be feasibly aliased to a specific tropical cyclone category.
It will show any color errors, including colors which aren't compliant with the minimal Web Content Accessibility Guidelines 2.0 AA color standards (see for more information). Script error: No such module "Storm categories/sandbox".