宋江是一个什么样的人| 急性胃炎吃什么药好| 张柏芝什么星座| 口吐白沫是什么原因| 员额制是什么意思| LOP是什么胎位| 吃过敏药有什么副作用| 睡醒后口干口苦是什么原因| 梦到前任预示着什么| 榴莲有什么功效| 同房子宫疼痛什么原因| it是什么行业| 羊头标志是什么车| 天衣无缝是什么意思| 子宫内膜2mm说明什么| 冷冻和冷藏有什么区别| 结节有什么症状| 劳热是什么意思| 大姨妈每个月提前来是什么原因| 痰栓是什么意思| 未来是什么意思| 喝什么水去火| 睡眠不好吃什么药| 吃什么可以提高免疫力| 倒拔垂杨柳是什么意思| 63年的兔是什么命| 万劫不复什么意思| 嘴唇发乌是什么原因| 尿酸高喝什么水最好| 孕妇喝咖啡有什么危害| 肚子中间疼是什么原因| 吃什么可以生精最快| 特诊科是什么意思| 2009年什么年| 表象是什么意思| 天降横财什么意思| 镜面是什么意思| 白内障的主要症状是什么| 喝茶叶茶有什么好处和坏处| 3月3日是什么节| 狼狈是什么动物| 躯体化是什么意思| 甲减挂什么科| 属相鸡与什么属相相合| 11.22什么星座| 什么叫前列腺炎| 为什么肝区隐隐作痛| 梦到自己快要死了是什么意思| 大林木命忌讳什么颜色| 腐竹是什么做的| wendy什么意思| 生物工程是什么专业| 化疗和靶向有什么区别| 逍遥丸适合什么人吃| 查乙肝挂什么科| 明目退翳是什么意思| 鼻子上火吃什么药| 石头记为什么叫红楼梦| 胃黏膜病变是什么意思| 宫颈机能不全是什么意思| 什么动物有四个胃| 哺乳期可以吃什么水果| 天外飞仙是什么意思| 为什么手指会发麻| 脾胃湿热吃什么中成药| 4.23是什么星座| ushi是什么品牌男装| 蚊子咬了为什么会痒| 芫荽是什么| 3月6号是什么星座| 巳时是什么时间| 吃什么对脑血管好| 小t是什么意思| 12.6是什么星座| 吃了布洛芬不能吃什么| 燕窝适合什么人吃| edm是什么意思| 膳食是什么意思| 右脚踝肿是什么原因引起的| 美国的国球是什么| 什么食物含dha| 肉桂是什么茶| 孕妇尿酸高是什么原因| 坯子是什么意思| 女人梦见狗是什么预兆| 榴莲是什么味道| 孕妇建档需要检查什么| 梅西踢什么位置| 丹毒病是什么原因引起的| 梦到离婚是什么征兆| 甲氨蝶呤是什么药| my什么牌子| 萤火虫为什么会发光| 疱疹是什么病| 孩子大便出血什么原因| 吲达帕胺片是什么药| 吃什么药提高免疫力| 荨麻疹有什么忌口| 跑完步喝什么水最好| 为什么精液是流出来的| 物化是什么意思| 皮质醇低是什么原因| 冬菇有什么功效与作用| 为什么叫拉丁美洲| 虚岁31岁属什么生肖| 银屑病是什么病| 突然头晕眼花站不稳是什么原因| 抗0是什么意思| 三花聚顶是什么修为| 淋巴细胞高是什么意思| 犬吠是什么意思| 儿女情长英雄气短是什么意思| 观音坐莲是什么姿势| 双肺间质性改变是什么意思| 黄皮什么时候成熟| 感冒吃什么食物比较好| 壬字五行属什么| 五音是什么| 头晕出汗是什么原因| 女人排卵期有什么反应| 脖子短适合什么发型| bravo是什么意思| amor是什么意思| 十一月六号是什么星座| 农历7月28日是什么星座| 青什么黄什么| 196是什么意思| 大姨妈发黑是什么原因| 湿气重吃什么调理| nafion溶液是什么| 妊娠纹是什么| saa是什么检查| 晒伤用什么药膏| 审美观是什么意思| 上火吃什么| 五彩斑斓是什么意思| 托人办事送什么礼物较好| 肚脐眼左右两边疼是什么原因| 怀孕送什么礼物| 脂膜炎是什么原因引起的| pdrn是什么| 白粉虱用什么药| 嗓子干痒吃什么药效果好| 白子是什么| 单核细胞偏低是什么意思| 正对什么| 226是什么意思| 脸颊两侧长痘痘什么原因| 争先恐后是什么生肖| 为什么会得红斑狼疮| 长期做梦是什么原因| 每天起床口苦口臭是什么原因| 什么空调| 有酒窝的女人代表什么| 神戳戳是什么意思| 什么人不能喝石斛| 芭比q是什么意思| 为什么会脑梗| 为什么丰胸霜一抹就变大| 为什么牙齿晚上痛白天不痛| 属兔的跟什么属相最配| 内科主要看什么病| 为什么会有流星雨| 被什么虫子咬了会刺痛| 叶公好龙的意思是什么| 南京大屠杀是什么时候| 孔雀鱼吃什么| 心脏是什么组织| 人为什么会做梦科学解释| 15天来一次月经是什么原因| 卓诗尼牌子是什么档次| 什么病不能吃玉米| 感染幽门螺杆菌吃什么药| 拉肚子出血是什么原因| 腿疼是什么原因| 多多益善的益是什么意思| 血压和血糖有什么关系| 胃寒喝什么茶暖胃养胃| 颈椎痛吃什么药最好| 胰腺炎吃什么消炎药| 1935年属什么| 移植后要注意什么| 苏打水配什么好喝| 6月29日是什么星座| 乳腺导管扩张是什么意思| 鱼扣是鱼的什么部位| 呃逆吃什么药| 为什么会梦到自己怀孕| 3月20日什么星座| 仓鼠可以吃什么水果| 什么叫熬夜| 献血之后吃什么比较好| 手淫导致的阳痿早泄吃什么药| 如来是什么意思| 什么睡姿有助于丰胸| 额额是什么意思| 颖五行属什么| 敢是什么意思| 俱往矣是什么意思| 看见蛇有什么预兆| 心痛吃什么药效果好| 食人鱼长什么样子| 内痔疮有什么症状| 黄芪长什么样子的图片| 阴平阳秘是什么意思| 位图是什么意思| 一月五日是什么星座| 12月是什么星座的| 陪嫁一般陪些什么东西| 纷乐是什么药| 码放是什么意思| 拉肚子吃什么药最有效果| 扶摇是什么意思| 手心脚心出汗是什么原因| 耳朵疼痛是什么原因| 寂寞难耐是什么意思| 吃知柏地黄丸有什么副作用| 双肺纤维灶是什么意思| 大条是什么意思| 三月份生日是什么星座| 为什么吃辣的就拉肚子| 女生为什么喊你男神| 回族信仰什么教| 7月17号是什么星座| 肾脏不好吃什么食物好| 排卵什么意思| 乳腺囊实性结节是什么意思| 张五行属什么| 三叉神经挂什么科| 淋巴转移什么意思| 为什么长湿疹| 新生儿什么时候吃ad| 手脚脱皮是什么原因导致的| 减肥为什么不让吃茄子| 奥美拉唑与雷贝拉唑有什么区别| 为什么要坐月子| 什么无为| 骨密度检查是查什么| 肋间神经痛吃什么药| 淫秽是什么意思| 法器是什么意思| 孩子呼吸道感染吃什么药效果最好| 头发爱出油是什么原因| 六月二十三是什么日子| 早期流产是什么症状| 山东济南有什么好玩的地方| 特需门诊和专家门诊有什么区别| 甲状腺结节忌口什么| 百合什么时候种植| 驻唱是什么意思| 中医经方是什么意思| 鹌鹑蛋不能和什么一起吃| 花团锦簇是什么意思| h2o是什么意思| 数九寒天是什么意思| 什么是全脂牛奶| 胃不舒服吃什么水果好| 什么是干燥综合症| 什么声什么气| 膝盖内侧疼是什么原因| 农历六月初六是什么星座| ipad什么时候出新款| 促甲状腺激素偏高是什么意思| 阴道出血是什么原因| 百度Aller au contenu

