45,646
edits
No edit summary |
No edit summary |
||
Line 25: | Line 25: | ||
-- if set to "wikilink" the abbreviation is formatted as a wikilink to the relevant wikipedia article | -- if set to "wikilink" the abbreviation is formatted as a wikilink to the relevant wikipedia article | ||
-- if set to "none" abbreviations aren't formatted at all | -- if set to "none" abbreviations aren't formatted at all | ||
MessageGlossingError = "Error(s) in interlinear glossing", | MessageGlossingError = "Error(s) in interlinear glossing", | ||
combining_gender_numbers = "[0-9][0-9]?$", --e.g. G4 '4th gender' or CL7 'class 7' | combining_gender_numbers = "[0-9][0-9]?$", --e.g. G4 '4th gender' or CL7 'class 7' | ||
Line 217: | Line 215: | ||
end | end | ||
if self.gloss_messages then | if self.gloss_messages then | ||
div:wikitext("<p> To change any of the following default expansions, see [[Template:Interlinear/doc#Custom abbreviations|the template's documentation]]:</p>") | div:wikitext("<p> To change any of the following default expansions, see [[w:Template:Interlinear/doc#Custom abbreviations|the template's documentation]]:</p>") | ||
end | end | ||
for _,v in pairs(self.gloss_messages) do | for _,v in pairs(self.gloss_messages) do | ||
Line 314: | Line 312: | ||
end | end | ||
if glossing_type == "wikilink" and wikilink | if glossing_type == "wikilink" and wikilink | ||
then gloss_node:wikitext("[[", wikilink, "|" , gloss, "]]") | then gloss_node:wikitext("[[w:", wikilink, "|" , gloss, "]]") | ||
else gloss_node:wikitext(gloss) end | else gloss_node:wikitext(gloss) end | ||
if source ~= "local" and displaying_messages then -- logging gloss lookups: | if source ~= "local" and displaying_messages then -- logging gloss lookups: | ||
Line 321: | Line 319: | ||
message = "assuming " .. gloss2 .. " means \"" .. abbr_label .. "\";" end | message = "assuming " .. gloss2 .. " means \"" .. abbr_label .. "\";" end | ||
if glossing_type == "wikilink" and wikilink then | if glossing_type == "wikilink" and wikilink then | ||
message = message .. " linking to [[" .. wikilink .. "]];" | message = message .. " linking to [[w:" .. wikilink .. "|" .. wikilink "]];" | ||
end | end | ||
msg:add("gloss_message", message, gloss) | msg:add("gloss_message", message, gloss) | ||
Line 824: | Line 822: | ||
div:newline() | div:newline() | ||
local temp_track = "" | local temp_track = "" | ||
return tostring(div) .. temp_track .. msg:print_warnings() | return tostring(div) .. temp_track .. msg:print_warnings() | ||
end | end | ||
return p | return p |