Module:CS1 translator/data: Difference between revisions

Content deleted Content added
No edit summary
m I corrected the spelling of "parameter." WP:TYPO
 
(23 intermediate revisions by 3 users not shown)
Line 1:
--[[--------------------------< P A R A M S _ M A I N _ T >----------------------------------------------------
 
table of k/v_t pair tables where k/v_t in the outer table is:
tables of k/v pairs where k is the non-English parameter name and v is the directly translatable cs1|2 equivalent
k – the Wikimedia subdomain (language code; 'en' in 'en.wikipedia.org')
parameter name. Parameter names that do not have any cs1|2 equivalency or that are treated as special cases in
v_t – a k/v table where
the various exported functions are also listed here for completeness and to document them; these are asigned nil
k – the non-English parameter name
for a value (same as not present in the table).
v – the directly translatable cs1|2 equivalent parameter name. Parameter names that do not have any cs1|2
equivalency or that are treated as special cases are also listed here for completeness and to document
them; these are asigned nil for a value (same as not present in the table).
 
All key values (non-English parameter names) are normalized to lowercase.
 
For wikis that use some sort of variant of the Module:Citation/CS1 suite, supported parameters may (usually) be
TODO: move to a data module with data from other translatable citation templates
fetched from the non-English Module:Citation/CS1/Configuration (may be differently named) aliases table.
 
For wikis that use wikitext templates, copy the template's wikitext to a sandbox and then use Module:CS1 translator
function param_names_get () to extract those parameters that are not known to CS1 translator or to Module:Citation/CS1.
 
{{#invoke:CS1 translator|param_names_get|<page name>|<language tag>}}
 
]]
 
local params_main_t = {
ar = {
['تاريخ الوصول'] = 'access-date',
['تاريخ وصول'] = 'access-date',
['وكالة'] = "agency",
['تاريخ الأرشيف'] = 'archive-date',
['تاريخ أرشيف'] = 'archive-date',
['تاريخ-الأرشيف'] = 'archive-date',
['صيغة الأرشيف'] = 'archive-format',
['صيغة-الأرشيف'] = 'archive-format',
['مسار أرشيف'] = 'archive-url',
['مسار الأرشيف'] = 'archive-url',
['مسار-الأرشيف'] = 'archive-url',
['رقم-المقالة'] = 'article-number',
['في'] ='at',
['المؤلفين'] = 'authors',
['المؤلفون'] = 'authors',
['أشخاص'] = 'people',
['عنوان الكتاب'] = 'book-title',
['عنوان المؤتمر'] = 'book-title',
['الفصل'] = 'chapter',
['صيغة الفصل'] = 'chapter-format',
['تنسيق الفصل'] = 'chapter-format',
['مسار الفصل'] = 'chapter-url',
['صنف'] = 'class',
['صنف الأرشيف'] = 'class',
['اسم المؤتمر'] = 'conference',
['مسار المؤتمر'] = 'conference-url',
['التاريخ'] = 'date',
['تاريخ'] = 'date',
['الدرجة'] = 'degree',
['إظهار المؤلفين'] = 'display-authors',
['إظهار المحررين'] = 'display-editors',
['رقم الطبعة'] = 'edition',
['الطبعة'] = 'edition',
['اصدار'] = 'edition',
['إصدار'] = 'edition',
['الاصدار'] = 'edition',
['الإصدار'] = 'edition',
['طبعة'] = 'edition',
['محرر'] = 'editor',
['المحرر'] = 'editor',
['الحلقة'] = 'episode',
['التنسيق'] = 'format',
['صيغة'] = 'format',
['الصيغة'] = 'format',
['تنسيق'] = 'format',
['المعرف'] = 'id',
['مجموعة'] = 'inset',
['رقم معياري'] = 'isbn',
['الرقم المعياري'] = 'isbn',
['ردمك'] = 'isbn',
['أكلس'] = 'oclc',
['العدد'] = 'issue',
['اللغة'] = nil, -- language
['لغة'] = nil, -- language
['القائمة البريدية'] = 'mailing-list',
['الخريطة'] = 'map',
['صيغة الخريطة'] = 'map-forma',
['مسار الخريطة'] = 'map-url',
['معرف الرسالة'] = 'message-id',
['دقيقة'] = 'minutes',
-- ['Month'] = {"شهر", "الشهر", "month"}, -- not supported by cs1|2
['الشبكة'] = 'network',
['اسم المجموعة'] = 'newsgroup',
['سنة النشر الأصلية'] = 'orig-date',
['آخرون'] = 'others',
['المحقق'] = 'others',
['المحاورون'] = 'interviewer', -- actually 'interviewers' plural
['المحاور'] = 'interviewer',
['صفحة'] = 'page',
['الصفحة'] = 'page',
['ص'] = 'page',
['رقم صفحة'] = 'page',
['رقم الصفحة'] = 'page',
['الصفحات'] = 'pages',
['صفحات'] = 'pages',
['أرقم صفحات'] = 'pages',
['أرقام الصفحات'] = 'pages',
['موسوعة'] = 'encyclopedia',
['اسم الموسوعة'] = 'encyclopedia',
['اسم المعجم'] = 'dictionary',
['صحيفة'] = 'journal',
['دورية محكمة'] = 'journal',
['جريدة'] = 'newspaper',
['اسم الصحيفة'] = 'newspaper',
['عمل'] = 'work',
['العمل'] = 'work',
['من عمل'] = 'work',
['موقع'] = 'website',
['الموقع'] = 'website',
['دورية'] = 'periodical',
['القائمة البريدية'] = 'mailing-list',
['مجلة'] = 'magazine',
['سم المجلة'] = 'magazine',
['المقر'] = '___location',
['مقر'] = '___location',
['المكان'] = '___location',
['مكان'] = '___location',
['تاريخ النشر'] = 'publication-date',
['مكان النشر'] = 'publication-place',
['ناشر'] = 'publisher',
['الناشر'] = 'publisher',
['مصدر'] = 'publisher',
['مصدر'] = 'publisher',
['المصدر'] = 'publisher',
['المؤسسة'] = 'publisher',
['اقتباس'] = 'quote',
['مرجع'] = 'ref',
['المقياس'] = 'scale',
['القسم'] = 'section',
['الموسم'] = 'season',
['الأقسام'] = 'sections',
['سلسلة'] = 'series',
['وصلة سلسلة'] = 'series-link',
['مسار المسلسل'] = 'series-link',
['رقم سلسلة'] = 'series-number',
['ورقة'] = 'sheet',
['أوراق'] = 'sheets',
['محطة'] = 'station',
['الوقت'] = 'time',
['وقت الوقوع'] = 'time',
['عنوان'] = 'title',
['العنوان'] = 'title',
['وصلة العنوان'] = 'title-link',
['وصلة الحلقة'] = 'episode-link',
['النوع'] = 'type',
['عنوان مترجم'] = 'trans-title',
['العنوان بالعربي'] = 'trans-title',
['العنوان الأجنبي'] = 'trans-title',
['عنوان أجنبي'] = 'trans-title',
['العنوان باللغة العربية'] = 'trans-title',
['العنوان المترجم'] = 'trans-title',
['مسار'] = 'url',
['المسار'] = 'url',
['وصلة'] = 'url',
['التسجيل'] = 'url-access',
['حالة المسار'] = 'url-status',
['عدة مؤلفين'] = 'vauthors',
['عدة محررين'] = 'veditors',
['عبر'] = 'via',
['المجلد'] = 'volume',
['ج'] = 'volume',
['الجزء'] = 'volume',
['سنة'] = 'year',
['السنة'] = 'year',
-- enumerated parameters; non-enumerated forms of these parameters created by build_params_main_t()
['الأول#'] = 'first#',
['مؤلف#-الأول'] = 'author#-first',
['مؤلف# الأول'] = 'author#-first',
['أول#'] = 'first#',
['مؤلف الأول#'] = 'author-first#',
['مؤلف-الأول#'] = 'author-first#',
['مؤلف#'] = 'author#',
['الأخير#'] = 'last#',
['مؤلف#-الأخير'] = 'author#-last',
['مؤلف# الأخير'] = 'author#-last',
['مؤلف-الأخير#'] = 'author-last#',
['المؤلف#'] = 'author#',
['مؤلف الأخير#'] = 'author-last#',
['الموضوع#'] = 'subject#',
['وصلة مؤلف#'] = 'author-link#',
['مؤلف#-وصلة'] = 'author#-link',
['مؤلف# وصلة'] = 'author#-link',
['وصلة-مؤلف#'] = 'author-link#',
['وصلة المؤلف#'] = 'author-link#',
['وصلة-المؤلف#'] = 'author-link#',
['مؤلف#-قناع'] = 'author#-mask',
['مشارك#-الأول'] = 'contributor#-first',
['مشارك-الأول#'] = 'contributor-first#',
['مشارك#'] = 'contributor#',
['مشارك#-الأخير'] = 'contributor#-last',
['مشارك-الأخير#'] = 'contributor-last#',
['مشارك#-وصلة'] = 'contributor#-link',
['مشارك#-قناع'] = 'contributor#-mask',
['محرر#-الأول'] = 'editor#-first',
['محرر-الأول#'] = 'editor-first#',
['محرر الأول#'] = 'editor-first#',
['محرر# الأول'] = 'editor#-first',
['محرر#'] = 'editor#',
['المحرر#'] = 'editor#',
['محرر#-الأخير'] = 'editor#-last',
['محرر# الأخير'] = 'editor#-last',
['محرر-الأخير#'] = 'editor-last#',
['محرر الأخير#'] = 'editor-last#',
['وصلة محرر#'] = 'editor-link#',
['محرر#-وصلة'] = 'editor#-link',
['محرر# وصلة'] = 'editor#-link',
['وصلة-محرر#'] = 'editor-link#',
['محرر-وصلة#'] = 'editor-link#',
['وصلة-المحرر#'] = 'editor-link#',
['وصلة المحرر#'] = 'editor-link#',
['محرر#-قناع'] = 'editor#-mask',
['مترجم#-الأول'] = 'translator#-first',
['مترجم-الأول#'] = 'translator-first#',
['مترجم# الأول'] = 'translator#-first',
['مترجم الأول#'] = 'translator-first#',
['المترجم-الأول#'] = 'translator-first#',
['المترجم#-الأول'] = 'translator#-first',
['مترجم#'] = 'translator#',
['مترجم#-الأخير'] = 'translator#-last',
['المترجم#'] = 'translator#',
['المترجم-الأخير#'] = 'translator-last#',
['المترجم#-الأخير'] = 'translator#-last',
['مترجم الأخير#'] = 'translator-last#',
['مترجم# الأخير'] = 'translator#-last',
['مترجم-الأخير#'] = 'translator-last#',
['وصلة مترجم#'] = 'translator-link#',
['مترجم#-وصلة'] = 'translator#-link',
['مترجم# وصلة'] = 'translator#-link',
['وصلة-مترجم#'] = 'translator-link#',
['وصلة المترجم#'] = 'translator-link#',
['وصلة-المترجم#'] = 'translator-link#',
['المترجم#-وصلة'] = 'translator#-link',
['مترجم#-قناع'] = 'translator#-mask',
},
 
 
ca = { -- Catalan from :ca:Plantilla:Ref-web, Ref-publicació, Ref-llibre
-- ['any'] = nil, -- year
-- ['archive-date'] = '',
['article'] = 'title', -- alias of |title= from Ref-publicació (cite news)
['arxiudata'] = 'nil', -- archive-date
['arxiuurl'] = 'archive-url',
-- ['arxiv'] = '',
-- ['bibcode'] = '',
['autorenllaç'] = 'author-link', -- not enumerated; first author only
['citació'] = 'quote',
['coautors'] = nil, -- no cs1|2 equivalent: |coauthors=
['consulta'] = nil, -- access-date
['darrer'] = nil, -- no cs1|2 equivalent: alias of |last= used only to create CITEREF id
['data'] = nil, -- date
['dataaccés'] = nil, -- access-date
-- ['display-authors'] = '',
-- ['doi'] = '',
['doietiqueta'] = 'doi', -- alias of |doi= apparently manually percent encoded (as of 2022-12-26 no examples of its use at ca.wiki)
['edició'] = 'issue', -- undocumented
['editor'] = 'publisher',
['editorial'] = 'publisher',
['exemplar'] = 'issue',
-- ['format'] = '',
-- ['id'] = '',
['idioma'] = 'language',
['inactiu'] = nil, -- no cs1|2 equivalent; more-or-less same as {{dead link}}
-- ['issn'] = '',
-- ['jstor'] = '',
['llengua'] = 'language',
['lloc'] = '___location',
['mes'] = nil, -- month
['obra'] = 'work',
-- ['oclc'] = '',
-- ['pmc'] = '',
-- ['pmid'] = '',
['pàgina'] = 'page',
['pàgines'] = 'pages',
['publicació'] = 'work',
-- ['ref'] = '',
['revista'] = 'work',
['títol'] = 'title',
-- ['url'] = '',
['volum'] = 'volume',
-- ['year'] = '',
 
-- these from :ca:Plantilla:Ref-llibre
['altres'] = 'others',
-- ['any'] = '',
-- ['anyaccés'] = '', -- access year
-- ['anyarxiu'] = '', -- archive year
-- ['bnf'] = '', -- unsupported identifier
['capítol'] = 'chapter',
['cita'] = 'quote',
-- ['coautors'] = '',
['col·lecció'] = 'series',
['consulta'] = 'access-date',
['data'] = 'date',
['dataarxiu'] = 'archive-date',
-- ['mes'] = '', -- month
-- ['mesaccés'] = '', -- access month
-- ['mesarxiu'] = '', -- archive month
-- ['primera_edició'] = '', -- first_edition
['traductor'] = 'translator',
['títoltraduït'] = 'trans-title',
['urlcapítol'] = 'chapter-url',
 
-- enumerated parameters; non-enumerated forms of these parameters created by build_params_main_t()
['autor#'] = 'author#',
['cognom#'] = 'last#',
['enllaçautor#'] = 'author-link#',
-- ['last#'] = '',
['nom#'] = 'first#',
},
 
da = { -- Danish from :da:Modul:Citation/CS1/Whitelist
['hentningsdato'] = nil, -- access-date
Line 97 ⟶ 419:
['dødlenke'] = nil, -- special case: |url-status=
['besøksdato'] = nil, -- access-date
['språk'] = 'language'nil, -- special case: |language=
['arkiv_url'] = 'archive-url',
['utgivare'] = 'publisher',
Line 138 ⟶ 460:
['dateformat'] = 'df',
 
-- enumerated parameters; non-enumerated forms of enumeratedthese parameters; TODO: is there a better way tocreated doby this?build_params_main_t()
['contributormaske'] = 'contributor-mask',
['efternavn'] = 'last',
['fornavn'] = 'first',
['forfatter'] = 'author',
['forfatterlink'] = 'author-link',
['forfattermaske'] = 'author-mask',
['redaktør'] = 'editor',
['redaktørlink'] = 'editor-link',
['redaktørmaske'] = 'editor-mask',
['redaktør-efternavn'] = 'editor-last',
['redaktør-fornavn'] = 'editor-first',
['oversætter'] = 'translator',
['oversætter-efternavn'] = 'translator-last',
['oversætter-fornavn'] = 'translator-first',
['oversætterlink'] = 'translator-link',
['oversættermaske'] = 'translator-mask',
 
-- enumerated parameters
['fornavn#'] = 'first#',
['forfatter#'] = 'author#',
Line 217 ⟶ 521:
['zugriff'] = nil, -- access-date
 
-- enumerated parameters; non-enumerated forforms of enumeratablethese parameters created by build_params_main_t()
['autor'] = 'author',
['herausgeber'] = 'editor',
['übersetzer'] = 'translator',
 
-- enumerated parameters
['autor#'] = 'author#',
['herausgeber#'] = 'editor#',
Line 338 ⟶ 637:
['wikidata'] = nil, -- no cs1|2 equivalent
 
-- enumerated parameters; non-enumerated forms of enumeratedthese parameters; TODO: is there a better way tocreated doby this?build_params_main_t()
['apellido'] = 'last',
['apellido-editor'] = 'editor-last',
['autor'] = 'author',
['enlaceautor'] = 'author-link',
['enlace-autor'] = 'author-link',
['enlace-editor'] = 'editor-link',
['máscaraautor'] = 'author-mask',
['máscara-autor'] = 'author-mask',
['nombre'] = 'first',
['nombre-editor'] = 'editor-first',
 
-- enumerated parameters
['máscaraautor#'] = 'author-mask#',
['máscara-autor#'] = 'author-mask#',
Line 366 ⟶ 653:
},
 
fi = { -- Finnish from fi:Malline:Verkkoviite (web), fi:Malline:Lehtiviite (journal), fi:Malline:Kirjaviite (book)
['ajankohta'] = nil, -- date
['arkisto'] = 'archive-url',
['arkistoitu'] = nil, -- archive-date
['ietf-kielikoodi'] = nil, -- no cs1|2 equivalent
['julkaisija'] = 'publisher',
['julkaisu'] = 'work',
['julkaisupaikka'] = '___location',
['kappale'] = 'chapter',
['kieli'] = 'language',
['lainaus'] = 'quote',
['lopetusmerkki'] = 'postscript',
['luettu'] = nil, -- access-date
['luku'] = nil, -- purportedly |number= but in use at fi.wiki it's all sorts of things; nil to get cs1|2 error message
['luku'] = 'number',
['nimeke'] = 'title',
['nimike'] = 'title',
['palstanumero'] = 'columnissue',
['palstatosoite'] = 'columnsurl',
['otsikko'] = 'title',
['palsta'] = nil, -- special case: at; |column=
['palstat'] = nil, -- special case: at; |columns=
['selite'] = 'version',
['sivu'] = 'page',
['sivusto'] = 'work',
['sivut'] = 'pages',
['suomentaja'] = 'translator',
Line 387 ⟶ 684:
['viitattu'] = nil, -- access-date
['vuosi'] = nil, -- year
['vuosikerta'] = 'volume',
['www'] = 'url',
['www-teksti'] = nil, -- no cs1|2 equivalent
-- these from cite web/Finnish
['ajankohta'] = nil, -- date
['arkisto'] = 'archive-url',
['arkistoitu'] = nil, -- archive-date
['ietf-kielikoodi'] = nil, -- no cs1|2 equivalent
['julkaisu'] = 'work',
['lainaus'] = 'quote',
['osoite'] = 'url',
['otsikko'] = 'title',
['sivusto'] = 'work',
},
 
Line 408 ⟶ 695:
['archiveurl'] = 'archive-url',
['auteur institutionnel'] = 'author',
['auteurs ouvrage'] = 'editor', -- *not* 'authors'; used by fr:Chapitre
['bnf'] = nil, -- special case |id=; [[:fr:Bibliothèque nationale de France]] call {{BNF}}?
['brisé le'] = nil, -- no cs1|2 equivalent; 'broke it'? |url-status=dead / {{dead link}}
Line 472 ⟶ 760:
['site'] = 'website',
['sous-titre'] = nil, -- special case: |title=; subtitle combined with |title=
['sous-titre ouvrage'] = nil, -- special case: |title=; subtitle combined with |title= (added to function title_make_fr)
['sudoc'] = nil, -- special case |id=; [[:fr:Système universitaire de documentation]]
['titre'] = nil, -- special case: |title=
Line 490 ⟶ 779:
['wikisource'] = nil, -- no cs1|2 equivalent; title of the book's wikisource page
 
-- enumerated parameters; non-enumerated forms of enumeratedthese parameters; TODO: is there a better way tocreated doby this?build_params_main_t()
-- ['auteur'] = 'author', -- non-enumerated forms
-- ['directeur'] = nil, -- no cs1|2 equivalent; "If the author assumes the responsibility of director of publication, indicate yes; otherwise, do not use this parameter"
-- ['lien auteur'] = 'author-link',
-- ['nom'] = 'last',
-- ['postnom'] = 'last',
-- ['prenom'] = 'first',
-- ['prénom'] = 'first',
-- ['responsabilité'] = nil, -- no cs1|2 equivalent; "Possible additional liability assumed by the author; if he is a publication directeur1, prefer the directeur1 parameter."
 
-- enumerated parameters
['auteur#'] = 'author#',
['directeur#'] = nil, --no cs1|2 equivalent; "If the author assumes the responsibility of director of publication, indicate yes; otherwise, do not use this parameter"
Line 599 ⟶ 878:
['laysummary'] = 'lay-url',
['layurl'] = 'lay-url',
['lingua'] = 'language'nil, -- special case language
['mese'] = nil, -- month=
['meseaccesso'] = nil, -- access-date=
Line 662 ⟶ 941:
['wktrasmissione'] = 'series-link',
 
-- enumerated parameters; non-enumerated forms of enumeratedthese parameters; TODO: is there a better way tocreated doby this?build_params_main_t()
['autore'] = 'author',
['cognome'] = 'last',
['curatore'] = 'editor',
['curatore-cognome'] = 'editor-last',
['curatore-nome'] = 'editor-first',
['linkautore'] = 'author-link',
['nome'] = 'first',
['wkautore'] = 'author-link',
 
-- enumerated parameters
['autore#'] = 'author#',
['autore-articolo#'] = nil, -- no cs1|2 equivalent: |author-article=?
Line 859 ⟶ 1,128:
['overs_tittel'] = 'trans-title',
['overs-tittel'] = 'trans-title',
['på'] = 'language'nil,
['periodisk'] = 'periodical',
['personer'] = 'people',
Line 884 ⟶ 1,153:
['serie-separator'] = nil, -- no cs1|2 equivalent: |series-separator=
['sesong'] = 'season',
['side'] = true'page',
['sideantall'] = nil, -- not in aliases list: |number-of-pages=?; -- kept for backwards compability, not part of CS1
['sider'] = 'pages',
Line 892 ⟶ 1,161:
['skala'] = 'scale',
['skole'] = 'publisher',
['språk'] = 'language'nil, -- special case: |language=
['sprefiks'] = nil, -- no cs1|2 equivalent: |P-prefix=
['ss'] = 'pages',
Line 922 ⟶ 1,191:
['volum'] = 'volume',
 
-- enumerated parameters; non-enumerated formforms of enumeratedthese parameters created by build_params_main_t()
['etternavn'] = 'last',
['forfatter'] = 'author',
['forfatter-etternavn'] = 'author-surname',
['forfatter-fornavn'] = 'author-given',
['forfatterlenke'] = 'author-link',
['forfatter-lenke'] = 'author-link',
['fornavn'] = 'first#',
['intervjuer'] = true,
['oversetter'] = 'translator',
['oversetter-fornavn'] = 'translator-first',
['oversetter-etternavn'] = 'translator-last',
['oversetter-lenke'] = 'translator-link',
['oversetter-maske'] = 'translator-mask',
['redaktør'] = 'editor',
['redaktøretternavn'] = 'editor-last',
['redaktør-etternavn'] = 'editor-last',
['redaktørfornavn'] = 'editor-first',
['redaktør-fornavn'] = 'editor-first',
['redaktørlenke'] = 'editor-link',
['redaktør-lenke'] = 'editor-link',
['redaktørmerke'] = nil, -- not in aliases list
['redaktør-merke'] = nil, -- not in aliases list
-- enumerated parameters
['etternavn#'] = 'last#',
['forfatter#'] = 'author#',
Line 1,040 ⟶ 1,285:
['adres czasopisma'] = nil, -- no cs1|2 equivalent; 'journal url'
 
-- enumerated parameters; non-enumerated formforms of enumeratedthese parameters created by build_params_main_t()
['autor'] = 'author',
['autor r'] = 'contributor', -- 'chapter' author; 'contributor' here to distingush from |autor= (|author=); from {{Cytuj książkę}}
['autor r link'] = 'contributor-link', -- 'chapter' author link
['autor link'] = 'author-link',
['imię'] = 'first',
['imię r'] = 'contributor-first', -- 'chapter' author; 'contributor' here to distingush from |imię= (|first=); from {{Cytuj książkę}}
['język'] = 'language', -- special case |language=
['nazwisko'] = 'last',
['nazwisko r'] = 'contributor-last', -- 'chapter' author; 'contributor' here to distingush from |nazwisko= (|last=); from {{Cytuj książkę}}
['redaktor'] = 'editor',
 
-- enumerated parameters
['autor#'] = 'author#',
['autor link#'] = 'author-link#',
Line 1,378 ⟶ 1,611:
 
 
-- enumerated parameters; non-enumerated forms of enumeratedthese parameters; TODO: is there a better way tocreated doby this?build_params_main_t()
['apelido'] = 'last',
['apellido'] = 'last',
['apellidos'] = nil, -- no cs1|2 equivalent: plural |lasts=
['authormask'] = 'author-mask',
['authormask'] = 'author-mask',
['autor'] = 'author',
['autor-mascara'] = 'author-mask',
['autorlink'] = 'author-link',
['cognome'] = 'last',
['contribuidor-primeiro'] = 'contributor-first',
['contribuidor-ultimo'] = 'contributor-last',
['contribuidor-link'] = 'contributor-link',
['contribuidor-mascara'] = 'contributor-mask',
['contribuidor-primeiro'] = 'contributor-first',
['contributor-ultimo'] = 'contributor-last',
['editorlink'] = 'editor-link',
['editormask'] = 'editor-mask',
['editor-mascara'] = 'editor-mask',
['editor-nome'] = 'editor-first',
['editor-sobrenome'] = 'editor-last',
['editorlink'] = 'editor-link',
['editormask'] = 'editor-mask',
['entrevistado'] = 'interviewer',
['entrevistadolink'] = 'interviewer-link',
['entrevistador'] = 'interviewer',
['nombre'] = 'first',
['nome'] = 'first',
['prenome'] = 'first',
['primeiro'] = 'first',
['sobrenome'] = 'last',
['subjectlink'] = 'subject-link',
['sujeito'] = 'subject-last',
['sujeitolink'] = 'subject-link',
['tradutor'] = 'translator',
['tradutor-link'] = 'translator-link',
['tradutor-mascara'] = 'translator-mask',
['tradutor-primeiro'] = 'translator-first',
['tradutor-ultimo'] = 'translator-last',
['tradutor-link'] = 'translator-link',
['tradutor-mascara'] = 'translator-mask',
['tradutor-primeiro'] = 'translator-first',
['tradutor-ultimo'] = 'translator-last',
['ultimo'] = 'last',
['último'] = 'last',
 
-- enumerated parameters
['apelido#'] = 'last#',
['apellido#'] = 'last#',
Line 1,472 ⟶ 1,659:
ru = { -- these parameters from ru:Шаблон:Книга (Template:Книга) (cite book)
['автор'] = 'author',
['автор имя'] = 'first',
['автор линк'] = 'author-link';
['часть'] = 'chapter',
['часть оригинал'] = 'trans-chapter',
['ссылка'] = 'url',
['ссылка часть'] = 'chapter-url',
['назва'] = 'title',
['название'] = 'title',
['заглавие'] = 'title',
['подзаголовок'] = nil, -- no cs1|2 equivalent: |subtitle=
['викитека'] = nil, -- no cs1|2 equivalent: wikisource; |title-link=?
['викисклад'] = nil, -- no cs1|2 equivalent: commons; |title-link=?
['оригинал'] = 'origtrans-datetitle', -- wikitext {{Книга}} says this is |orig-date=;
['ответственный'] = 'agencyeditor', -- google translate says 'responsible'; this is a cite book template, agency does not really belong here
['издание'] = 'editionwork',
['тираж'] = nil, -- part of edition (circulation?)
['город'] = '___location',
['место'] = '___location',
['годмісце'] = 'date___location',
['год'] = 'date', -- in wikitext Cite journal/Russian this is |year=
['рік'] = 'year',
-- ['місяць'] = 'month',
-- ['день'] = 'day',
['издательство'] = 'publisher',
['страницы как есть'] = 'at', -- 'pages as they are'?
Line 1,493 ⟶ 1,689:
['страницы'] = 'pages',
['страниц'] = 'pages',
['сторінок'] = 'page',
['сторінки'] = 'pages',
['страница'] = 'page', -- in {{Книга}} but not in ru:Шаблон:Книга
['серия'] = 'series',
['язык'] = 'language',
['язык издания'] = 'language',
['оригинал язык'] = 'language', -- original language
['nodot'] = nil, -- no cs1|2 equivalent; suppresses the dot when |title=<title> ends with puctuation
['nodot2'] = nil, -- no cs1|2 equivalent
['столбцы'] = nil, -- columns; |at=col. <column>?
 
-- these taken from :ru:Шаблон:Статья (Template:Книга) (cite journal)
['автор издания'] = 'authors', -- in wikitext Cite journal/Russian this is editor; google translate says 'author of the publication'
['тип'] = 'type',
['месяц'] = nil, -- month
['число'] = nil, -- day; in wikitext Cite journal/Russian this is |quote=; that can't be right
['выпускномер'] = 'issuenumber',
-- ['archiveurl'] = 'archive-url',
['номер'] = nil, -- edition number?
-- ['archiveurlarchivedate'] = 'archive-urldate',
['archivedateархив дата'] = 'archive-date',
['архив'] = 'archive-url',
 
-- enumerated parameters; non-enumerated forms of these parameters created by build_params_main_t()
['автор#'] = 'last#',
['автор# имя'] = 'first#',
['автор# линк'] = 'author-link#',
['ответственный#'] = 'editor#',
},
 
Line 1,535 ⟶ 1,742:
['sida'] = 'page',
['sidor'] = 'pages',
['språk'] = 'language'nil, -- special case: |language=
['tidskrift'] = 'journal',
['titel'] = 'title',
Line 1,546 ⟶ 1,753:
['website'] = 'url', -- different from en.wiki
 
-- enumerated parameters; non-enumerated forms of these parameters created by build_params_main_t()
['efternamn'] = 'last',
['författare'] = 'author',
['författarlänk'] = 'author-link',
['förnamn'] = 'first',
['redaktörlänk'] = 'editor-link',
['redaktör-efternamn'] = 'editor-last',
['redaktör-förnamn'] = 'editor-first',
 
-- enumerated parameters
['efternamn#'] = 'last#',
['författare#'] = 'author#',
Line 1,739 ⟶ 1,937:
['zaman'] = 'time',
 
-- enumerated parameters; non-enumerated forms of enumeratedthese parameters; TODO: is there a better way tocreated doby this?build_params_main_t()
['ad'] = 'first',
['çevirmen-ad'] = 'translator-first',
['çevirmen'] = 'translator',
['çevirmen-bağ'] = 'translator-link',
['çevirmen-bağı'] = 'translator-link',
['çevirmen-maske'] = 'translator-mask',
['çevirmen-maskesi'] = 'translator-mask',
['çevirmen-soyadı'] = 'translator-last',
['editör'] = 'editor',
['editör-ad'] ='editor-first',
['editör-bağ'] = 'editor-link',
['editör-bağı'] = 'editor-link',
['editör-ilk'] = 'editor-first',
['editör-maske'] = 'editor-mask',
['editör-maskesi'] = 'editor-mask',
['editör-son'] = 'editor-last',
['editör-soyadı'] = 'editor-last',
['görüşmeci'] = 'interviewer',
['görüşmeci-ad'] = 'interviewer-first',
['görüşmeci-bağ'] = 'interviewer-link',
['görüşmeci-bağlantı'] = 'interviewer-link',
['görüşmeci-maske'] = 'interviewer-mask',
['görüşmeci-maskesi'] = 'interviewer-mask',
['görüşmeci-soyadı'] = 'interviewer-last',
['ilk'] = 'first',
['katkı-ad'] = 'contributor-first',
['katkı-bağ'] = 'contributor-link',
['katkı-bağı'] = 'contributor-link',
['katkı-maske'] = 'contributor-mask',
['katkı-maskesi'] = 'contributor-mask',
['katkı-soyadı'] = 'contributor-last',
['konu'] = 'subject',
['konubağı'] = 'subject-link',
['özne'] = 'subject',
['öznebağı'] = 'subject-link',
['son'] = 'last',
['soyadı'] = 'last',
['süje'] = 'subject',
['süjebağı'] = 'subject-link',
['yazar'] = 'author',
['yazarbağ'] = 'author-link',
['yazarbağı'] = 'author-link',
['yazarlink'] = 'author-link',
['yazarmaskesi'] = 'author-mask',
['yazar-bağ'] = 'author-link',
['yazar-link'] = 'author-link',
 
-- enumerated parameters
['ad#'] = 'first#',
['çevirmen#-ad'] = 'translator#-first',
Line 1,846 ⟶ 1,996:
--[[--------------------------< P A R A M S _ D A T E S _ T >--------------------------------------------------
 
<date_params_t> is a k/v_t table where k is the ISOthe 639-1Wikimedia subdomain (language code; and v_t is a k/v_t table where'en' kin identifies'en.wikipedia.org')
and v_t is a k/v_t table where k identifies the 'date' or 'date-part' and v_t is a sequence table of associated non-English parameter names
non-English parameter alias names
 
non-English parameter names are normalized to lowercase.
Line 1,854 ⟶ 2,005:
 
local params_dates_t = {
ar = { -- Arabic
date_t = {'التاريخ', 'تاريخ'},
year_t = {'سنة', 'السنة'},
month_t = {'شهر', 'الشهر'},
},
 
ca = { -- Catalan
date_t = {'data'},
year_t = {'any'},
month_t = {'mes'}
},
 
da = { -- Danish
date_t = {'dato', 'datum', 'dag', 'date'},
year_t = {'år', 'year'},
},
 
de = { -- German
date_t = {'datum', 'date'},
year_t = {'jahr', 'datum-jahr', 'year'},
month_t = {'monat'},
day_t = {'tag'},
Line 1,867 ⟶ 2,030:
 
es = { -- Spanish
date_t = {'fecha', 'date'},
year_t = {'año', 'year'},
},
 
fi = { -- Finnish
date_t = {'ajankohta', 'date'},
year_t = {'vuosi', 'year'},
},
fr = { -- French
date_t = {'date'},
year_t = {'année', 'annee', 'year'},
month_t = {'mois'},
day_t = {'jour'},
Line 1,884 ⟶ 2,047:
 
it = { -- Italian
date_t = {'data', 'datatrasmissione', 'date'},
year_t = {'anno', 'year'},
month_t = {'mese'},
day_t = {'giorno'},
Line 1,898 ⟶ 2,061:
 
no = { -- Norwegian
date_t = {'dato', 'date'},
year_t = {'år', 'utgivelsesår', 'year'},
month_t = {'måned'},
day_t = {'dag'},
Line 1,905 ⟶ 2,068:
 
pl = { -- Polish
date_t = {'data', 'date'},
year_t = {'rok', 'year'},
month_t = {'miesiąc'},
},
 
pt = { -- Polish
date_t = {'data', 'dataemissao', 'fecha', 'date'},
year_t = {'ano', 'año', 'year'},
month_t = {'acessomesdia', 'mes', 'month', 'mês'},
},
 
ru = { -- Russian
year_t = {'год', 'рік', 'year'}, -- also date
month_t = {'месяц'},
day_t = {'число', 'день'},
},
 
sv = { -- Swedish
date_t = {'date', 'publdatum', 'datum'},
year_t = {'år', 'year'},
month_t = {'månad'},
day_t = {'dag'},
Line 1,930 ⟶ 2,093:
 
tr = { -- Turkish
date_t = {'tarih', 'date'},
year_t = {'yıl', 'year'},
month_t = {'ay'},
day_t = {'gün'},
Line 1,940 ⟶ 2,103:
--[[--------------------------< P A R A M S _ M I S C _ D A T E S _ T >----------------------------------------
 
German otherFor date-holding parameters that are not |date=, |year=, |month=, or |yearday= equivalents.
 
table of k/v_t pairs where k/v_t in the outer table is:
All key values (German parameter names) normalized to lowercase.
k – the Wikimedia subdomain (language code; 'en' in 'en.wikipedia.org')
v_t – a table of k/v pairs where
k – the non-English parameter name
v – the directly translatable cs1|2 equivalent date-holding parameters that are not |date=, |year=, |month=,
or |day= equivalents.
 
All key values normalized to lowercase.
 
]]
 
local params_misc_dates_t = {
ar = { -- Arabic
['تاريخ الأرشيف'] = 'archive-date',
['تاريخ أرشيف'] = 'archive-date',
['تاريخ-الأرشيف'] = 'archive-date',
['تاريخ الوصول'] = 'access-date',
['تاريخ وصول'] = 'access-date',
['سنة النشر الأصلية'] = 'orig-date',
['تاريخ النشر'] = 'publication-date',
},
 
ca = { -- Catalan
['arxiudata'] = 'archive-date',
['consulta'] = 'access-date',
['dataaccés'] = 'access-date',
},
da = { -- Danish
['accessdate'] = 'access-date',
Line 1,972 ⟶ 2,158:
},
en = { -- en.wiki cannonical and alternate forms to catch partial translations
['accessdate'] = 'access-date', -- en.wiki alternate form
['access-date'] = 'access-date',
['archive-date'] = 'archive-date',
['doi-broken-date'] = 'doi-broken-date',
['lay-date'] = 'lay-date',
['publication-date'] = 'publication-date',
},
 
es = { -- Spanish
['año-original'] = 'orig-date', -- orig-date; is it proper to translate this? what about non-date text?
Line 2,073 ⟶ 2,268:
['publicationdate'] = 'publication-date',
['transmissão'] = 'air-date',
},
 
ru = { -- Russian
['archivedate'] = 'archive-date',
['архив дата'] = 'archive-date',
['оригинал'] = 'orig-date',
},
 
Line 2,082 ⟶ 2,283:
['origår'] = 'orig-date', -- actually |orig-year=
['origdatum'] = 'orig-date',
-- ['origmånad'] = nil, -- no cs1|2 equivalent; |orig-month=
['utgivningsdatum'] = 'publication-date',
},
 
tr = { -- Turkish
['archivedate'] = 'archive-date', -- no longer supported by cs1|2
['arşivtarihi'] = 'archive-date',
['arşiv-tarihi'] = 'archive-date',
['archivedate'] = 'archive-date', -- no longer supported by cs1|2
['diğertarih'] = 'lay-date',
['doibozuk'] = 'doi-broken-date',
Line 2,115 ⟶ 2,316:
miscellaneous identifiers that, at en.wiki, are grouped together in |id=
 
A sequence table of sequencek/v_t tablespairs where k/v_t in the outer table is:
k – the Wikimedia subdomain (language code; 'en' in 'en.wikipedia.org')
[1] is the parameter name normalized to lower case
v_t – a sequence table of sequence tables where:
[2] is the associated wikitext label to be used in the rendering
[1] is the parameter name normalized to lower case
[3] is the url-prefix to be attached to the identifier value from the template parameter
[42] is the url-postfixassociated wikitext label to be attachedused toin the identifier valuerendering
[3] is the url-prefix to be attached to the identifier value from the template parameter
[4] is the url-postfix to be attached to the identifier value
parameter names are normalized to lowercase.
Line 2,154 ⟶ 2,357:
--[[--------------------------< P A R A M S _ L A N G U A G E _ T >--------------------------------------------
 
table of sequencek/v_t tablespairs ofwhere languagek/v_t parameterin namesthe outer table is:
k – the Wikimedia subdomain (language code; 'en' in 'en.wikipedia.org')
v_t – a sequence table of non-English equivalents to the en.wiki |language= parameter
 
]]
 
local params_language_t = {
ar = {'اللغة', 'لغة'}, -- Arabic
ca = {'idioma', 'llengua'}, -- Catalan
da = {'sprog', 'på', 'språk', 'langue', 'lang'}, -- Danish
de = {'originalsprache', 'sprache'}, -- German
Line 2,165 ⟶ 2,372:
fr = {'langue', 'language'}, -- French
it = {'lingua'}, -- Italian
nb = {'på', 'språk'}, -- Norwegian
nl = {'språk', 'language'}, -- Dutch
runo = {'языкpå', 'språk'}, -- RussianNorwegian
ru = {'язык', 'язык издания', 'оригинал язык'}, -- Russian
sv = {'språk', 'language'}, -- Swedish
tr = {'dil', 'language'}, -- Turkish
}
 
 
--[[--------------------------< B U I L D _ P A R A M S _ M A I N _ T >----------------------------------------
 
assemble the main list of parameters; skip all nil-valued parameter and create non-enumerated parameter names
from the enumerated parameters (those that have '#' somewhere in the parameter name)
 
Does simple error detection and emits a graringly crude error message when:
only one side of ['key'] = value pair has a '#'; when enumerated, both sides require the '#'
the only type allowed for value in a ['key'] = value pair is 'string'; catches things like ['side'] = true (copied from a whitelist)
 
]]
 
local function build_params_main_t ()
local out_t = {}; -- table goes here
for lang, v_t in pairs (params_main_t) do -- for each language table in params_main_t{}
out_t[lang] = {}; -- create a table in out_t for <lang>
for k, v in pairs (v_t) do -- for each parameter in the language table
if 'string' ~= type (v) then
if k:find ('#', 1, true) then -- does the parmeter have the enumerator character '#'
error (lang .. ' ' .. k .. ' value not a string'); -- glaring error message because non-string values not allowed
out_t[lang][k:gsub('#', '')] = v:gsub('#', ''); -- add a non-enumerate version of the parameter to the output
elseend
if v then -- if the parameter has a non-nil translation (not a special, not a parameter without cs1|2 equivalent)
out_t[lang][k] = v;
if (k:find ('#', 1, true) and not v:find ('#', 1, true)) or
(not k:find ('#', 1, true) and v:find ('#', 1, true))then
error (lang .. '[' .. k .. ']: '.. v .. ' missing \'#\''); -- glaring error message because '#' required on both sides
else
if k:find ('#', 1, true) then -- does the parameter name have the enumerator character '#'?
out_t[lang][k:gsub('#', '')] = v:gsub('#', ''); -- add a non-enumerated version of the parameter to the output
end
out_t[lang][k] = v; -- add the parameter to the output; may be an enumerated param or not
end
end
end
end
return out_t; -- and done
end
 
Line 2,195 ⟶ 2,423:
params_identifiers_t = params_identifiers_t,
params_language_t = params_language_t,
params_main_t = build_params_main_t(), --params_main_t,
params_misc_dates_t = params_misc_dates_t,
}