春节档“四大金刚”比拼 谁问鼎冠军?

Cette page fait l’objet d’une mesure de semi-protection étendue.
Une page de Wikipédia, l'encyclopédie libre.
百度   年龄条件。

 Documentation[voir] [modifier] [historique] [purger]

Utilisation

Fonctions exportables (liste incomplète) :

  • vowelfirst(str) retourne true si le premier caractère de la cha?ne est une voyelle.
  • inparentheses(str, lang, space), si str est nil, retourne nil, sinon, retourne str entourée de parenthèses et précédée du caractère ou de la cha?ne précisée dans le paramètre space.
  • of(str, gender, number, determiner, raw) retourne "de " .. str ou d'une cha?ne similaire mais plus correcte grammaticalement. Paramètres :
  • str la cha?ne de départ
  • gender (m ou (f) pour adaptation grammaticale ("du", "de la"). Défaut : "n".
  • number (s ou p) pour les accords grammaticaux ("des"). Défaut : s.
  • determiner (true ou false) pour adaptation grammaticale ("du" -> "de l'") Défaut : false.
  • raw cha?ne non formatée pour savoir plus facilement si elle commence par une consonne ou une voyelle pour les élisions.
  • conj(args, conjtype) : concatène les arguments non nuls de la table args, en utilisant conjtype comme séparateur. Valeurs de conjtype :
  • "new line" : ajoute une ligne entre chaque arg, et met une majuscule au début de chaque argument.
  • "or" sépare l'avant-dernier et le dernier "or" par une " ou ", et les autres par une virgule.
  • "and" : sépare l'avant-dernier et le dernier "et" par une " ou ", et les autres par une virgule.
  • "comma" virgule entre chaque arg
  • autre cha?ne tous les termes séparés par le terme indiqué
  • default = "and"
  • texteLien(str)
  • ucfirst(str) retourne la cha?ne indiquée, en ajoutant une majuscule au premier caractère affiché
-- Ne fonctionne qu'en fran?ais. Si besoin est, on peut s'inspirer de [[wikidata:Module:Linguistic]] pour ajouter d'autres langues.

local p = {}
local lang = 'fr'
local langobj = mw.language.new(lang)

local vowels = 'aeiouy????????a????????āáà?ǎ????????????ê?????????ē?é?è?ě?????????????īíì?ǐ????????????????ō?ó?ò?ǒ????????????????????üǖǘǜǚ?ūúù?ǔ??????????????y????'

-- i18n
local wordor = ' ou '
local wordand = ' et '
local comma = ', '
local fullstop = '. '
local wordsep = ' '

local function isin(str, pattern)
	if str and pattern and mw.ustring.find(str, pattern, 1, true ) then
		return true
	end
end


local function processgender(str)
	if (str == 'f') or (str == 'fem') or (str == 'feminine') then 
		return 'feminine'
	elseif (str == 'n') or (str == 'neutral') then 
		return 'neutral'
	else
		return 'masculine'
	end
end

local function processnumber(str)
	if (str == 'p') or (str == 'plural') then
		return 'plural'
	else 
		return 'singular'
	end
end

function p.vowelfirst (str)
	if str and #str > 0 then return isin(vowels, mw.ustring.lower(mw.ustring.sub(str, 1, 1))) end
end

function p.inparentheses(str, lang, space)
	if (not str) or str == '' then
		return str
	end
	str = '(' .. str .. ')'
	if not space then
		space = ' '
	end
	return space .. str
end

function p.of(word, gender, number, determiner, raw) 
	if not word then
		word = ''
	end
	word = mw.text.trim( word )
	if not raw then  --texte non mis en forme pour gérer les élisions
		raw = p.texteLien(word) or word
	end
	gender = processgender(gender)
	number = processnumber(number)
	local vowel = p.vowelfirst(raw)
	local feminine = (gender== 'feminine')
	-- raw is the string without the Wikiformatting so that it correctly analyses the string that is [[:fr:Italie|Italie]] -> 'italie'
	-- any way to automate this ?

	
	if number == 'plural' then
		return 'des ' .. word
	elseif determiner and (determiner ~= '-') then-- de la, du // determiner ~= '-' veut dire renseigné comme vide
		if vowel then
			return 'de l’' .. word
		elseif feminine then
			return 'de la ' .. word
		else
			return 'du ' .. word
		end
	else
		if vowel then
			return 'd’' .. word
		else
			return 'de ' .. word
		end
	end
end

function p.noungroup(noun, adj)
	if not noun or noun == '' then 
		return nil -- not '' so that it is not counted as a string by mw.listToText
	end
	return noun .. wordsep(lang) .. adj -- lorsque c'est en fran?ais
end

function p.quickconj(args, conjtype)
	local separator, conjunction
	
	-- cas où separator ~= conj
	if type(conjtype) == 'function' then
		conjtype = conjtype()	
	end
	if (not conjtype) or conjtype == 'and' then
		separator, conjunction = comma, wordand
	elseif conjtype == 'or' then
		separator, conjunction = comma, wordor
	end
	if (separator and conjunction) then
		return  mw.text.listToText(args, separator, conjunction)
	end
	-- autres cas
	if conjtype == 'comma' then
		separator = comma
	elseif conjtype == 'new line' or conjtype == 'lowercase new line' then
		separator = '<br />'
		if conjtype == 'new line' then
			for i, j in pairs(args) do -- ajoute une majuscule
				args[i] = p.ucfirst(j)
			end
		end
	else
		separator = conjtype
	end
	return table.concat(args, separator)
end

function p.conj(args, conjtype)
	if (not args) then
		return nil
	end
	local keys = {}
	for k, _ in pairs(args) do
		keys[#keys + 1] = k
	end
	if #keys == 0 then
		return nil
	end
	table.sort(keys)
	local newargs = {}
	for i = 1, #keys do
		newargs[#newargs + 1] = args[keys[i]]
	end
	return p.quickconj(newargs, conjtype)
end
 
function p.conjfromWiki(frame)
	args = frame.args
	if not args or not args[1] then
		args = mw.getCurrentFrame():getParent().args
	end
	local conjtype = args.type
	newargs = {}  -- transform args metatable into a table so it can be concetenated
	for i, j in pairs(args) do
			if type(i) == 'number' then
				j = mw.text.trim(j)
				if j ~= '' then
					table.insert(newargs, j)
				end
			else 
				if i ~= 'type' and i ~= 'lang' then 
					return error('bad parameter in template:Conj:' .. i), '[[Category:Pages with incorrect template usage/Conj|A]]'
				end
			end
	end
	return p.conj(newargs, conjtype)
end

local function findcomplement(str, beginswith) -- retourne le nom principal et le complément du nom ou nil et nil si échec
	local particles = {" de la ", " de l'", " des ", " de l’", " de ", " d’", " d'", " du "," en "," à "," au "," aux "}
	if beginswith and (not mw.ustring.find(str, "^" .. beginswith)) then
		return nil
	end
	for i, pattern in pairs(particles) do
		local pos = mw.ustring.find(str, pattern)
		if pos then
			local main = mw.ustring.sub(str, 1, pos -1)
			local comp = mw.ustring.sub(str, pos + string.len(pattern))
			return main, comp
		end
	end
	return nil
end


function p.keepcomplement(str, beginswith) -- par exemple "gare de Lyon" -> "Lyon"
	local main, compl = findcomplement(str, beginswith)
	if compl then
		return compl
	end
	return str
end

function p.removecomplement(str, beginswith) -- par exemple "gare de Lyon" -> "gare"
	local main, compl = findcomplement(str, beginswith)
	if main then
		return main
	end
	return str
end

--[=[
	texteLien le lien intere initial '^[[lien|texte]]' de str et retourne : texte, lien
	Si le lien est '[[texte]]', retourne : texte, texte.
	Si str ne commence pas par un lien interwiki, retourne : nil
]=]
function p.texteLien( str )
	if type( str ) == 'string' then
		local lien, texte = str:match( '^%[%[ *([^%[%]|]*)|? *([^%[%]]*)%]%]' )
		if not lien then
			lien, texte = str:match( '^%b<>%[%[ *([^%[%]|]*)|? *([^%[%]]*)%]%]' )
		end
		if lien then
			local testlien = string.lower( lien )
			local fichier = string.match( testlien, '^fichier:' ) 
				or  string.match( testlien, '^image:' )
				or  string.match( testlien, '^file:' )
			if not fichier then
				texte = ( texte ~= '' and texte ) or lien
				return texte, lien
			end
		end
	end
	return nil
end

function p.ucfirst(str)
	if (type (str ) ~= 'string') or (string == "") then
		return str
	end
	local strTemp, tag, tagTemp = str, ''
		-- sépare les balises html initiales (span ou autres)
	while strTemp:match( '^%b<>' ) do
		tagTemp, strTemp = strTemp:match( '^(%b<>)(.*)$' )
		tag = tag .. tagTemp
	end
	local texte = p.texteLien( strTemp )
	if texte then
		-- ajoute les crochets de fin de lien pour être sur de ne remplacer que le texte du lien
		texte = texte .. ']]'
		-- échappe les caractère magique
		local pattern = texte:gsub( '([$%%()*+%-.?()^])', '%%%1' )
		-- ajoute la majuscule au texte du lien
		str = str:gsub( pattern, p.ucfirst( texte ), 1 )
	else
		str = tag .. langobj:ucfirst( strTemp )
	end
	return str
end

function p.ucfirstE(frame)
	return p.ucfirst(frame.args[1])
end

function p.lcfirst(str)
	if (type (str ) ~= 'string') or (string == "") then
		return str
	end
	local strTemp, tag, tagTemp = str, ''
		-- sépare les balises html initiales (span ou autres)
	while strTemp:match( '^%b<>' ) do
		tagTemp, strTemp = strTemp:match( '^(%b<>)(.*)$' )
		tag = tag .. tagTemp
	end
	local texte = p.texteLien( strTemp )
	if texte then
		-- ajoute les crochets de fin de lien pour être sur de ne remplacer que le texte du lien
		texte = texte .. ']]'
		-- échappe les caractère magique
		local pattern = texte:gsub( '([$%%()*+%-.?()^])', '%%%1' )
		-- ajoute la majuscule au texte du lien
		str = str:gsub( pattern, p.lcfirst( texte ), 1 )
	else
		str = tag .. langobj:lcfirst( strTemp )
	end
	return str
end

function p.lcfirstE(frame)
	return p.lcfirst(frame.args[1])
end

--[[
function p.toascii(str)
	local convtable = mw.loadData("Module:Linguistique/ASCII")
	for i, j in pairs(convtable) do -- manquent les majuscules
		str = mw.ustring.gsub(str, '[' .. i .. ']', j)
	end
	return str
end
]]-- 
return p
沃尔玛是干什么的 眩晕症是什么引起的 狗是什么时辰 超七水晶是什么 四川九寨沟什么时候去最好
doro什么意思 飞的第一笔是什么 戒断反应是什么意思 吃芒果后不能吃什么 胜肽的主要功能是什么
收留是什么意思 什么的朝霞 孔雀鱼吃什么 脑血栓是什么意思 黄皮果什么时候成熟
石骨症是什么病 十二生肖本领强是什么生肖 au是什么货币 什么是十字花科蔬菜 血糖高能吃什么肉
你最想做什么hcv7jop6ns0r.cn 什么鱼有毒hcv9jop5ns6r.cn 腔调是什么意思hcv9jop2ns8r.cn 牙龈萎缩是什么样子hcv7jop6ns9r.cn 什么是双性人tiangongnft.com
高硼硅玻璃是什么材质hcv8jop7ns3r.cn 手上十个簸箕代表什么hcv7jop9ns3r.cn 性功能减退吃什么药好hcv9jop4ns5r.cn sherpa是什么面料bfb118.com 小腿胀痛是什么原因hcv9jop1ns6r.cn
梨涡是什么意思hcv8jop8ns0r.cn 喝雄黄酒是什么节日hcv7jop9ns5r.cn 脱发缺什么维生素hcv8jop1ns2r.cn 记忆力不好是什么原因hcv9jop5ns0r.cn 什么叫蜘蛛痣hcv9jop2ns6r.cn
月经期不能吃什么水果hcv9jop4ns2r.cn 臊子面的臊子是什么hcv8jop6ns8r.cn ft什么意思hcv8jop8ns2r.cn 酸菜鱼是用什么鱼hcv7jop7ns1r.cn 乳牙是什么hcv7jop7ns2r.cn
百度