Module:Sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 46:
 
return output
 
end
 
country_names_data = mw.loadJsonData( 'User:Pcoombe/sandbox.json' )
 
function p.get_country_name( language_code, country_code )
 
local name = country_names_data[language_code][country_code]
return name
 
end
 
function p.make_donate_link( language_code, country_code )
 
local url = 'https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?utm_medium=Waystogive&utm_source=Waystogive&utm_campaign=C11_Waystogive'
url = url .. '&uselang=' .. language_code
url = url .. '&country=' ..country_code
local link_text = p.get_country_name( language_code, country_code )
local link = '[' .. url .. ' ' .. link_text .. ']'
 
return link
 
end