Module:Annotated link: Difference between revisions

Content deleted Content added
Module:Arguments?
tracking category prep; something like: Category:Pages displaying a case-altered short description with an annotated link? + remove testing crud + add errorMessage for possible fail point
Line 30:
return short_description
end
local case_altered_short_descriptioncase_parsed_short_description = mw.ustring.gsub( short_description, '^([^%d])', function( first_char )
if case == 'lower' then
return mw.ustring.lower( first_char )
Line 36:
return mw.ustring.upper( first_char )
end )
if case_altered_short_descriptioncase_parsed_short_description ~= short_description then
-- we're not doing this without discussion
mw.log( 'tracking categories rule' )
mw.log( '[[Category:Pages displaying a case-altered short description with an annotated link]]' )
end
return case_altered_short_descriptioncase_parsed_short_description
end
 
Line 124 ⟶ 125:
function p.main( frame )
local args = getArgs( frame )
if not args then
local annotated_link = annotatedLink( args )
return errorMessage( 'could not getArgs' )
mw.log( annotated_link )
end
return annotated_link
local annotated_link =return annotatedLink( args )
end
 
return p
 
--[[
{{#invoke:AnnotatedLink|main
|name= |display= |wedge= |quote= |dash= |abbr= |desc_first_letter_case= |aka=
|link_lang= |link_lang_italic= |link_lang_nocat= |link_lang_size= |link_lang_cat= |link_lang_rtl=
|wedge_lang= |wedge_lang_italic= |wedge_lang_nocat= |wedge_lang_size= |wedge_lang_cat= |wedge_lang_rtl=
|aka_lang= |aka_lang_italic= |aka_lang_nocat= |aka_lang_size= |aka_lang_cat= |aka_lang_rtl=
|only= |prefer= |fallback=
|desc_lang_italic= |desc_lang_nocat= |desc_lang_size= |desc_lang_cat= |desc_lang_rtl= |desc_lang_no=
}}
p.main { args = { name = "", display = "", wedge = "", quote = "", dash = "", abbr = "", desc_first_letter_case = "", aka = "" } }
p.main { args = { name = "The Partisan" } }
p.main { args = { name = "The Partisan", quote = "yes" } }
p.main { args = { name = "The Partisan", quote = "yes", only = "wikidata", desc_first_letter_case = "upper" } }
p.main { args = { name = "Author, Author (Star Trek: Voyager)" } }
p.main { args = { name = "Author, Author (Star Trek: Voyager)", display = "Author, Author" } }
p.main { args = { name = "Author, Author (Star Trek: Voyager)", display = "Author, Author", wedge = "''(Star Trek: Voyager)''" } }
p.main { args = { name = "Confédération Mondiale des Activités Subaquatiques", display = "World Underwater Federation", abbr = "CMAS", aka = "''Confédération Mondiale des Activités Subaquatiques''", desc_first_letter_case = "lower" } }
 
--]]
 
-- p.main { args = { name = "The Partisan", quote = "yes", only = "wikidata", desc_first_letter_case = "upper", wedge = "from the album ''[[Songs from a Room]]''", aka = "La Complainte du partisan", aka_lang = "fr" } }