Jump to content

Module:porma kan/doc

Hali sa Wiksyunaryo

This is the documentation page for Module:porma kan

This module is used by many templates, in particular {{porma kan}}, {{inflection of}} and the various other form-of templates. It is meant to be invoked from other modules, and not directly from templates. The code that directly implements the templates is found in Module:porma kan/plantilla.

The grammatical labels used by {{inflection of}} are found in Module:porma kan/data.

ucfirst

[baguhon]

ucfirst(text)

Uppercase the first letter of text. If the passed-in text is a link, correctly uppercase the first letter of the link's display text. FIXME: Move to a utilities module.

format_form_of

[baguhon]

format_form_of(text, terminfo, posttext)

Innermost guts of the majority of the form-of templates. Most of the work however is done by the functions that directly implement the templates. text is the text to display before the link, terminfo is a table describing the link itself (exactly as for full_link in Module:links), and posttext is optional text to display after the link. The entire result will be surrounded in a span that is tagged with the CSS classes form-of-definition and use-with-mention, and the link is surrounded in a span tagged with the CSS class form-of-definition-link.

normalize_tags

[baguhon]

normalize_tags(tags, recombine_multitags, do_track)

Normalize a tag set (a list of tags) into a list of canonical-form tags (which may be larger due to the possibility of list-tag shortcuts). Documented in more detail in the code itself.

get_tag_display_form

[baguhon]

get_tag_display_form(tagspec, joiner)

Turn a canonicalized tag spec (which describes a single, possibly multipart tag) into the displayed form. Documented in more detail in the code itself.

fetch_lang_categories

[baguhon]

fetch_lang_categories(lang, tags, terminfo, POS)

Document me.

tagged_inflections

[baguhon]

tagged_inflections(tags, terminfo)

Document me.

to_Wikidata_IDs

[baguhon]

to_Wikidata_IDs(tags)

Document me.