Module:Occupation

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Lua
CodeDiscussionEditHistory DocumentationSubpagesLinksTestsResultsSandbox All modules

Translation for occupation, based on translation submodules.

Use[edit]

- function p.occupation(frame)

  • param 1: profession (should be present in either Module:Occcuation/en or Module:Occupation/redirects
  • param 2: gender ("m" or "f"
  • param lang: code of language in which the translation should be displayed, by default it is {{int:lang}}<nowiki> ({{int:lang}}). If there is no translation module exists for the language requested, it will look for the most relevant language using the standard "fallback" list. *<nowiki>{{#invoke:Occupation|occupation|painter}} -> painter
  • {{#invoke:Occupation|occupation|king}} -> king
  • {{#invoke:Occupation|occupation|queen}} -> king
  • {{#invoke:Occupation|occupation|painter|f}} -> painter
  • {{#invoke:Occupation|occupation|king|f}} -> queen
  • {{#invoke:Occupation|occupation|queen|f}} -> queen
  • {{#invoke:Occupation|occupation|painter|f|lang=cs}} -> malířka
  • {{#invoke:Occupation|occupation|king|f|lang=cs}} -> king
  • {{#invoke:Occupation|occupation|queen|f|lang=cs}} -> queen

Supported terms[edit]

Words in red are supported in the English version of the module but not in the translated version, you can add them.

key male female Wikidata
abbot abbot abbess Q103163
academic academic academic Q414528
acrobat acrobat acrobat Q11957145
activist activist activist Q15253558
actor actor actress Q33999
administrator administrator administrator
admiral admiral admiral
adventurer adventurer adventurer Q2873500
africanist africanist africanist Q15936497
agronomist agronomist agronomist Q1781198
alchemist alchemist alchemist Q15954519
alpine skier alpine skier alpine skier Q4144610
amateur photographer amateur photographer amateur photographer
ambassador ambassador ambassador Q4144610
american football player american football player american football player Q14128148
anatomist anatomist anatomist Q10872101
animal breeder animal breeder animal breeder Q1368409
animal painter animal painter animal painter Q16875701
animal trainer animal trainer animal trainer Q8011071
animator animator animator Q266569
anthropologist anthropologist anthropologist
antiquarian antiquarian antiquarian
anti-revolutionary anti-revolutionary anti-revolutionary
aquarellist aquarellist aquarellist Q17505902
aquarist aquarist aquarist
archaeologist archaeologist archaeologist Q3621491
archbishop archbishop archbishop
archer archer archer Q13382355
architect architect architect Q42973
architectural painter architectural painter architectural painter
architectural photographer architectural photographer architectural photographer Q17505911
archivist archivist archivist Q635734
aristocrat aristocrat aristocrat
armourer armourer armourer
art collector art collector art collector Q10732476
art critic art critic art critic Q4164507
art dealer art dealer art dealer Q173950
art director art director art director Q706364
art historian art historian art historian Q1792450
artist artist artist Q483501
art teacher art teacher art teacher
astrologer astrologer astrologer Q155647
astronaut astronaut astronaut Q11631
astronomer astronomer astronomer Q11063
astrophysicist astrophysicist astrophysicist
athlete athlete athlete Q11513337
australian rules footballer australian rules footballer australian rules footballer
author author author Q482980
automobile racer automobile racer automobile racer
aviator aviator aviator
backgammon player backgammon player backgammon player
badminton player badminton player badminton player
ballet dancer ballet dancer ballet dancer
balloonist balloonist balloonist
bandy player bandy player bandy player
banker banker banker
barrister barrister barrister
baseball player baseball player baseball player
basketball player basketball player basketball player
beach volleyball player beach volleyball player beach volleyball player
beekeeper beekeeper beekeeper
benthologist benthologist benthologist
biathlete biathlete biathlete
bibliographer bibliographer bibliographer
billiards player billiards player billiards player
biochemist biochemist biochemist
biogeochemist biogeochemist biogeochemist
biographer biographer biographer
biologist biologist biologist
bishop bishop bishop
black-figure vase painter black-figure vase painter black-figure vase painter
black-figure vase painters black-figure vase painters black-figure vase painters
blacksmith blacksmith blacksmith
bladesmith bladesmith bladesmith
blogger blogger blogger
bobsledder bobsledder bobsledder
bodybuilder bodybuilder bodybuilder
bookbinder bookbinder bookbinder
bookseller bookseller bookseller
botanist botanist botanist
bowler bowler bowler
boxer boxer boxer
brewer brewer brewer
bridge player bridge player bridge player
broadcaster broadcaster broadcaster
bronze caster bronze caster bronze caster
bronze founder bronze founder bronze founder
business man business man business woman
cabaret artist cabaret artist cabaret artist
cabinetmaker cabinetmaker cabinetmaker
calligrapher calligrapher calligrapher
camera operator camera operator camera operator
canadian football player canadian football player canadian football player
canoeist canoeist canoeist
canon canon canon
carcinologist carcinologist carcinologist
cardinal cardinal cardinal
caricaturist caricaturist caricaturist
carpenter carpenter carpenter
cartographer cartographer cartographer
cartoonist cartoonist cartoonist
caster caster caster
chaplain chaplain chaplain
chef chef chef
chemist chemist chemist
chess player chess player chess player
chocolatier chocolatier chocolatier
choreographer choreographer choreographer
chronicler chronicle writer=chronicler chronicle writer=chronicler
civil engineer civil engineer civil engineer
civil servant public servant=civil servant public servant=civil servant
classicist classicist classicist
cleric cleric cleric
clerk clerk clerk
climber climber climber
clockmaker clockmaker clockmaker
clothing designer clothing designer clothing designer
coach coach coach
cobbler cobbler cobbler
collage artist collage artist collage artist
colorist colorist colorist
comic book creator comic book creator comic book creator
comic book writer comic book writer comic book writer
composer composer composer
computer artist computer artist computer artist
computer scientist computer scientist computer scientist
conductor conductor conductor
conservationist conservationist conservationist
copper engraver copper engraver copper engraver
coppersmith coppersmith coppersmith
copyist copyist copyist
cosmographer cosmographer cosmographer
cosmologist cosmologist cosmologist
costume designer costume designer costume designer
court painter court painter court painter
court photographer court photographer court photographer
craftsman craftsman craftsman
cricketer cricketer cricketer
crime fiction writer crime fiction writer crime fiction writer
criminal criminal criminal
criminologist criminologist criminologist
critic critic critic
cross country skier cross country skier cross country skier
cryptographer cryptographer cryptographer
curator curator curator
curler curler curler
cyberneticist cyberneticist cyberneticist
cyclist cyclist cyclist
dancer dancer dancer
darts player darts player darts player
decorator decorator decorator
delftware painter delftware painter delftware painter
demographer demographer demographer
dentist dentist dentist
designer designer designer
diarist diarist diarist
diplomat diplomat diplomat
draughtsman draughtsman draughtsperson
dressage rider dressage rider dressage rider
duke duke duchess
earth scientist earth scientist earth scientist
ecologist ecologist ecologist
economist economist economist
editor editor editor
educator educator educator
egyptologist egyptologist egyptologist
emperor emperor emperor
enamelist enamelist enamelist
enamel painter enamel painter enamel painter
encyclopedist encyclopedist encyclopedist
engineer engineer engineer
engraver engraver engraver
entertainer entertainer entertainer
entomologist entomologist entomologist
entrepreneur entrepreneur entrepreneur
environmentalist environmentalist environmentalist
épée fencer épée fencer épée fencer
epigraphist epigraphist epigraphist
esperantist esperantist esperantist
essayist essayist essayist
etcher etcher etcher
ethnographer ethnographer ethnographer
ethnologist ethnologist ethnologist
ethologist ethologist ethologist
evolutionary biologist evolutionary biologist evolutionary biologist
experimental physicist experimental physicist experimental physicist
explorer explorer explorer
fantasy writer fantasy writer fantasy writer
farmer farmer farmer
fashion designer fashion designer fashion designer
feminist feminist feminist
fencer fencer fencer
field hockey player field hockey player field hockey player
film director film director film director
filmmaker filmmaker filmmaker
film producer film producer film producer
financier financier financier
first lady First Lady First Lady
floorball player floorball player floorball player
folklorist folklorist folklorist
forestry scientist forestry scientist forestry scientist
forger forger forger
formula one racer Formula 1 racer Formula 1 racer
founder founder founder
freestyle skier freestyle skier freestyle skier
fresco painter fresco painter fresco painter
friar friar friar
furniture designer furniture designer furniture designer
furniture maker furniture maker furniture maker
gallery owner gallery owner gallery owner
garden designer garden designer garden designer
gem engraver gem engraver gem engraver
genealogist genealogist genealogist
general general general
geneticist geneticist geneticist
genre painter genre painter genre painter
geodesist geodesist geodesist
geographer geographer geographer
geologist geologist geologist
geophysicist geophysicist geophysicist
gilder gilder gilder
girdler girdler girdler
glaciologist glaciologist glaciologist
glass artist glass artist glass artist
glass engraver glass engraver glass engraver
glassmaker glassmaker glassmaker
goldsmith goldsmith goldsmith
golfer golfer golfer
government official government official government official
grammarian grammarian grammarian
graphic artist graphic artist graphic artist
graphic designer graphic designer graphic designer
guitarist guitarist guitarist
gunsmith gunsmith gunsmith
gymnast gymnast gymnast
hagiographer hagiographer hagiographer
handball player handball player handball player
heraldist heraldist heraldist
herpetologis herpetologist herpetologist
historian historian historian
historian of science historian of science historian of science
historical writer historical writer historical writer
historiographer historiographer historiographer
history painter history painter history painter
horror writer horror writer horror writer
horticulturist horticulturist horticulturist
humanist humanist humanist
humorist humorist humorist
hunter hunter hunter
hydrogeologist hydrogeologist hydrogeologist
hydrographer hydrographer hydrographer
hydrologist hydrologist hydrologist
hygienist hygienist hygienist
ice hockey player ice hockey player ice hockey player
ice skater ice skater ice skater
iconographer iconographer iconographer
illuminator illuminator illuminator
illusionist illusionist illusionist
illustrator illustrator illustrator
impersonator impersonator impersonator
impresario impresario impresario
indologist indologist indologist
industrialist industrialist industrialist
inline speed skater inline speed skater inline speed skater
innkeeper innkeeper innkeeper
installation artist installation artist installation artist
interior designer interior designer interior designer
introducer of the ambassadors introducer of the ambassadors introducer of the ambassadors
inventor inventor inventor
iranologist iranologist iranologist
ivory carver ivory carver ivory carver
japanologist japanologist japanologist
jesuit jesuit jesuit
jeweller jeweller jeweller
jewellery designer jewellery designer jewellery designer
jockey jockey jockey
journalist jounalist jounalist
judge judge judge
judoka judoka judoka
jurist jurist jurist
kapellmeister kapellmeister kapellmeister
kayaker kayaker kayaker
kickboxer kickboxer kickboxer
king king queen
king of Persia king of Persia king of Persia
lacquerware artist lacquerware artist lacquerware artist
lacrosse player lacrosse player lacrosse player
landholder landholder landholder
landscape architect landscape architect landscape architect
landscape designer landscape designer landscape designer
landscape painter landscape painter landscape painter
lawyer lawyer lawyer
legislator legislator legislator
lexicographer lexicographer lexicographer
librarian librarian librarian
librettist librettist librettist
limnologist limnologist limnologist
linguist linguist linguist
literary critic literary critic literary critic
literary historian literary historian literary historian
lithographer lithographer lithographer
liturgist liturgist liturgist
local historian local historian local historian
logician logician logician
luger luger luger
lyricist lyricist lyricist
manufacture manufacture manufacture
manufacturer manufacturer manufacturer
manuscript illuminator manuscript illuminator` manuscript illuminator`
mapmaker mapmaker mapmaker
marine biologist marine biologist marine biologist
marine painter marine painter marine painter
maritime painter maritime painter maritime painter
martial artist martial artist martial artist
master builder master builder master builder
mathematician mathematician mathematician
mechanical engineer mechanical engineer mechanical engineer
medal engraver medal engraver medal engraver
medical doctor medical doctor medical doctor
medievalist medievalist medievalist
memoirist memoirist memoirist
merchant merchant merchant
metal worker metal worker metal worker
meteorologist meteorologist meteorologist
mezzotint engraver mezzotint angraver mezzotint angraver
microscopist microscopist microscopist
military engineer military engineer military engineer
military painter military painter military painter
military writer military writer military writer
mineral collector mineral collector mineral collector
mineral dealer mineral dealer mineral dealer
mineralogist mineralogist mineralogist
miniaturist miniaturist miniaturist
minister minister minister
missionary missionary missionary
model model model
model maker model maker model maker
molecular biologist molecular biologist molecular biologist
monk monk monk
monument conservator monument conservator monument conservator
mosaicist mosaic artist mosaic artist
motorcycle racer motorcycle racer motorcycle racer
mountaineer mountaineer mountaineer
muralist muralist muralist
museum conservator museum conservator museum conservator
museum director museum director museum director
music critic music critic music critic
musician musician musician
musicologist musicologist musicologist
music theorist music theorist music theorist
mycologist mycologist mycologist
mystic mystic mystic
natural scientist natural scientist natural scientist
naval architect naval architect naval architect
naval officer naval officer naval officer
netball player netball player netball player
neurologist neurologist neurologist
neuroscientist neuroscientist neuroscientist
nobel laureate nobel laureate nobel laureate
nobleman nobleman noblewoman
nordic combined skier nordic combined skier nordic combined skier
north-american softball player north-American softball player north-American softball player
novelist novelist novelist
numismatist numismatist numismatist
nurse nurse nurse
obstetrician obstetrician obstetrician
oceanographer oceanographer oceanographer
officer officer officer
officer of arms officer of arms officer of arms
olympic champion olympic champion olympic champion
opera singer opera singer opera singer
orator orator orator
organist organist organist
orientalist orientalist orientalist
orienteer orienteer orienteer
ornamental painter ornamental painter ornamental painter
ornithologist ornithologist ornithologist
osteopath osteopath osteopath
pacifist pacifist pacifist
painter painter painter Q1028181
palaeographist palaeographist palaeographist
paleontologist paleontologist paleontologist
panorama painter panorama painter panorama painter
paper manufacturer paper manufacturer paper manufacturer
pastellist pastellist pastellist
pastor pastor pastor
pastoralist pastoralist pastoralist
pathologist pathologist pathologist
patron patron patron
peace activist Peace activist Peace activist
pedagogue pedagogue pedagogue
performing artist performing artist performing artist
pharmacist pharmacist pharmacist
pharmaconomist pharmaconomist pharmaconomist
philanthropist philanthropist philanthropist
philatelist philatelist philatelist
philologist philologist philologist
philosopher philosopher philosopher
photographer photographer photographer
physician physician physician
physicist physicist physicist
pianist pianist pianist
pioneer pioneer pioneer
pirate pirate pirate
planetary scientist planetary scientist planetary scientist
plasterer stuccoist stuccoist
plastic artist plastic artist plastic artist
playwright playwright playwright
poet poet poet
poker player poker player poker player
police officer police officer police officer
political cartoonist political cartoonist political cartoonist
politician politician politician
polo player polo player polo player
polymath polymath polymath
pope pope pope
porcelain artist porcelain artist porcelain artist
porcelain manufacture porcelain manufacture porcelain manufacture
porcelain painter porcelain painter porcelain painter
portrait painter portrait painter portrait painter
portrait photographer portrait photographer portrait photographer
poster artist poster artist poster artist
potter potter potter
prehistorian prehistorian prehistorian
priest priest priest
prince prince princess
printer printer printer
printmaker printmaker printmaker
professor professor professor
prostitute prostitute prostitute
psychiatrist psychiatrist psychiatrist
psychologist psychologist psychologist
publicist publicist publicist
publisher publisher publisher
puppeteer puppeteer puppeteer
racer racer racer
radio broadcaster radio broadcaster radio broadcaster
radio presenter radio presenter radio presenter
railway engineer railway engineer railway engineer
rebel rebel rebel
record producer record producer record producer
red-figure vase painter red-figure vase painter red-figure vase painter
red-figure vase painters red-figure vase painters red-figure vase painters
researcher researcher researcher
restorer restorer restorer
revolutionary revolutionary revolutionary
roller hockey player roller hockey player roller hockey player
roller skater roller skater roller skater
roman emperor Roman emperor Roman emperor
rower rower rower
rugby league player rugby league player rugby league player
rugby union player rugby union player rugby union player
runologist runologist runologist
sailor sailor sailor
saint saint saint
samurai samurai samurai
satirist satirist satirist
scenographer scenographer scenographer
scholar scholar scholar
science fiction writer science fiction writer science fiction writer
science writer science writer science writer
scientist scientist scientist
screenwriter screenwriter screenwriter
scribe scribe scribe
sculptor sculptor sculptor
seaman seaman seaman
secretary secretary secretary
seismologist seismologist seismologist
sexologist sexologist sexologist
sgrafitto artist sgraffito artist sgraffito artist
ship captain ship captain ship captain
show jumper show jumper show jumper
silhouette artist silhouette artist silhouette artist
silversmith silversmith silversmith
singer singer singer
sinologist sinologist sinologist
skateboarder skateboarder skateboarder
skier skier skier
ski jumper ski jumper ski jumper
snowboarder snowboarder snowboarder
soccer player soccer player soccer player
social scientist social scientist social scientist
sociologist sociologist sociologist
soldier soldier soldier
solicitor solicitor solicitor
songwriter songwriter songwriter
speed skater speed skater speed skater
speleologist speleologist speleologist
spiritualist spiritualist spiritualist
sports dancer sports dancer sports dancer
sportsperson sportsperson sportsperson
sports shooter sports shooter sports shooter
spy spy spy
squash player squash player squash player
stage designer stage designer stage designer
stained-glass artist stained-glass artist stained-glass artist
stamp designer stamp designer stamp designer
statesman statesman statesman
statistician statistician statistician
steel engraver steel engraver steel engraver
stenographer stenographer stenographer
still life painter still life painter still life painter
stockbroker stockbroker stockbroker
stonemason stonemason stonemason
storyteller storyteller storyteller
strategist strategist strategist
strongman strongman strongman
stuccoist stuccoist stuccoist
sumo fighter sumo fighter sumo fighter
supermodel supermodel supermodel
surgeon surgeon surgeon
surveyor surveyor surveyor
swimmer swimmer swimmer
swordsmith swordsmith swordsmith
table tennis player table tennis player table tennis player
tapestry designer tapestry designer tapestry designer
tapestry weaver tapestry weaver tapestry weaver
tattoo artist tattoo artist tattoo artist
taxidermist taxidermist taxidermist
taxonomist taxonomist taxonomist
teacher teacher teacher
telegraphist telegraphist telegraphist
telemark skier telemark skier telemark skier
television presenter television presenter television presenter
tennis player tennis player tennis player
textile artist textile artist textile artist
theater critic theater critic theater critic
theatrical director theatrical director theatrical director
theatrical producer theatrical producer theatrical producer
theologian theologian theologian
topographer topographer topographer
torero torero torero
town planner town planner town planner
translator translator translator
traveller traveller traveller
triathlete triathlete triathlete
typeface designer typeface designer typeface designer
typesetter typesetter typesetter
typographer typographer typographer
ukiyo-e artist ukiyo-e artist ukiyo-e artist
unionist unionist unionist
upholsterer upholsterer upholsterer
urban planner urban planner urban planner
vase painter vase painter vase painter
vase painters vase painters vase painters
vaudeville artist vaudeville artist vaudeville artist
veterinarian veterinarian veterinarian
video artist video artist video artist
video game artist video game artist video game artist
video game designer video game designer video game designer
video game programmer video game programmer video game programmer
violinist violinist violinist
visual artist visual artist visual artist
vocalist vocalist vocalist
voice actor voice actor voice actor
volapükist Volapükist Volapükist
volleyball player volleyball player volleyball player
watchmaker watchmaker watchmaker
water polo player water polo player water polo player
weightlifter weightlifter weightlifter
wikipedian Wikipedia Wikipedia
windsurfer windsurfer windsurfer
wine merchant wine merchant wine merchant
wood carver wood carver wood carver
woodcutter woodcutter woodcutter
wood engraver wood engraver wood engraver
wood sculptor wood sculptor wood sculptor
wrestler wrestler wrestler
writer writer writer Q36180
yacht designer yacht designer yacht designer
zoologist zoologist zoologist Q35979

Words in the translated module, missing in the English version[edit]

Pages found in local language modules but not in Module:Occupation/en:
Module:Occupation/ca: (none)
Module:Occupation/cs: (none)
Module:Occupation/da: (none)
Module:Occupation/de: , rear admiral
Module:Occupation/el: (none)
Module:Occupation/en: (none)
Module:Occupation/eo: (none)
Module:Occupation/es: (none)
Module:Occupation/et: (none)
Module:Occupation/eu: (none)
Module:Occupation/fa: (none)
Module:Occupation/fi: (none)
Module:Occupation/fr: , marquetry-maker, mammalogist, ceramic artist, erudite, arachnologist, marble worker, geometer, steel engraveur
Module:Occupation/he: (none)
Module:Occupation/hu: (none)
Module:Occupation/it: , wikiquotian, wikimedian, cameraman, ceramist, ceramic artist, wikisourcian, equitation master, porcelain designer, wikidatian, ceramic designer
Module:Occupation/ja: , stamp desginer
Module:Occupation/ko: (none)
Module:Occupation/mk: , ceramist, porcelain designer, ceramic designer
Module:Occupation/ml: (none)
Module:Occupation/nds: (none)
Module:Occupation/nl: , graphist, graffiti artist, stained-glass designer, ceramist
Module:Occupation/no: , roller skier
Module:Occupation/pl: (none)
Module:Occupation/pt: (none)
Module:Occupation/ro: , foil fencer, sabre fencer
Module:Occupation/ru: (none)
Module:Occupation/sv: (none)
Module:Occupation/sw: (none)
Module:Occupation/uk: (none)
Module:Occupation/vi: (none)
Module:Occupation/yo: (none)
Module:Occupation/zh-hans: , taoist
Module:Occupation/zh-hant: , taoist

Broken redirects[edit]

0 broken redirects from Module:Occupation/redirects to Module:Occupation/en.

Keys used in Module:Occupation/redirects and Module:Occupation/en at the same time[edit]

keys appearing both in Module:Occupation/redirects and Module:Occupation/en:armourer

Code

local p = {}
local fallback = require('Module:Fallback')
local languages = {'ca', 'cs', 'da', 'de', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fr', 'he', 'hu', 'it', 'ja', 'ko', 'mk', 'ml', 'nds', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sv', 'sw', 'uk', 'vi', 'yo', 'zh-hans', 'zh-hant'}
 
local function badoccupation(occupation) -- error handling when the occupation is not a key in the translation table
	-- check if it exists in English, if not add a maintenance category, else, maintenance category is useless
	local en = require('Module:Occupation/en')[occupation]
	local maintenancestring = ''
	if (not en) and (occupation ~= '') then
		maintenancestring = '[[Category:Pages with incorrect template usage/Occupation|' .. occupation .. ']]'
	end
	return tostring(mw.html.create('span'):css({['color'] = 'red'}):wikitext(occupation):done()) .. maintenancestring
end
 
local function findlang(lang) -- return the most approriate translation page
	if not lang then return
		error('no language provided in Module:Occupation')
	end
	return fallback.fallbackpage('Module:Occupation', lang)
end
 
local function findsex(gender)
	if gender == 'f' or gender == 'female' or gender == 'woman' then
		return 'f'
	end
	return 'm'
end
 
local function findword(val, gender) -- retrieves the correct translation for a given gender, once the table value is given
	if type(val) == 'string' then
		return val
	elseif type(val) == 'table' then
		local gender = findsex(gender)
		if gender == 'f' then -- second value if exists, else first value 
			return val[2] or val[1] 
		else
			return val[1]
		end
	end
	return error('bad data structure in Module:Occupation')
end
 
function p._occupation(occupation, lang, gender) -- main function to return the translation of a particular occupation
	local localmodule = require(findlang(lang))
	local val = localmodule[occupation] or localmodule[require('Module:Occupation/redirects')[occupation]]
	if not val then
		return badoccupation(occupation)
	end
	return findword(val, gender)
end
 
function p.occupation(frame)
	return p._occupation(frame.args[1], frame.args.lang or frame:preprocess('{{int:lang}}'), frame.args[2])
end
 
---------------------------------------------------------------------------
--[[ 
Maintenance functions
]]--
 
 
function p.list(frame)
	local enmodule = require('Module:Occupation/en')
	local sortedenglish = {} -- so that values are sorted alphabetically
	for i in pairs(enmodule) do
		table.insert(sortedenglish, i)
	end
	table.sort(sortedenglish)
 
	local lang = frame.args.lang or frame:preprocess('{{int:lang}}')
	local localmodulename = findlang(lang)
	local localmodule = require(localmodulename)
 
	local header = ''
	local wikidata = require('Module:Occupation/Wikidata')
	if localmodulename ~= 'Module:Occupation/en' then 
		header = require('Module:Fallback')._langSwitch({
		en = 'Values in red are those that do not have any translation in ([[' .. localmodulename .. ']]). ',
		fr = 'Les valeurs en rouge correspondent à des manques dans ([[' .. localmodulename .. ']]). ',
		}, lang)
	end
	local obj = mw.html.create('table')
		:tag('tr')
			:tag('td')
				:wikitext('<b>key</b>')
				:done()
			:tag('td')
				:wikitext('<b>male</b>')
				:done()
			:tag('td')
				:wikitext('<b>female</b>')
				:done()
			:tag('td')
				:wikitext('<b>Wikidata</b>')
				:done()
			:done()
	for i, j in pairs(sortedenglish) do
		local datalink = ''
		if wikidata[j] and wikidata[j] ~= '' then
			datalink = '[[:d:' .. wikidata[j] .. '|' .. wikidata[j] .. ']]'	
		end
		local line = mw.html.create('tr')
			:tag('td')
				:wikitext(j)
				:done()
			:tag('td')
				:wikitext(p._occupation(j, lang, 'm'))
				:done()
			:tag('td')
				:wikitext(p._occupation(j, lang, 'f'))
				:done()
			:tag('td')
				:wikitext(datalink)
				:done()
			:done()
		obj:node(line)
	end
	return header .. tostring(obj)
end
 
function p.brokenredirects(frame)
	local redirectpage = require('Module:Occupation/redirects')
	local text = 'broken redirects: '
	local list = {}
	for i, j in pairs(redirectpage) do
		if not require('Module:Occupation/en')[j] then
			table.insert(list, j)
		end
	end
	local strlist = ''
	if #list > 0 then 
		strlist = ': ' .. mw.text.listToText(list)
	end
	return tostring(#list) .. ' broken redirects from [[Module:Occupation/redirects]] to [[Module:Occupation/en]]' .. strlist .. '.'
end
 
function p.notinenglish(frame)
	local lang = frame.args.lang or frame:preprocess('{{int:lang}}')
	local localmodulename = findlang(lang)
	local langmodule = require(localmodulename)
	local engmodule = require('Module:Occupation/en')
 
	local text = require('Module:Fallback')._langSwitch({
		en = 'Pages found in local language modules but not in [[Module:Occupation/en]]: ',
		fr = 'Pages trouvées dans des modules en langue local, mais pas dans [[Module:Occupation/en]]: ',
		}, lang) .. '<br />'
 
	for i, j in pairs(languages) do
		local currentmodule = require('Module:Occupation/' .. j)
		local header = '[[' .. 'Module:Occupation/' .. j .. ']]: '
		local list = ''
		for k, l in pairs(currentmodule) do
			if not engmodule[k] then
				list = list .. ', ' .. k
			end
		end
		if list == '' then 
			text = text .. header .. '(none)' .. '<br />'
		else
			text = text .. header .. list .. '<br />'
		end
	end
	return text
end
 
function p.duplicatedredirects(frame)
	local redirects = require('Module:Occupation/redirects')
	local english = require('Module:Occupation/en')
	local header = 'keys appearing both in [[Module:Occupation/redirects]] and [[Module:Occupation/en]]:'
	local list = ''
	for i in pairs(redirects) do
		if english[i] then 
			list = list .. i
		end
	end
	return header .. list
end
return p