Po redaktohet
Moduli:qualifier
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 concat = table.concat --[==[ Wrap text in one or more CSS classes. `classes` should be a string; separate multiple classes with a space. ]==] function export.wrap_css(text, classes) return ("<span class=\"%s\">%s</span>"):format(classes, text) end --[==[ Wrap text in one or more qualifier CSS classes. `suffix` is the suffix describing the type of content, e.g. `brac` for parens, `content` for content, `comma` for commas. CSS classes <code>ib-<var>suffix</var></code> and i<code>qualifier-<var>suffix</var></code> are added. ]==] function export.wrap_qualifier_css(text, suffix) local css_classes = ("ib-%s qualifier-%s"):format(suffix, suffix) return export.wrap_css(text, css_classes) end --[==[ Format one or more qualifiers. `data` is an object with the following fields: * `qualifiers`: A single qualifier or a list or qualifiers. * `open`: Override the open paren displayed before the qualifiers. If `false` or an empty string, no paren is displayed. * `close`: Override the close paren displayed before the qualifiers. If `false` or an empty string, no paren is displayed. * `opencontent`: Content to display before the qualifiers, after the open paren. * `closecontent`: Content to display after the qualifiers, before the close paren. * `no_ib_content`: Suppress wrapping the content with classes `ib-content` and `qualifier-content`. Parens and commas will still be wrapped in CSS. * `raw`: Suppress all CSS wrapping. ]==] function export.format_qualifiers(data) local qualifiers, open, close = data.qualifiers, data.open, data.close if type(qualifiers) ~= "table" then qualifiers = {qualifiers} end if not qualifiers[1] then return "" end local parts = {} local function ins(text) table.insert(parts, text) end local function wrap_qualifier_css(text, suffix) if data.raw then return text end return export.wrap_qualifier_css(text, suffix) end if open ~= false and open ~= ""then ins(wrap_qualifier_css(open or "(", "brac")) end if data.opencontent then ins(data.opencontent) end local content = concat(qualifiers, wrap_qualifier_css(",", "comma") .. " ") if not data.no_ib_content then content = wrap_qualifier_css(content, "content") end ins(content) if data.closecontent then ins(data.closecontent) end if close ~= false and close ~= "" then ins(wrap_qualifier_css(close or ")", "brac")) end return concat(parts) end --[==[ An older interface onto `format_qualifiers`. Eventually code should be converted to use the new entry point. ]==] function export.format_qualifier(qualifiers, open, close, opencontent, closecontent, no_ib_content) return export.format_qualifiers { qualifiers = qualifiers, open = open, close = close, opencontent = opencontent, closecontent = closecontent, no_ib_content = no_ib_content, } end local function format_qualifiers_with_clarification(qualifiers, clarification, openquote, closequote) local opencontent = export.wrap_css(clarification, "qualifier-clarification") .. export.wrap_css(openquote or "“", "qualifier-clarification qualifier-quote") local closecontent = export.wrap_css(closequote or "”", "qualifier-clarification qualifier-quote") return export.format_qualifiers { qualifiers = qualifiers, open = "(", close = ")", opencontent = opencontent, closecontent = closecontent, } end --[==[ Internal implementation of {{tl|sense}}. ]==] function export.sense(qualifiers) return export.format_qualifiers { qualifiers = qualifiers }.. export.wrap_css(":", "ib-colon sense-qualifier-colon") end --[==[ Internal implementation of {{tl|antsense}}. ]==] function export.antsense(qualifiers) return format_qualifiers_with_clarification(qualifiers, "antonym(s) of ") .. export.wrap_css(":", "ib-colon sense-qualifier-colon") 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:qualifier/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