Module:LocJP/en/LocalizedMasterParam/Unit

-- --[[ return { UN_V2_CHERYL={NAME='Cheryl'},  UN_V2_PAMERA={NAME='Pamera'},  UN_V2_WILHELM={NAME='Wilhelm'},  UN_V2_POK_BLK_LONGINUS={NAME='Longinus'},  UN_V2_POK_BLK_MASAMUNE={NAME='Masamune'},  UN_V2_HOZUKI={NAME='Hozuki'},  UN_V2_SYARON={NAME='Syaron'},  UN_V2_YUDIT={NAME='Yudit'},  UN_V2_BUD={NAME='Bud'},  UN_V2_AOT_REINER={NAME='Reiner'},  UN_V2_AOT_EREN={NAME='Eren'},  UN_V2_AOT_HANJI={NAME='Hanji'},  UN_V2_AOT_LEVI={NAME='Levi'},  UN_V2_AOT_MIKASA={NAME='Mikasa'},  UN_V2_KAYA={NAME='Kaya'},  UN_V2_REBECCA={NAME='Rebecca'},  UN_V2_ALMA={NAME='Alma'},  UN_V2_LEAFA={NAME='Leafa'},  UN_V2_MORE={NAME='More'},  UN_V2_CRY_ARTHUR={NAME='Arthur'},  UN_V2_REN={NAME='Ren'},  UN_V2_CRY_MERLINUS={NAME='Merlinus'},  UN_V2_POK_BLK_ARTEMIS={NAME='Artemis'},  UN_V2_ORION={NAME='Orion'},  UN_V2_DON_TARAS={NAME='Taras'},  UN_V2_ANKH={NAME='Ankh'},  UN_V2_CARLA={NAME='Carla'},  UN_V2_NEFERTY={NAME='Neferty'},  UN_V2_APR_LIZ={NAME='Liz'},  UN_V2_IRA={NAME='Ira'},  UN_V2_LETICIA={NAME='Leticia'},  UN_V2_NIGURU={NAME='Niguru'},  UN_V2_NINA={NAME='Nina'},  UN_V2_THOL={NAME='Thol'},  UN_V2_GERALD={NAME='Gerald'},  UN_V2_NATALIE={NAME='Natalie'},  UN_V2_FIONA={NAME='Fiona'},  UN_V2_L_UROB={NAME='Urob'},  UN_V2_POK_BLK_LAEVATEINN={NAME='Laevateinn'},  UN_V2_POK_FREIKUGEL={NAME='Freikugel'},  UN_V2_POK_PARASHU={NAME='Parashu'},  UN_V2_S_TSUKUYOMI={NAME='Tsukuyomi'},  UN_V2_KURT={NAME='Kurt'},  UN_V2_SHIRMA={NAME='Shirma'},  UN_V2_TERESA={NAME='Teresa'},  UN_V2_FF15_COR={NAME='Cor'},  UN_V2_FF15_IRIS={NAME='Iris'},  UN_V2_FF15_REGIS={NAME='Regis'},  UN_V2_GUILDFORD={NAME='Guildford'},  UN_V2_AISHA={NAME='Aisha'},  UN_V2_KEVIN={NAME='Kevin'},  UN_V2_LOTIA={NAME='Lotia'},  UN_V2_BELTA={NAME='Belta'},  UN_V2_ZENN={NAME='Zenn'},  UN_V2_POK_BLK_TYRHUNG={NAME='Tyrhung'},  UN_V2_SQ_GUNNER={NAME='Gunner'},  UN_V2_SQ_PALADIN={NAME='Paladin'},  UN_V2_SQ_PRINCESS={NAME='Princess'},  UN_V2_SQ_SHENMEI={NAME='Shenmei'},  UN_V2_RH_RAINY={NAME='Rainy'},  UN_V2_RH_ATO={NAME='Ato'},  UN_V2_RH_ERUKA={NAME='Eruka'},  UN_V2_RH_STOCK={NAME='Stock'}, } --]]

--[[ function last(t) return t[table.maxn(t)] end

function capitalize(s) local a = s:sub(1,1):upper local b = s:sub(2):lower return a..b end

local found = {}

for i, entry in pairs(mw.loadData("Module:UpdateSchedule/Data")) do for j, subentry in ipairs( entry ) do    if type(subentry) == "string" then subentry = {subentry} end local type = subentry.type or entry.type local iname = subentry[1] if type == "unit" and mw.loadData("Module:Loc/en/LocalizedMasterParam/Unit")[iname] == nil then table.insert(found, " "..iname.."={NAME='"..capitalize(last(mw.text.split(iname,"_",true))).."'},\n") end end end

return table.concat(found) ]]