Dokumentado Dokumentado


Ŝablona programado Diskutoj Lua Testoj Subpaĝoj
Modulo Esperanto English

Modulo: Dokumentado


Se vi havas demandon pri ĉi tiu Lua-modulo, tiam vi povas demandi en la diskutejo pri Lua-moduloj. La Intervikiaj ligiloj estu metataj al Vikidatumoj. (Vidu Helpopaĝon pri tio.)
-- modulo Geografiaĵoj/type:, 2024-03-23
-- ĉi tiu modulo difinas la valoron de la "type:"-atributo por diversaj geografiaj objektoj kaj povas esti uzata de diversaj aliaj moduloj
-- laŭ la listo de "Ŝablono:Koordinato" kaj la germana "Vorlage:Coordinate"
-- ĝi enhavu la samajn eblajn tipojn kiel [[Modulo:Geografiaĵoj/koloroj]]!

local p = {}

-- type:-atributo laŭ tipo
function p.type_atributo(tipo)
		local r = "landmark"
		if tipo == "administra unuo" or tipo == "administra teritoria unuo" then
			r = "adm1st"     -- kiel ebligi alternative "adm2nd" aŭ "state"?
		elseif tipo == "akvofalo" then	
			r = "waterbody"
		elseif tipo == "belvedero" or tipo == "biblioteko" or tipo == "bieno" then
			r = "landmark"
		elseif tipo == "arbaro" then
			r = "forest"
		elseif tipo == "burgo" then
			r = "building"
		elseif tipo == "dezerto" then
			r = "landscape"	
		elseif tipo == "duoninsulo" or tipo == "kabo" then	
			r = "landscape"
		elseif tipo == "golfo" then	
			r = "landscape"	
		elseif tipo == "groto" then	
			r = "landscape"				
		elseif tipo == "haveno" then
			r = "landmark"			
		elseif tipo == "historia teritorio" or tipo == "historia regiono" or tipo == "hospitalo" or tipo == "malsanulejo" then
			r = "landmark"
		elseif tipo == "insulo" then
			r = "isle"			
		elseif tipo == "kampurbo" then	
			r = "city"
		elseif tipo == "kastelo" then
			r = "building"
		elseif tipo == "kavo" or tipo == "kaverno" then
			r = "landmark"	
		elseif tipo == "komunumo" then	
			r = "city"
		elseif tipo == "konstruaĵo" or tipo == "alta konstruaĵo" then
			r = "building"
		elseif tipo == "kvartalo" then
			r = "city"
		elseif tipo == "lago" or tipo == "lagaro" or tipo == "laguno" then
			r = "waterbody"			
		elseif tipo == "lando" then
			r = "country"
		elseif tipo == "limpasejo" then
			r = "landmark"
		elseif tipo == "malaperinta municipo" then
			r = "city"
		elseif tipo == "maro" or tipo == "oceano" then	
			r = "waterbody"			
		elseif tipo == "megalitejo" or tipo =="arkeologia situo" then
			r = "landmark"
		elseif tipo == "montaro" then
			r = "mountain"	
		elseif tipo == "monto" then	
			r = "mountain"
		elseif tipo == "monumento" then
			r = "landmark"
		elseif tipo == "municipo" or tipo == "municipa parto" then
			r = "city"
		elseif tipo == "muzeo" then
			r = "landmark"			
		elseif tipo == "nacia parko" or tipo == "protektita tereno" then
			r = "landmark"			
		elseif tipo == "parko" or tipo == "verda spaco" then
			r = "landmark"			
		elseif tipo == "pasejo" then
			r = "mountain"
		elseif tipo == "ponto" then
			r = "building"	
		elseif tipo == "preĝejo" then
			r = "landmark"
		elseif tipo == "protektita areo" then	
			r = "landmark"
		elseif tipo == "reliefo" then
			r = "mountain"
		elseif tipo == "rezervejo" then
			r = "landmark"
		elseif tipo == "rezervujo" then
			r = "landmark"
		elseif tipo == "rivero" then
			r = "waterbody"			
		elseif tipo == "statuo" then
			r = "landmark"
		elseif tipo == "strato" then
			r = "landmark"			
		elseif tipo == "teritorio" then	
			r = "country"
		elseif tipo == "urbo" then
			r = "city"
		elseif tipo == "vilaĝo" then
			r = "landmark"
		elseif tipo == "vojo" then
			r = "landmark"				
		elseif tipo == "vulkano" then
			r = "mountain"	
		elseif tipo == "zoologia ĝardeno" or tipo == "zoologia parko" or tipo == "zoo" then
			r = "landmark"
		end
		return r
end


return p