Po redaktohet
Moduli:gender and number utilities
Kërceni tek navigimi
Kërceni tek kërkimi
Kujdes:
S’jeni i regjistruar. Adresa juaj IP do të jetë e dukshme publikisht, nëse bëni ndonjë redaktim. Nëse
hyni
ose
krijoni një llogari
, përveç përfitimesh të tjera, redaktimet tuaja do t’i atribuohen emrit tuaj të përdoruesit.
Kontrolli anti-spam.
Mos
e plotëso këtë!
local export = {} local parameter_utilities_module = "Module:parameter utilities" local parse_interface_module = "Module:parse interface" --[==[ Parse a gender and number spec, possibly with multiple comma-separated gender/number specs and potentially with inline modifiers. Used by [[Module:parameters]]. `data` is an object with the following fields: * `spec`: The unparsed gender/number spec. * `paramname`: The name of the parameter where the gender/number spec was retrieved from, for error messages. Optional. * `parse_err`: Optional function to display a parse error message, in the format required for `parse_inline_modifiers` in [[Module:parse utilities]]. * `allow_multiple`: If true, allow multiple comma-separated gender/number specs. If given, the return value will be a list of parsed gender/number specs instead of a single such object. * `allow_space_around_comma`: If true, spaces can be placed around the comma separating multiple gender/number specs. It's not generally recommended to set this. The return value is a gender/number spec of the sort accepted by [[Module:gender and number]]; or, if `allow_multiple` is given, a list of such specs. In each spec, the field `spec` contains the gender/number spec itself (e.g. `m-in-p`) and other fields contain parsed inline modifiers. The following modifiers are supported: * `q`: Left qualifier. * `qq`: Right qualifier. * `l`: Left label(s). * `ll`: Right label(s). * `ref`: Reference(s). ]==] function export.parse_gender_and_number_spec(data) local spec = data.spec if not spec:find("[,<]") then return data.allow_multiple and {{spec = spec}} or {spec = spec} end local param_mods = require(parameter_utilities_module).construct_param_mods { {group = {"q", "l", "ref"}}, } local function generate_obj(term, parse_err) return { spec = term } end return require(parse_interface_module).parse_inline_modifiers(spec, { paramname = data.paramname, param_mods = param_mods, generate_obj = generate_obj, parse_err = data.parse_err, escape_fun = false, unescape_fun = false, splitchar = data.allow_multiple and (data.allow_space_around_comma and "%s*,%s*" or ",") or nil, }) end return export
Përmbledhje:
Ju lutemi, vini re! Të gjitha kontributet në Enciklopedi Puro Shqiptare jepen për publikim sipas Creative Commons Attribution (shiko
Project:Të drejtat e autorit
për më shumë detaje). Nëse ju nuk dëshironi që shkrimet tuaja të redaktohen pa mëshirë dhe të shpërndahen sipas dëshirës, atëherë mos i vendosni këtu.
Gjithashtu, ju po na premtoni ne që gjithçka e keni shkruar vetë, ose e keni kopjuar nga një domain publik ose nga burime të tjera te hapura.
Mos vendosni material të mbrojtur nga e drejta e autorit pa leje!
Anuloje
Ndihmë për redaktim
(hapet në një dritare të re)
Stamp të përdorura në këtë faqe:
Moduli:gender and number utilities/doc
(
redakto
)
Menu lëvizjesh
Mjetet e mia
Nuk keni hyrë brenda
Diskutimi
Kontribute
Krijo llogari
Hyni
Emërhapësira
Moduli
Diskutim
English
Shikime
Lexo
Përpunoni burim
Shihni historikun
Më shumë
Kërko
Lëvizje
Faqja kryesore
Ndryshimet e fundit
Faqe e rastit
Ndihmë rreth MediaWiki-t
Faqet e veçanta
Mjete
Lidhjet këtu
Ndryshime të ndërvarura
Informacioni i faqes