Module:testing/fr
Μετάβαση στην πλοήγηση
Πήδηση στην αναζήτηση
Documentation for this module may be created at Module:testing/fr/τεκμηρίωση
--[=[
[[Module:testing]] - [[Module:testing/param]] -- [[Module:testing/functions]] -- [[Module:testing/data]]
Tests at [[Template:testing]] {{#invoke:testing|main}}
[[wikt:el:Sarri.greek]] 2023.
]=]--
-- this is a param test about quotations
--[=[
INSTRUCTIONS for param page: Call if from the Module by placing EXACTLY where it is needed:
require ('Module:xxx/zzz').zzz (args)
DO NOT change anything else. DO NOT add at top of page a m_zzz = require this and that.
The name of the page 'param' or zzz is also the name of the local function zzz (args), and at the end, return {zzz = zzz}
-- USE: local for the functions of THIS module
]=]--
--------------------------------------------------------------------------
-- COPY HERE parameters or functions needed from the Module
-- ...
--[=[--------------------------< I S _ S E T >------------ -- by [[w:en:User talk:Trappist the monk]]
Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.
]=]--
--[=[ The is_set() function may be added so that tests like this:
if args['ακε'] ~= '' and args['ακε'] ~= nil then args['ακε'] = args['ακε'] else args['ακε'] = '' end
can be reduced to:
if not is_set (args['ακε']) then args['ακε'] = '' end
]=]--
local function is_set (var)
return not (var == nil or var == '');
end
--------------------------------------------------------------------------
-- function --
--------------------------------------------------------------------------
local function fr (args)
--[=[ ----------------------------- see [[Module:testing/guide]] for more
NAMED parameters: iso-author-work-bookd-chapter-line/section - To number them: POSITIONS 1 2 3 4 5 6.
iso is always at position 1. There are 12 patterns. Data must be specified for each pattern, except default.
-- if only 5 params (omit book) then would have 6 patterns.
The patterns are created so that editor will not have to write empty parameters.
(e.g. grc|Αισχ|Πέρσ|||33, author work-line/section only, omitting book and chapter
* 3) noauthor 1 X 2 3 4 5 = iso-work-book-chapter-line/section
3a) and nobook 1 X 2 X 3 4 = iso-work-chapter-line/section
3b) and nochapter 1 X 2 3 X 4 = iso-work-book-line/section
3c) and nobook+nochapter 1 X 2 X X 3 = iso-work-line/section
* 2) onework authors 1 2 X 3 4 5 = iso-author-book-chapter-line/section
2a) and nobook 1 2 X X 3 4 = iso-author-chapter-line/section
2b) and nochapter 1 2 X 3 X 4 = iso-author-book-line/section
2c) and nobook+nochapter 1 2 X X X 3 = iso-author-line/section
* 1) default 1 2 3 4 5 6 = iso-author-work-book-chapter-line/section
1a) and nobook 1 2 3 X 4 5 = iso-author-work-chapter-line/section
1b) and nochapter 1 2 3 4 X 5 = iso-author-work-book-line/section
1c) and nobook+nochapter 1 2 3 X X 4 = iso-author-work-line/section
Otherwise, editor can use named parameters.
--------------------------------------------------------------------------------
* Abbreviations, Latin and Greek as in transligual abbreviations for classics (see out Library).
SOURCES may be
* s = wikisource = el.wikisource for ancient greek & other greek texts / fr.wikisource for French etc.
* bg = books.googe
* pers = perseus.tufts.edu
* scaife.perseus cannot be linked, it has problems with = and quotation marks in the addresses
* lg = greek-language.gr (for ancient greek grc, with translations in Greek)
* x = any other external source. Usually with only one page parameter filled by editor (args['page'])
---------------------------------------------------------
]=]--
-- THIS IS DECLARATION test 3 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- ================== numbering PATTERNS =======================
-- THIS IS IN MAIN PAGE mylang = args['iso'] or args['1'] or '' args['iso'] = args['iso'] or ''
-- For each pattern COPYPASTE the args at EVERY WORK
-- ======================= noauthor
-- 1 X 2 X X 3 = iso-work-line/section
if -- need to name the work
args['2'] == 'nameit' or args['2'] == 'nameit2'
-- or ...
then -- COPY the FOLLOWING under the work
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mybook = '' mychapter = ''
myline = args['line'] or args['3'] or '' args['line'] = args['line'] or ''
-- 1 X 2 3 X 4 = iso-work-book-line/section
elseif args['2'] == 'nameit'
-- or ...
-- pattern == 'threeb' -- this does not work
then -- COPY the FOLLOWING under the work
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mybook = args['book'] or args['3'] or '' args['book'] = args['book'] or ''
mychapter = ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 X 2 X 3 4 = iso-work-chapter-line/section
elseif args['2'] == 'nameit'
-- or ...
-- pattern == 'threeb' -- this does not work
then -- COPY the FOLLOWING under the work
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mybook = ''
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- 1 X 2 3 4 5 = iso-work-book-chapter-line/section
elseif args['2'] == 'nameit'
-- or ...
or pattern == 'three' -- this does not work
then -- COPY the FOLLOWING under the work
myauthor = ''
mywork = args['work'] or args['2'] or '' args['work'] = args['work'] or ''
mybook = args['book'] or args['3'] or '' args['book'] = args['book'] or ''
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- ======================= onework authors
-- 1 2 X X X 3 = iso-author-line/section
elseif pattern == 'twoc' and onework == '1'
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = '' mybook = '' mychapter = ''
myline = args['line'] or args['3'] or '' args['line'] = args['line'] or ''
-- 1 2 X 3 X 4 = iso-author-book-line/section
elseif pattern == 'twob' and onework == '1'
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = ''
mybook = args['book'] or args['3'] or '' args['book'] = args['book'] or ''
mychapter = ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 2 X X 3 4 = iso-author-chapter-line/section -- example: Thucydides
elseif pattern == 'twoa' and onework == '1'
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = ''
mybook = ''
mychapter = args['chapter'] or args['3'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 2 X 3 4 5 = iso-author-book-chapter-line/section
elseif pattern == 'two' and onework == '1'
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = ''
mybook = args['book'] or args['3'] or '' args['book'] = args['book'] or ''
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- =======================
-- 1 2 3 X X 4 = iso-author-work-line/section
elseif pattern == "onec"
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mybook = '' mychapter = ''
myline = args['line'] or args['4'] or '' args['line'] = args['line'] or ''
-- 1 2 3 4 X 5 = iso-author-work-book-line/section
elseif pattern == "oneb"
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mybook = args['book'] or args['4'] or '' args['book'] = args['book'] or ''
mychapter = ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- 1 2 3 X 4 5 = iso-author-work-chapter-line/section
elseif pattern == "onea"
then -- COPY the FOLLOWING under the author
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mybook = ''
mychapter = args['chapter'] or args['4'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['5'] or '' args['line'] = args['line'] or ''
-- 1 2 3 4 5 6 = iso-author-work-book-chapter-line/section
else
-- this is default, pattenr one
myauthor = args['author'] or args['2'] or '' args['author'] = args['author'] or ''
mywork = args['work'] or args['3'] or '' args['work'] = args['work'] or ''
mybook = args['book'] or args['4'] or '' args['book'] = args['book'] or ''
mychapter = args['chapter'] or args['5'] or '' args['chapter'] = args['chapter'] or ''
myline = args['line'] or args['6'] or '' args['line'] = args['line'] or ''
end -- close patterns
---------------------------------------------------------
--------------------------------------------------------------------------
-- French fr --
--------------------------------------------------------------------------
-- Rimbaut Ρεμπό https://fr.wikisource.org/wiki/Auteur:Arthur_Rimbaud
-- ΒΠ = Αρθούρος Ρεμπώ (Arthur Rimbaud, [aʁ.tyʁ ʁɛ̃.bo], πλήρες όνομα Ζαν-Νικολά-Αρτύρ Ρεμπώ, 20 Οκτωβρίου 1854 - 10 Νοεμβρίου 1891)
-- editor may place the name of poem with prework .τίτλος= BEFORE the title.
-- Or, as a 'chapter', after the title.
if myauthor == 'Rimbaud' or myauthor == 'Ρεμπώ' or myauthor == 'Ρεμπό' then
mylang = 'fr' lang = 'fr' subject = 'από τον Ρεμπό' biblink = ''
authorname = 'Αρτίρ Ρεμπό' wp_author = '{{w|Αρθούρος Ρεμπώ|Αρτίρ Ρεμπό (Arthur Rimbaud)}}'
author_time = ', 1854-1891'
-- check [[ivre]]
if mywork == 'Le bateau ivre' or mywork == 'bateau ivre' or mywork == 'Bateau ivre' or mywork == 'bateau' or mywork == 'Bateau' then
title = '<i>Le bateau ivre</i>' wp_title = '{{w|lang=fr|Le Bateau ivre|<i>Le bateau ivre</i>}}'
work_year = ' (1871), {{s|lang=fr|Œuvres (Rimbaud)/Poésies/Le bateau ivre|στη γαλλική Βικιθήκη}}'
s = 'Œuvres (Rimbaud)/Poésies/Le bateau ivre'
-- always show wiksource
-- check [[frou-frou]]
elseif mywork == 'Boheme' or mywork == 'Bohème' or mywork == 'Ma Bohème' or mywork == 'Ma boheme' or mywork == 'Ma Boheme' then
title = '<i>Ma Bohème (Fantaisie)</i>' w_monotonic = 'Ma Boheme'
s = 'Œuvres (Rimbaud)/Poésies/Ma Bohème'
-- always show wiksource
wp_title = '{{s|lang=fr|Œuvres (Rimbaud)/Poésies/Ma Bohème|' .. title .. ' στη γαλλική Βικιθήκη}}'
end -- close works
end -- close Rimbaud
-- ---------------------------------
end -- close function
return {fr = fr}