« Module:Biblio/Ouvrage » : différence entre les versions

Contenu supprimé Contenu ajouté
Ajout de bibcode ; math reviews et arxiv affichés même s'ils sont "seuls"
Lange rtl (arabe, hébreux...) : amélioration de l'affichage des «  », Catégorisation des pages avec ces langues. Suppression de la catégorisation de nom et nolien.
Ligne 63 :
-- indication de langue
local indicLangue, codeLangue, categLangue = Commun.indicationDeLangue ( args, validArg )
local dir
if Outils.notEmpty( indicLangue ) then
wiki.minsert( indicLangue, ' ' )
if numeroChapitrecodeLangue then
Langue = Langue or require( 'Module:Langue' )
local dir = Langue.directionLangue( codeLangue )
if dir == 'rtl' then dir = '" dir="rtl'
dir = '" dir="rtl'
else
else dir = nil
end
end
end
 
Ligne 85 ⟶ 95 :
if chapitre then
if args.titreChap then
wiki.minsert( '« <cite ' )
if codeLangue then
wiki.minsert( '<span lang="', codeLangue, dir, '" >' )
end
wiki.minsert( '« <cite style="font-style:normal">', args.titreChap )
if args['sous-titre chapitre'] then
wiki.minsert( ' : ', args['sous-titre chapitre'] )
end
wiki.minsert( '</cite> »' )
if codeLangue then
wiki.minsert( '« <cite /span>' )
end
elseif modeNormal then
wiki.minsert( Outils.erreur( ' [[Modèle:Chapitre|{{Chapitre}}]] : paramètre « <code>titre chapitre</code> » manquant' ) )
Ligne 110 ⟶ 122 :
if args.titre then
if codeLangue then
Langue = Langue or require( 'Module:Langue' )
local dir = Langue.directionLangue( codeLangue )
if dir == 'rtl' then dir = '" dir="rtl'
else dir = nil
end
wiki.minsert( '<cite class=italique lang="', codeLangue, dir, '">')
else
Ligne 225 ⟶ 231 :
local annee = validArg( 'année', 'date', 'year' )
if annee then
wiki.minsert( ',&lrm; ', Commun.inscriptionDate( args ) )
-- le &lrm est une marque de texte gauche à droite, utile si le texte qui précède est en droite à gauche (arabe, hébreux...)
end
local publi = validArg( 'réimpression', 'publi' )
Ligne 328 ⟶ 335 :
local titreChapitre = validArg( 'titre chapitre', 'chap', 'chapitre', 'chapter' )
if titreChapitre then
if numeroChapitre then
wiki.minsert(titreChapitre '= '(« ', .. titreChapitre, .. ' »)' )
else
wiki.minsert(titreChapitre ',= '« ', .. titreChapitre, .. ' »' )
end
if codeLangue then
Langue = Langue or require( 'Module:Langue' )
titreChapitre = Langue.lang{ codeLangue, titreChapitre }
end
wiki.minsert( ', ', titreChapitre )
if numeroChapitre then
wiki.minsert( ' (« ', titreChapitre, ' »)' )
else
wiki.minsert( ', « ', titreChapitre, ' »' )
end
end
local passage = validArg( 'passage', 'page' )
Ligne 371 ⟶ 379 :
categTitreOuvrage and '[[Catégorie:Page du modèle Chapitre comportant une erreur|Ouvrage]]'
)
if args.noliendir then
wiki.minsert( '[[Catégorie:PageRecension dutemporaire pour le modèle Ouvrage comportant une erreur|nolienrtl]]' )
end
if validArg('nom') and not validArg( 'lien auteur1', 'lien auteur' ) then
local prenom = validArg( 'prénom' )
local nom = prenom and ( prenom .. ' ' .. args.nom ) or args.nom
if nom ~= mw.title.getCurrentTitle().fullText and nom == mw.ustring.gsub( nom, '[#<>%[%]{}|]', '' ) then
local titleNom = mw.title.new( nom )
if titleNom and titleNom.exists then
wiki.minsert( '[[Catégorie:Recension temporaire pour le modèle Ouvrage|nom]]' )
end
end
end
end