Module:PlantInfoCard: Difference between revisions

From Eco - English Wiki
[checked revision][checked revision]
Replaced content with "local p = {} local Utils = require('Module:Utils') local RecipeUtils = require('Module:RecipeUtils') local IconUtils = require('Module:IconUtils') local InfoCardUtils = require('Module:InfoCardUtils') local Lang = Utils.getLanguageName() function p.main(frame) local PageName = frame.args[1] if (Lang == 'English') then PlantName = PlantName else PlantName = Utils.PlantSearch(PageName) end local PlantData = mw.loadData( "Module:PlantData" ) local Plant = Plan..."
Tag: Replaced
No edit summary
Line 17: Line 17:
WikiText =  WikiText ..'__NOTOC__'
WikiText =  WikiText ..'__NOTOC__'
WikiText =  WikiText ..'Page name get test: ' .. PageName ..'</br>'
WikiText =  WikiText ..'Page name get test: ' .. PageName ..'</br>'
WikiText =  WikiText ..'Plant name get test: ' .. ItemName ..'</br>'
WikiText =  WikiText ..'Plant name get test: ' .. PlantName ..'</br>'
return WikiText
return WikiText

Revision as of 09:57, 25 March 2026

Documentation for this module may be created at Module:PlantInfoCard/doc

local p = {}

local Utils = require('Module:Utils')
local RecipeUtils = require('Module:RecipeUtils')
local IconUtils = require('Module:IconUtils')
local InfoCardUtils = require('Module:InfoCardUtils')

local Lang = Utils.getLanguageName()

function p.main(frame)
	local PageName = frame.args[1]
	if (Lang == 'English') then PlantName = PlantName else PlantName = Utils.PlantSearch(PageName) end
	local PlantData = mw.loadData( "Module:PlantData" )
    local Plant = PlantData.plants[PlantName]
	local WikiText =''
	
	WikiText =  WikiText ..'__NOTOC__'
	WikiText =  WikiText ..'Page name get test: ' .. PageName ..'</br>'
	WikiText =  WikiText ..'Plant name get test: ' .. PlantName ..'</br>'
	
	return WikiText
end

return p